hertzforge.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. |
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. |
geometry_sentence |
The sentence citing the geometry figure, 'The test geometry |
front_matter |
The blocks every report opens with, always in the same order. |
transformation_blocks |
A table block for each transformation a control loop of the |
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 |
model_template |
A finite element model report, the Model module's default: the model |
specify_template |
A specification report, the Specify module's default: each kind of |
signals_template |
A signals report, the Signals module's default: the time histories |
run_record_block |
The Run section: what the control service's record says of the run, |
mixed_template |
A Mixed Mode report: the random floor, the tones and the |
explorer_template |
An Explorer run's report: a tone steered by hand, its survey and |
recorder_template |
A Recorder run's report: what was recorded, when it triggered, and |
mimo_shock_template |
A MIMO Shock report: one shock at a time on several shakers, each |
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 (hertzforge.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 (hertzforge.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: hertzforge.report.skeleton.
The deviations section's block may also carry 'findings', the
findings register, drawn only while the report feature
findings is on: hertzforge.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;
'dofs_geometry' names the geometry it was measured on, and its
DOFs are then placed on the scene's geometry by position.
'node_dots' draws or leaves off the nodes' dots, which are
drawn on at most report.NODE_DOT_LIMIT nodes when unset)
{'kind': 'table', 'source': name, 'caption': str}
(with 'environment' and 'form' 'response' or 'reference', a
channel table's block is that control loop's transformation
instead: transformation_blocks)
{'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:
hertzforge.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:
hertzforge.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. |
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
hertzforge.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 (hertzforge.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.
remove
¶
Remove the blocks at indices; an index out of range is ignored.
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.
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.
Functions:¶
source_options
¶
The names of the objects a block of this kind could draw from.
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.
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}.
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. A geometry is the one exception: with none in the Basis group, 'basis' is the first geometry 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.
binding_label
¶
A readable label for a binding, such as 'Basis FRF (auto)' for '@basis:Frf'. A literal name is returned as it is.
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.
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.
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.
time_dimensions
¶
The quantities the project's time histories hold, sorted.
These are the insert menu's Time (…) entries.
spectrum_dimensions
¶
The quantities the project's spectra hold, sorted.
These are the insert menu's Spectra (…) entries.
psd_dimensions
¶
The quantities the project's PSDs hold, sorted.
These are the insert menu's PSD (…) entries.
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.
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.
dof_quantities
¶
Every quantity the project measures at some DOF.
These are the insert menu's DOFs (…) entries.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
geometry_sentence
¶
geometry_sentence(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None, dofs_source: str, says: str) -> str
The sentence citing the geometry figure, 'The test geometry
(Figure n) says', when front_matter draws the geometry alone for
dofs_source; '' when the DOF scenes draw it instead.
front_matter
¶
front_matter(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None, dofs_source: str, kind: str | None = None) -> list[dict[str, Any]]
The blocks every report opens with, always in the same order.
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. Each DOF scene draws the whole geometry with its sensors, so
the plain geometry figure opens the list only when no DOF scene is
known to draw: a project with no source or no geometry yet, or one
whose DOFs land on no node of it. Every reference is symbolic, and
an unbound or empty block is not rendered, so a bare project keeps
the outline without blank figures. kind picks the control loops
whose transformations follow the channel table
(transformation_blocks); every loop's when it is None.
transformation_blocks
¶
transformation_blocks(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None, kind: str | None = None) -> list[dict[str, Any]]
A table block for each transformation a control loop of the basis channel table ran, after the instrumentation table.
With kind ('random', 'sine', 'transient'), only the loops of that
kind count: a mixed run's random and sine may control through
different matrices, or one through a matrix and the other through
none, and each report shows its own. A loop whose kind is unknown
(a table saved before the kind was kept) counts only when it is the
table's one loop, since nothing else says which report it is for.
The response transformation's rows are what the controller
controlled in place of its control channels, and the reference
transformation's are what it drove in place of its drive channels;
the columns are those channels, headed by their DOFs
(ChannelTable.transformation). A loop with no transformation adds
nothing, and neither does a project with no channel table.
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.
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.
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.
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".
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.
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.
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.
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}. |
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.
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 (the DOF scenes with excitations first, each drawing
the geometry and its sensors, then photographs and 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.
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
|
|
model_template
¶
model_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
A finite element model report, the Model module's default: the model as it was built, then its normal modes. The geometry and the shape set bind to the first of each in the project ('@any'), since a model need not be in the Basis group a test's objects are in.
specify_template
¶
specify_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
A specification report, the Specify module's default: each kind of specification the project holds drawn with its limits. A kind the project does not hold stays an unbound slot and is not drawn.
signals_template
¶
signals_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
A signals report, the Signals module's default: the time histories and the spectra the project holds, one figure per quantity, after the front matter every report opens with.
run_record_block
¶
run_record_block(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None, extra: Sequence[tuple[str, str]] = ()) -> dict[str, Any]
The Run section: what the control service's record says of the run,
each line a live reference to the run record, and extra (label,
field) lines a test adds. A project with no run record says so and
leaves the facts to the author; nothing is read in their place.
mixed_template
¶
mixed_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
A Mixed Mode report: the random floor, the tones and the narrowbands on top of it, controlled together on one drive.
After the summary and the front matter, the run as its record has it,
the measured data, the floor's control spectra against the floor's
specification, the spectra with the tones taken out, the tones as
specified, each part's last level at the highest level the run
reached as the controller measured it (from the record's levels),
the identification, the drive, the data quality and the
conclusions. Sources bind symbolically, the residual and drive
spectra by the names the conversion gives them; the report is
passed through prune_unbound.
explorer_template
¶
explorer_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
An Explorer run's report: a tone steered by hand, its survey and what the run measured.
The survey line and the display spectra are magnitudes with no phase, which no analysis class holds; they stay in the run record and are given here in words from it, with their units. The streams are drawn as time histories.
recorder_template
¶
recorder_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
A Recorder run's report: what was recorded, when it triggered, and what each row held over the run.
A Recorder run has no law and no results; its record holds its recordings, each with its trigger and pre-window, the marks and overloads in its log, and each row's statistics over the run. The recordings are drawn as time histories, the pre-trigger samples at negative times.
mimo_shock_template
¶
mimo_shock_template(objects: Mapping[str, Any], object_groups: Sequence[Mapping[str, Any]] | None = None) -> Report
A MIMO Shock report: one shock at a time on several shakers, each control point judged against its own target.
The figures bind as the Classical Shock and SRS reports' do: the measured transients, each control's shock response spectrum against its specification and the deviation bars, and the identified plant's singular values. The run section reads the run record through the same live references every recorded test uses. The per-control verdict grid, the delays between points and the ladder (pulses fired and passed at each level) are written as owed and say they wait for the module's run record; nothing is read in their place.