Skip to content

hertzforge.io.modal_run

modal_run

A Modal Test run folder's results as analysis objects.

run_convert.convert hands a Modal Test run (WIRE['test']) here for its measurements; everything else about the run (the channel table, the run record, the object group, the file) is converted as every run's is. What a Modal Test run becomes:

  • The channel table: as every run's, with each row the run's setup names as a reference (its check's references, the hammer or the shakers' force gauges) given the analysis role reference (reference_rows).
  • Measurement frames: a TimeHistory per measurement holding its accepted hits or frames, cut from the input stream by each frame line's span, a record per channel per frame, each channel at the DOF it had in that measurement (a roving channel at the point measured), in SI, timed from the trigger (an impact's pre-trigger samples at negative times) or from the frame's start. Each record's comment says the measurement, the point, the hit and what the run checked of it: the hammer's polarity, the peak force, the distance from a force target and its verdict, any warning, a double hit's second peak and ratio, and the decay check. Rejected and undone hits are not in it: they stay in the stream, and the run record's frame lines say what each was. A shaker's drive stream is in the same history, as monitors.
  • modal_frf: one Frf of every measurement's FRFs, each record a response against a reference at the DOFs the measurement named, in SI from the channel rows' units; a point measured again replaces what the earlier measurement gave. Each record's comment says the estimator, the averages, the measurement and point, the decay check, and the windows (the force window in samples and the exponential window's time constant, which core.modal_test.frf_tau reads back after a save). The averaging holds the block, the averages and the analysis window.
  • modal_frf fixed reference: for a test whose excitation roved (its roving channels are reference rows; with no roving plan, more reference DOFs than response DOFs), the same FRFs turned round by reciprocity (core.modal_test.fixed_reference), marked so on every record, the form a modal fit takes; with its ordinary coherence turned the same way.
  • modal_coherence: the ordinary coherence of each response (one reference) as a Coherence, or each response's multiple coherence (several references) as a MultipleCoherence, by the array the result holds.
  • modal_reference_spectra: each measurement's reference autospectra as a Psd, a record per reference per measurement; with several references the condition number of their spectral matrix per line stays in the run record as an array.
  • modal_frames and modal_outcome stay in the run record whole: the frame lines with every hit's checks, and the points planned and measured, the hits or frames taken and accepted and how the test ended.

Every name read from the folder is in WIRE, the one table to change when the control service's spelling does; tests/run_folders.py writes its synthetic folders from the same table.

Functions:

Name Description
reference_rows

The table indexes of the rows a Modal Test run's setup names as its

frames

Each measurement's accepted hits or frames as a TimeHistory, by

findings

What a Modal Test run's checks found, in words a report can print,

results

The analysis objects of a Modal Test run's results.

Functions:

reference_rows

reference_rows(run: RunFolder) -> list[int]

The table indexes of the rows a Modal Test run's setup names as its references (the setup's check: the hammer, or each shaker's force gauge).

The control service's table holds a force gauge as an input row whose analysis role is reference; the general mapping of a control table (run_convert.channel_table_from_rows) reads an input row as a response, so the converter gives these rows the role reference.

Parameters:

Name Type Description Default
run RunFolder

A Modal Test run.

required

Returns:

Type Description
list of int

frames

frames(run: RunFolder, table: Any, lacked: list[str]) -> list[tuple[str, Any]]

Each measurement's accepted hits or frames as a TimeHistory, by name.

Parameters:

Name Type Description Default
run RunFolder

A Modal Test run.

required
table ChannelTable

Its channel table as armed (run_convert.channel_table_from_rows).

required
lacked list of str

What the run lacked, in words; appended to.

required

Returns:

Type Description
list of (str, TimeHistory)

findings

findings(record: Any) -> list[str]

What a Modal Test run's checks found, in words a report can print, from its run record (core.run_record.RunRecord): each finished measurement whose response had not decayed by the block's end ("response not decayed at point 3, 3.1 % at row 4"), and each hit rejected as a double hit, with its second peak and ratio. Empty for a run with no such finding, or one written before the checks existed.

Parameters:

Name Type Description Default
record RunRecord

A Modal Test run's record.

required

Returns:

Type Description
list of str

results

results(run: RunFolder, table: Any, lacked: list[str]) -> tuple[list[tuple[str, Any]], set[str], dict[str, dict[str, ndarray]]]

The analysis objects of a Modal Test run's results.

Parameters:

Name Type Description Default
run RunFolder

A Modal Test run.

required
table ChannelTable

Its channel table as armed.

required
lacked list of str

What the run lacked, in words; appended to.

required

Returns:

Type Description
(list of (str, object), set of str, dict)

The objects by name, in order; the results they came from (or that stay in the run record whole), which the general mapping leaves alone; and the arrays of those results the run record keeps.