visualdynamics.gui.author_panel¶
author_panel
¶
The specification being edited, as tables beside the plot.
The panel lays out what an author states. One grid holds the
breakpoints, with a level per channel, and another holds each pair's
coherence and phase, with a row under it that sets every pair at once.
Above them are the form (Breakpoints, or Interpolated onto frequency
lines at a spacing), the two band constraints, Symmetric and Uniform,
and how the levels are entered: Levels, a level at every breakpoint,
or Slopes, a level at the first breakpoint and a slope in decibels per
octave into each one after it, with the level the slope reaches shown
beside it. Under Slopes an edit holds every slope it does not change,
as the draft's with_slope and with_level do. Areas and running rms
adds the reading of the breakpoint table under the grid (each
segment's slope, area, share and the rms accumulated to its end, for
the channel on the plot), and the window writes the areas on the plot
and draws the running rms under it. The bands themselves are dragged on the plot beside the panel,
which draws the autospectra with their bands. The same panel is used
for every way in: a shape set's modal coordinates, a channel table's
control channels, or a specification opened to edit.
The two grids are the application's ordinary tables,
CopyPasteTableView over TableModel columns. So a column header
selects the column, a row header the row, Cmd-click adds a cell, and
copy, paste, Delete to clear, Batch Edit and the fill handle come from
the one implementation every table uses. A frequency typed between two
others re-sorts the breakpoints instead of being refused.
Nothing here computes anything. The panel hands back a
SpecificationDraft in SI and reports when it changes, and the window
applies every edit to the specification through
Project.author_specification.
Classes:
| Name | Description |
|---|---|
Sheet |
The draft's fields in SI, as the two grids edit them. |
AuthorPanel |
The specification editor: the breakpoints and pairs grids, the |
Functions:
| Name | Description |
|---|---|
sheet_models |
(breakpoints, pairs): the sheet's two grids as ordinary table |
Classes¶
Sheet
¶
Sheet(draft: SpecificationDraft, unit_system: UnitSystem)
The draft's fields in SI, as the two grids edit them.
The table models write here one cell at a time, and the panel reads a whole draft back. The display unit is applied when a cell is shown and undone when one is typed, so a cell nobody edited keeps its exact SI value.
Methods:
| Name | Description |
|---|---|
draft |
The sheet as a |
sort |
Put the breakpoints in frequency order, with their levels, so a |
level_channel |
The channel whose level the breakpoints grid shows in |
Attributes:
| Name | Type | Description |
|---|---|---|
by_slope |
bool
|
Whether the levels are typed by slope here: the draft's entry |
Source code in src/visualdynamics/gui/author_panel.py
Attributes¶
by_slope
property
¶
Whether the levels are typed by slope here: the draft's entry is 'slopes' and the sheet is on its breakpoints. The lines form is a controller's reading of the breakpoints, and a slope into each of four thousand lines is nothing anyone types.
Methods:¶
draft
¶
draft() -> SpecificationDraft
The sheet as a SpecificationDraft. The draft's own checks
raise ValueError for anything no specification could hold.
Source code in src/visualdynamics/gui/author_panel.py
sort
¶
Put the breakpoints in frequency order, with their levels, so a frequency typed between two others moves to its place.
Source code in src/visualdynamics/gui/author_panel.py
level_channel
¶
The channel whose level the breakpoints grid shows in
column, or None for the frequency column and, by slope, a
slope column (the grid then holds a level and a slope a
channel).
Source code in src/visualdynamics/gui/author_panel.py
AuthorPanel
¶
Bases: QWidget
The specification editor: the breakpoints and pairs grids, the form buttons and the band constraints.
Each edit is reported on changed as a whole SpecificationDraft.
The form buttons report on form_asked and the constraints on
constraint_asked, both for the whole specification. There is no
apply button, because the window applies every edit to the
specification as it is made.
Methods:
| Name | Description |
|---|---|
show_draft |
Show a draft, with each channel's levels in the display units |
draft |
The draft the sheet holds, in SI. Raises ValueError when no |
show_reading |
Read the sheet's breakpoint table for |
Attributes:
| Name | Type | Description |
|---|---|---|
areas_wanted |
bool
|
Whether the segment areas and the running rms are asked for, |
Source code in src/visualdynamics/gui/author_panel.py
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 | |
Attributes¶
areas_wanted
property
¶
Whether the segment areas and the running rms are asked for, and the sheet is on its breakpoints, where they are offered.
Methods:¶
show_draft
¶
show_draft(draft: SpecificationDraft, unit_system: UnitSystem, origin: str = '', spacing_hint: float | None = None) -> None
Show a draft, with each channel's levels in the display units
of its density. origin says where the sheet came from and is
shown with the draft's notes. spacing_hint is the line spacing
to offer when the draft has none, such as a time history's
averaging.
Source code in src/visualdynamics/gui/author_panel.py
draft
¶
draft() -> SpecificationDraft
The draft the sheet holds, in SI. Raises ValueError when no sheet is open, or for anything no specification could hold.
Source code in src/visualdynamics/gui/author_panel.py
show_reading
¶
Read the sheet's breakpoint table for channel (the one on
the plot; the first when it is not on the sheet) under the
grid: each segment's slope, area, share of the whole and the
rms accumulated to its end, then the total, in the display
units. Hidden while Areas and running rms is off, and on the
lines form, where it is not offered. A table of more segments
than are labeled on the plot is read as its total alone.
Source code in src/visualdynamics/gui/author_panel.py
Functions:¶
sheet_models
¶
sheet_models(sheet: Sheet, parent: Any = None) -> tuple[TableModel, TableModel]
(breakpoints, pairs): the sheet's two grids as ordinary table models, which the table conventions test holds to the same contract as every other table. The window records each edit in the journal through the verb it calls, so each editable column is declared as journaled elsewhere.