visualdynamics.core.report¶
report
¶
Reports: an ordered document built from a project's objects.
A Report is a list of blocks (text the user wrote, plots, animated
geometry scenes, tables, bar charts) that each name the object they draw
from. A report holds references, never data. A reference is a literal
object name, or a symbolic selector such as '@basis:Frf' that is
resolved against the project's object groups when the report is
rendered (resolve_binding). Because of the selectors, a saved report
works as a template for the next project, whatever its objects are
named. A block whose reference does not resolve stays unbound in the
editor until it is pointed at a compatible object, and an unbound block
is not rendered.
This module also holds the project types (PROJECT_TYPES), the objects
each type expects (project_expectations), and the report template
each type generates (PROJECT_TEMPLATES, TEMPLATE_BUILDERS). A
Random and Sine project generates two reports, a random report and a
sine report. A multiple-input random run's report (mimo_template)
belongs to no project type and is generated by its name, 'mimo'.
Classes:
| Name | Description |
|---|---|
Report |
An ordered list of blocks, each a plain dict. |
Functions:
| Name | Description |
|---|---|
source_options |
The names of the objects a block of this kind could draw from. |
binding_tokens |
Every symbolic token, as {token: (class, banded)}. |
is_banded |
Whether the object is on bands (an octave-band PSD or |
binding_types |
The types a symbolic binding can name, as {token: class}. |
resolve_binding |
The object name a binding field refers to. |
binding_label |
A readable label for a binding, such as 'Basis FRF (auto)' for |
symbolic_options |
The symbolic selectors this block could bind instead of a name. |
photo_options |
The photo names held by the Photos object a photo block is bound to. |
shape_options |
The names of the shape sets in |
base_quantity |
The quantity a record's dimension names: 'acceleration' whether |
record_dimensions |
The quantities one data array's records hold. |
time_dimensions |
The quantities the project's time histories hold, sorted. |
spectrum_dimensions |
The quantities the project's spectra hold, sorted. |
psd_dimensions |
The quantities the project's PSDs hold, sorted. |
series_dof_quantities |
Every quantity the selected data measures at some DOF, sorted. |
series_quantity_dofs |
Every DOF the selected data measures as |
dof_quantities |
Every quantity the project measures at some DOF. |
quantity_dofs |
Every DOF in the whole project measured as |
dofs_source_options |
The data objects a DOFs scene could read its arrows from. |
insert_options |
The entries of the editor's Result drop-down, as [(kind, label)]. |
measured_options |
The objects a responses-against-prediction block can read against |
takes_shapes |
Whether this block may name a shape set. |
dof_references |
References to the excitation and the response DOF figures |
dof_sentence |
The sentence on the DOF figures, naming only those there are: |
instrumentation_text |
The instrumentation section's text, naming only what the project holds. |
project_expectations |
The objects a report of this type draws from, as |
missing_expectations |
The expectations the project does not satisfy yet. |
expectation_satisfiers |
Which objects fill each of the type's Basis slots. |
quantity_order |
The quantities in |
time_data_blocks |
The time plots for one history, one figure per quantity it measures. |
kurtosis_block |
A bar chart of the Pearson kurtosis of every channel of a record. |
paired_density_blocks |
Two densities overlaid, one figure per quantity they share. |
front_matter |
The blocks every report opens with, always in the same order. |
modal_template |
A modal test report from whatever the project holds. |
shock_template |
A shock test report: the transients, and the SRS against its target. |
sine_template |
A sine sweep test report: the tones, and the levels they reached. |
sysid_template |
A system identification report: the measured plant, and its quality. |
transient_template |
A transient replication report: the target waveform and the measured one. |
control_channels_of |
The control channels a specification names, as comparison figures label them. |
control_channel_labels |
The control channels of the specification that |
channel_grid |
The grid the random report lays many control channels out on. |
prune_unbound |
Remove the figures and sections the project cannot fill. |
random_template |
A random vibration report: the specification, the measurement, and how they differ. |
mimo_template |
A multiple-input random vibration report: the control matrix, its |
Classes¶
Report
¶
Report(title: str = 'Report', blocks: Sequence[Mapping[str, Any]] | None = None, marking: str = 'UNCLASSIFIED', marking_color: str = 'ink', features: Sequence[str] | None = None, identity: Mapping[str, Any] | None = None)
An ordered list of blocks, each a plain dict.
title is the report's heading. marking is the classification
marking drawn as a banner across the top and bottom of the rendered
document, 'UNCLASSIFIED' by default; an empty string draws no
banner. marking_color is 'ink' (the page's own text color) or
'red'; any other value is read as 'ink'. features holds the keys
of the report features enabled on it (visualdynamics.report.features),
none by default; with none, the report renders as it always has.
identity holds the author's identification fields and the issue
record (visualdynamics.report.identity), empty by default; it is
drawn only while the report feature report_identity is on. A
block of a kind not in BLOCK_KINDS raises ValueError.
Block shapes:
{'kind': 'text', 'text': str}
(a text block carrying 'section' holds the author's words for
one section of the skeleton, and 'by' who interpreted, in the
discussion; it is drawn only while the report feature
skeleton_sections is on: visualdynamics.report.skeleton.
The deviations section's block may also carry 'findings', the
findings register, drawn only while the report feature
findings is on: visualdynamics.report.findings)
{'kind': 'plot', 'source': name,
'mode': curves|cmif|mac|map|stage|scalogram|
pair|ratio|overlay,
'select': ''|drive|dim:Project.caption_of)
{'kind': 'scene', 'geometry': name, 'shapes': name-or-'',
'dofs': quantity, 'dofs_source': name,
'caption': str}
('dofs' + 'dofs_source' make a DOFs scene: labeled arrows at
every DOF that one data object measures as that quantity)
{'kind': 'table', 'source': name, 'caption': str}
{'kind': 'photo', 'source': Photos-name, 'photo': photo-name,
'caption': str}
{'kind': 'pairs', 'source': MatchedModes-name, 'caption': str}
(the matched-modes table: the committed matches, both sets'
parameters side by side)
{'kind': 'overlay', 'source': MatchedModes-name, 'caption': str}
(the matched pairs animated over each other: both sets'
geometries in one scene, resolved through the object's own
geometry references, each pair phase-aligned)
{'kind': 'bars', 'source': name, 'measured': name,
'mode': error|lines|srs|waveform|kurtosis|sine|snr,
'caption': str}
(a bar chart, one bar per channel: 'error' is each control
channel's RMS error against the specification in decibels and
'lines' the share of its band outside the abort limits; a
shock specification gives SRS deviations and a transient
specification waveform errors; 'kurtosis' reads one record
with no 'measured'; 'sine' compares every sine level in the
project with its tones; 'snr' is the RMS signal-to-noise per
channel, with 'floor' naming the ambient Psd)
{'kind': 'verdict', 'source': Specification-name,
'measured': Psd-name, 'level_label': str}
(the pass/fail box: whether the run passed, read off the
octave-band comparison of measured against source
(compliance.verdict), with the test level it was judged at
beside it under level_label, 'Test level' when absent)
{'kind': 'prediction', 'source': Predictions-name,
'measured': Psd-, Spectrum- or Frf-name,
'level': float or None, 'caption': str}
(each response channel of measured against its prediction
scaled to level, the dB relative to full level it was run at:
a figure per channel and a table of peaks; drawn only while the
report feature prediction is on:
visualdynamics.report.prediction)
{'kind': 'text', 'text': '', 'requirement': dict,
'source': Specification-name, 'measured': Psd-name,
'duration_run': float, 'caption': str}
(a test requirement bound to a run, its values as
core.requirement.TestRequirement.as_record gives them: the
requirement in words and a result table, and the pass/fail box
for the same pair read from it; drawn only while the report
feature test_requirement is on:
visualdynamics.report.requirement)
'select' filters a curves plot to the records the GUI's own filters
would pick: 'drive' is the response==reference diagonal of an FRF,
and 'dim:
Methods:
| Name | Description |
|---|---|
add |
Add a copy of |
remove |
Remove the blocks at |
move |
Move the blocks at |
unbound |
The indices of blocks whose references the project cannot resolve. |
Attributes:
| Name | Type | Description |
|---|---|---|
identity |
dict[str, Any]
|
The report's identification and issue record: plain values, |
features |
list[str]
|
The keys of the report features enabled on this report. |
num_blocks |
int
|
How many blocks the report holds. |
Source code in src/visualdynamics/core/report.py
Attributes¶
identity
property
writable
¶
The report's identification and issue record: plain values, empty by default.
What the keys mean, and the only way they change in step (the
fields entered, the report issued, an amendment made), is
visualdynamics.report.identity. Assigning stores a copy and
refuses anything but a mapping with TypeError.
features
property
writable
¶
The keys of the report features enabled on this report.
Empty by default. Assigning keeps each key once, in the order
given, and refuses anything but strings with TypeError. Which
keys are known, available and allowed together is checked where
features are chosen (visualdynamics.report.features.configure,
Project.report_features); a key that is not known does nothing
when the report is rendered, so a file written by a later
version keeps its choice through this one.
Methods:¶
add
¶
Add a copy of block at index at, or at the end.
Raises ValueError for a block kind not in BLOCK_KINDS.
Source code in src/visualdynamics/core/report.py
remove
¶
Remove the blocks at indices; an index out of range is ignored.
Source code in src/visualdynamics/core/report.py
move
¶
Move the blocks at rows, in order, to just before the block at to.
A to past the end moves them to the end. This is the drop
half of drag-to-reorder.
Source code in src/visualdynamics/core/report.py
unbound
¶
unbound(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> list[int]
The indices of blocks whose references the project cannot resolve.
A reference is unresolved when it is a name that is not in
objects, or a symbolic selector with nothing to pick. The
'source', 'geometry', 'dofs_source' and 'shapes' fields are
checked.
Source code in src/visualdynamics/core/report.py
Functions:¶
source_options
¶
The names of the objects a block of this kind could draw from.
Source code in src/visualdynamics/core/report.py
binding_tokens
¶
Every symbolic token, as {token: (class, banded)}.
The plain types have banded None, meaning not banded, and the
banded tokens ('OctavePsd', 'OctaveSpecification') have True.
Source code in src/visualdynamics/core/report.py
is_banded
¶
Whether the object is on bands (an octave-band PSD or specification) instead of on frequency lines.
binding_types
¶
The types a symbolic binding can name, as {token: class}.
Source code in src/visualdynamics/core/report.py
resolve_binding
¶
resolve_binding(value: str | None, objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> str | None
The object name a binding field refers to.
A literal name is returned unchanged (an empty one as None). A symbolic selector such as '@basis:Frf', '@other:ShapeSet' or '@any:MatchedModes' is resolved against the project when the report is rendered, so a report does not depend on what the objects are named: 'basis' is the first object of the type in the Basis object group, 'other' the first outside it, and 'any' the first anywhere. Without a Basis group, 'basis' is the first of the type and 'other' the second, so a small project with no groups still renders.
A specification never answers for the measurement it bounds: '@basis:Psd' never returns a Specification. A banded object answers only to its own token ('@basis:OctavePsd'), and a more specific kind of the same measurement (multiple coherence for 'Coherence') is ranked after the objects of the exact kind. Returns the name, or None when nothing fits or the selector is not one of the known roles and tokens.
Source code in src/visualdynamics/core/report.py
binding_label
¶
A readable label for a binding, such as 'Basis FRF (auto)' for '@basis:Frf'. A literal name is returned as it is.
Source code in src/visualdynamics/core/report.py
symbolic_options
¶
The symbolic selectors this block could bind instead of a name.
Returned as [(selector, label)], a basis and an other selector for each token that fits the block. A selector keeps a report independent of what the objects are named.
Source code in src/visualdynamics/core/report.py
photo_options
¶
photo_options(block: Mapping[str, Any], objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> list[str]
The photo names held by the Photos object a photo block is bound to.
Source code in src/visualdynamics/core/report.py
shape_options
¶
The names of the shape sets in objects.
base_quantity
¶
The quantity a record's dimension names: 'acceleration' whether the record holds accelerations or their square per hertz.
record_dimensions
¶
The quantities one data array's records hold.
Unknown dimensions and cross terms (a CPSD's acceleration*force) are left out.
Source code in src/visualdynamics/core/report.py
time_dimensions
¶
The quantities the project's time histories hold, sorted.
These are the insert menu's Time (…) entries.
Source code in src/visualdynamics/core/report.py
spectrum_dimensions
¶
The quantities the project's spectra hold, sorted.
These are the insert menu's Spectra (…) entries.
Source code in src/visualdynamics/core/report.py
psd_dimensions
¶
The quantities the project's PSDs hold, sorted.
These are the insert menu's PSD (…) entries.
Source code in src/visualdynamics/core/report.py
series_dof_quantities
¶
Every quantity the selected data measures at some DOF, sorted.
series is [(name, data, records)], with records None for the
whole object, the same form the GUI's selection uses. References
count too: an FRF per unit force names its force DOFs even when no
force channel was kept.
Source code in src/visualdynamics/core/report.py
series_quantity_dofs
¶
series_quantity_dofs(series: Sequence[tuple[str, Any, Sequence[int] | None]], quantity: str) -> list[str]
Every DOF the selected data measures as quantity.
These are the response DOFs of records holding it and the reference
DOFs of records referenced to it, each once, ordered by node.
series is as for series_dof_quantities.
Source code in src/visualdynamics/core/report.py
dof_quantities
¶
Every quantity the project measures at some DOF.
These are the insert menu's DOFs (…) entries.
quantity_dofs
¶
Every DOF in the whole project measured as quantity.
dofs_source_options
¶
The data objects a DOFs scene could read its arrows from.
These are the objects that measure the block's quantity at some DOF.
Source code in src/visualdynamics/core/report.py
insert_options
¶
The entries of the editor's Result drop-down, as [(kind, label)].
The DOFs, Time, Spectra and PSD entries are one per quantity, and only for the quantities the project's data holds.
Source code in src/visualdynamics/core/report.py
measured_options
¶
The objects a responses-against-prediction block can read against predictions: narrowband PSDs, amplitude spectra and sine levels, and FRFs, never a specification or an octave-band PSD.
Source code in src/visualdynamics/core/report.py
takes_shapes
¶
Whether this block may name a shape set.
A scene animates one, a CMIF overlays its resynthesis, a MAC is computed against it, a drive point plot marks its frequencies, and the matched-modes table takes one too.
Source code in src/visualdynamics/core/report.py
dof_references
¶
dof_references(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None, dofs_source: str) -> tuple[str, str]
References to the excitation and the response DOF figures
front_matter builds for dofs_source, '' for a role with none.
A run controlled on accelerometers alone has no force channels and so no excitation figure; a reference to one would print as written. Two excitation figures (force and voltage) are referred to together. A project with no geometry draws no DOF figures at all. With no project behind the template, the references are the generic ones the outline is read with.
Source code in src/visualdynamics/core/report.py
dof_sentence
¶
The sentence on the DOF figures, naming only those there are:
where and driven for the excitation, measured for the response.
Starts with a space so it follows the sentence before it; '' when
there is neither.
Source code in src/visualdynamics/core/report.py
instrumentation_text
¶
instrumentation_text(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None, dofs_source: str = '@basis:TimeHistory') -> str
The instrumentation section's text, naming only what the project holds.
The text refers to the geometry, the DOF figures and the channel
table. A run imported without a geometry has no geometry or DOF
figures, and a paragraph about "the test geometry" above a channel
table alone reads as a report with parts missing; the text is then
the channel table's sentence, and the photographs' sentence when
there are photographs. With a geometry, it names the DOF figures
built for dofs_source (dof_references). An empty project keeps
the standard text, since there the template itself is being read.
Source code in src/visualdynamics/core/report.py
project_expectations
¶
The objects a report of this type draws from, as [(label, class, icon key, count, optional, side)].
These are the gray slots a typed project shows until they are
filled. The label is the display name of the class the slot waits
for, so a skeleton reads the same in every project type. A type
that expects several objects of one class shows the same label
several times, and count says which instance (first, second, ...)
fills which slot. The side is 'Basis', OTHER_SIDE, or None for a
slot on neither side (the report, the matched modes). A project
knows its Basis, and everything else is on the other side; the
other side is a place in the tree and not a role, so its group has
no name and objects are never guessed into it, since a second test
is as good a comparison as a model. optional marks the
recommended slots a report can be rendered without. An unknown
project type gives an empty list.
Every type ends with the report itself. The report is what the other objects exist to produce, and a project that has everything a report needs but no report is not finished, so it is a slot like the rest, gray until it is generated. It is in no object group, because a report reads the whole project. A Random and Sine project has two report slots, one for the random report and one for the sine report.
Source code in src/visualdynamics/core/report.py
871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 | |
missing_expectations
¶
missing_expectations(project_type: str, objects: Mapping[str, Any], placed: Mapping[str, Sequence[str]] | None = None) -> list[tuple[str, type, str, int, bool, str | None]]
The expectations the project does not satisfy yet.
They are in the form project_expectations gives.
placed is {side: [object names]}, the objects in each side's
groups: Project.placed() for the Basis, and under OTHER_SIDE
every member of every other group (the window adds that key). A
slot is filled only by an object on its own side, never by one
anywhere in the project: a modal test whose only geometry is the
model's still needs a measured one.
A slot with no side (the report) is filled from the whole project,
since that is what a report reads. With placed omitted, every
object counts for every slot, for callers that have no groups to
offer.
Source code in src/visualdynamics/core/report.py
expectation_satisfiers
¶
expectation_satisfiers(project_type: str, objects: Mapping[str, Any], placed: Mapping[str, Sequence[str]] | None = None) -> dict[str, list[str]]
Which objects fill each of the type's Basis slots.
Returned as {object group: [object names]}.
The result is used to link the Basis members together. The n-th instance of a class, in project order, fills the slot whose count is n (a banded slot takes the first banded object). Slots on the other side have no group name and are never filled by a guess: a second geometry and shape set are linked by hand, or by the file that brought them in.
The project order is only a guess, since the first geometry
imported could belong to either group and nothing about the object
says which. Objects already placed are therefore taken as given:
pass placed (from Project.placed()) and each placed object
counts only for the group it is in. The groups in placed are
returned with the guessed members added.
Source code in src/visualdynamics/core/report.py
quantity_order
¶
The quantities in dims in reading order.
Voltage, then force, then acceleration (the order of
DOF_SCENE_QUANTITIES, which the DOF scenes follow), then any
other quantity in alphabetical order.
Source code in src/visualdynamics/core/report.py
time_data_blocks
¶
time_data_blocks(source: str, objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None, caption: str, per_quantity: str, mode: str = 'curves', averaging: bool = True) -> list[dict[str, Any]]
The time plots for one history, one figure per quantity it measures.
An axis holds one quantity, so a stream with drive voltages beside
response accelerations is drawn as two figures. per_quantity is
the caption with a {quantity} placeholder; a source with one
quantity, or an unbound one, gets a single figure with the plain
caption. The placeholder is filled by str.replace, because a
caption may hold a live reference ({{Object.field}}) whose double
braces str.format would collapse.
The figures are flat (mode='curves') by default, because time
histories are by far the largest data in a report and a 3-D stage
figure of them makes the file very large. The flat figure pages its
channels two dozen at a time and draws each page as an envelope on
one shared time axis. mode='stage' is available for a template
that wants depth. averaging=False leaves the averaging frames off
the figures, for a reading that averages nothing.
Source code in src/visualdynamics/core/report.py
kurtosis_block
¶
A bar chart of the Pearson kurtosis of every channel of a record.
Kurtosis shows something a spectrum cannot: two records with
identical PSDs can be a smooth hiss and a train of rare large
peaks, and only the second fatigues an article the way the peaks
suggest. All channels go on one chart whatever they measure, since
kurtosis is dimensionless. It is a computed result, so templates
place it with the other computed results after the spectra, not
beside the time traces. caption defaults to a description of the
Gaussian band.
Source code in src/visualdynamics/core/report.py
paired_density_blocks
¶
paired_density_blocks(loud: str, quiet: str, objects: Mapping[str, Any], caption: str, per_quantity: str) -> list[dict[str, Any]]
Two densities overlaid, one figure per quantity they share.
loud is drawn solid and quiet (the ambient) dashed in each
channel's own color, with the same one-quantity-per-axis rule and
reading order as time_data_blocks. The figures are flat and
continue into further figures past a dozen channels. Either name
empty gives no blocks.
Source code in src/visualdynamics/core/report.py
front_matter
¶
front_matter(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None, dofs_source: str) -> list[dict[str, Any]]
The blocks every report opens with, always in the same order.
The test geometry, then a DOF scene for each quantity dofs_source
measures (excitations before responses; every quantity in
DOF_SCENE_QUANTITIES when the source is not there yet), then the
photographs, then the channel table: what was tested and where it
was instrumented, before any data. Every reference is symbolic, and
an unbound or empty block is not rendered, so a bare project keeps
the outline without blank figures.
Source code in src/visualdynamics/core/report.py
1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 | |
modal_template
¶
modal_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
A modal test report from whatever the project holds.
The sections are the test summary, the setup and front matter, the measured time data and averaged PSDs, data quality (drive point FRFs and multiple coherence), the modal analysis (the CMIF with its resynthesis, the identified parameters, the auto-MAC and the animated shapes), an optional test-analysis correlation (cross-MAC, matched modes and their overlay), and conclusions. Sources bind symbolically ('@basis:Frf' and the like, resolved against the object groups when the report is rendered), so the report does not depend on what the objects are named. Blocks whose type the project lacks are still added, unbound, so the outline of a full modal report is there to fill in.
Source code in src/visualdynamics/core/report.py
1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 | |
shock_template
¶
shock_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
A shock test report: the transients, and the SRS against its target.
After the front matter, the measured time histories come first. A shock is a single event, and its character (how long it lasted, how many events there were, whether the article was still ringing when the next one arrived) is in the trace and not in the spectrum. Then come the filtered record, velocity and displacement where the project has them, a scalogram of the filtered record, the shock specification on its own, the measured SRS against it, and the SRS deviation bars. There is no kurtosis figure, because a shock record is a transient in a long quiet stretch and never reads near three.
Source code in src/visualdynamics/core/report.py
1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 | |
sine_template
¶
sine_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
A sine sweep test report: the tones, and the levels they reached.
After the front matter and the measured time histories (drawn
without averaging frames, since nothing is averaged), each tone
gets a figure of its extracted level against the requirement, and
one bar chart gives the signed deviation of every tone at every
control channel against a threshold of 3 dB, as the random and
shock reports do. A kurtosis chart and conclusions follow. A Random
and Sine project gets this report and a random report
(PROJECT_TEMPLATES); when the project holds a random
specification, this report says that the random is judged in its
own report.
Source code in src/visualdynamics/core/report.py
2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 | |
sysid_template
¶
sysid_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
A system identification report: the measured plant, and its quality.
The order is the one every report follows: the front matter (geometry, DOF scenes, photographs, channel table), then the time data, then the spectra, then the computed results. The time data is the ambient (noise) recording first and the driven one after it, each drawn with its own averaging frames; a spectral package has no recordings, and the block stays an unbound slot that is not rendered. The spectra are the driven and ambient densities overlaid per channel and the magnitude of every FRF. The computed results are the multiple coherence map, which shows where the drives account for the responses, the signal-to-noise ratio per line and its RMS per channel, which show how far the driven measurement is above the noise floor, and the kurtosis of both recordings.
The two densities and the two recordings are bound by name, the louder as the driven one and the quieter as the ambient one, since no symbolic selector picks "the second PSD".
Source code in src/visualdynamics/core/report.py
2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 | |
transient_template
¶
transient_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
A transient replication report: the target waveform and the measured one.
A transient test has a target waveform, a measured one, and the difference between them, so the report is built around comparing the two. After the front matter come the transient specification, the measured control response, an overlay of the first playing on the target waveform channel by channel (compared by eye, sample against sample), the drive forces, and a scalogram of the control response. Two numerical readings follow: the control PSDs against the PSD specification with the RMS error per control channel, and the waveform error per control channel and per playing. There is no accepted tolerance for how closely a replicated transient must follow its target, so the threshold on the waveform chart is a visual reference, not a pass mark. A kurtosis chart and conclusions end the report.
Source code in src/visualdynamics/core/report.py
2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 | |
control_channels_of
¶
The control channels a specification names, as comparison figures label them.
These are the channels of its autospectra, in its own order; a cross term has no measured response to compare with. A sine sweep specification's control channels are its response DOFs. Empty for anything that is not a specification.
Source code in src/visualdynamics/core/report.py
control_channel_labels
¶
control_channel_labels(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None, token: str = '@basis:Specification') -> list[str]
The control channels of the specification that token binds.
Labeled as the comparison figure labels them (control_channels_of);
each gets its own figure in the random report. Empty when the token
binds nothing yet, in which case the template writes one figure
with a channel selector.
Source code in src/visualdynamics/core/report.py
channel_grid
¶
The grid the random report lays many control channels out on.
There is a row per node, in the order the channels first name
them, and a column per direction. With a geometry that can place a
channel (Geometry.dof_direction), the columns are the global
axes ('Global X', 'Global Y', 'Global Z'), a channel goes under the
axis its measured direction is nearest, and the angle it is off
that axis is noted when it is half a degree or more. Without a
geometry, or for a node the geometry cannot place, the columns are
the DOF's own direction letters, and a channel with no direction at
all (a node number alone) goes in a 'Channel' column. Only the
columns in use appear, in that order. When no channel has a
direction, the channels are laid across one row, a column each,
headed by their own names.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
labels
|
sequence of str
|
The control channels, as |
required |
geometry
|
Geometry
|
The geometry the channels are measured on. |
None
|
Returns:
| Type | Description |
|---|---|
dict
|
'columns', the column headings; 'rows', one dict per node with 'label' and 'cells', a list per column of the channels in it, each {'channel': str, 'note': str}. |
Source code in src/visualdynamics/core/report.py
2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 | |
prune_unbound
¶
prune_unbound(report: Report, objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
Remove the figures and sections the project cannot fill.
Every unbound figure is removed, and so is every section with no bound figure.
A section is a text block opening with a ## heading and what
follows it up to the next heading; its figures are the blocks in it
that are not text. When none of them can be resolved (the
section's objects are not in the project), the whole section is
removed, heading and text included, so there is no heading over
nothing. When some can, only the ones that cannot are removed, so
the editor shows no unbound cards for a run that has no geometry.
A section with no figures (the summary, the conclusions) stays, and
so does a skeleton section's own text block (one carrying
'section', report feature skeleton_sections) wherever it sits. An
empty project keeps the whole outline, since there the template
itself is being read. report is changed in place and returned.
Source code in src/visualdynamics/core/report.py
random_template
¶
random_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
A random vibration report: the specification, the measurement, and how they differ.
The pass/fail box comes first, under the title, read off the
octave-band comparison. Then the order every report follows: the
front matter (geometry, the DOF scenes with excitations first,
photographs, the channel table), the time data, the spectra, and
the computed results. The specification is not drawn on its own:
it is the target and the shaded limits behind each control
comparison, one figure per control channel (a grid past
GRID_ABOVE channels). The RMS error and the band outside the
abort limits follow as bar charts, then the same comparison on
octave bands. The data quality checks, multiple coherence and
kurtosis, come last, because they are how a real exceedance is
told from a bad channel once the comparison has raised the
question.
Sources bind symbolically, like the modal template's, and the
report is passed through prune_unbound, so a run with no
geometry still renders without empty figures.
A Random and Sine project gets this report and a sine report
(PROJECT_TEMPLATES). When the project holds a sine sweep
specification, this report adds what a reader of the random half
needs to know: the control spectra include the sweep's power across
the band it swept, so a channel reading high there may be the tone,
and a kurtosis under three comes from the sweep, not from clipping.
Source code in src/visualdynamics/core/report.py
2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 | |
mimo_template
¶
mimo_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
A multiple-input random vibration report: the control matrix, its specification, and what stood between them.
A run controlled to a cross-spectral density matrix is judged on
the matrix, not channel by channel: the diagonal holds each control
channel's level, and off it each pair's coherence and phase. The
report follows the random report's order (random_template): the
front matter and the record first, then what was asked for and
whether the rig could give it (the transformation, the
specification's realizability, the plant's conditioning and the
drives), then the result (the diagonal against its specification,
the matrix grid and the cross-term verdicts), the data quality, and
the conclusions.
Nothing here computes. Each figure is a block the report already
draws: the diagonal comparisons with their record captions and the
two compliance bar charts, as in the random report; the singular
values of the FRF matrix as the CMIF, the matrix the Conditioning
reading reads; the multiple coherence map and the kurtosis. A
section whose reading no block draws (the transformation,
realizability, the condition number, the drive prediction, the
matrix grid, the cross-term verdicts, the reference and partial
coherence) is written as owed, OWED and a line saying what
belongs there and which reading gives it, and a section that needs
an object the project does not hold says which. The cross terms
of a run or a specification that holds none, or of a project
without one of the two, are written as not judged and why, never
as a pass. There is no pass/fail box: the octave-band verdict reads
the diagonal alone.
Sources bind symbolically, and the report is passed through
prune_unbound, so a run with no geometry still renders without
empty figures; an empty project keeps the whole outline.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
objects
|
mapping of str to object
|
The project's objects by name. |
required |
object_groups
|
sequence of mapping
|
The project's object groups, which the symbolic sources resolve against. |
None
|
Returns:
| Type | Description |
|---|---|
Report
|
|
Source code in src/visualdynamics/core/report.py
3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416 3417 3418 3419 3420 3421 3422 3423 3424 3425 3426 3427 3428 3429 3430 3431 3432 3433 3434 3435 3436 3437 3438 3439 3440 3441 3442 3443 3444 3445 3446 3447 3448 3449 3450 3451 | |