visualdynamics.core.time_compare¶
time_compare
¶
Time-history pairing, shared clocks, and time response assurance.
Functions:
| Name | Description |
|---|---|
response_records |
Records whose channel role is response, leaving force references out. |
retarget_pairs |
Keep saved pair identities and their recipes following renamed objects. |
match_records |
Resolve explicit pairs, or match exactly two responses per channel key. |
compare |
Put paired SI responses on a shared clock without fitting their values. |
sides |
Return the two paired sides with shared station labels for plotting. |
scores |
TRAC, signed correlation, and amplitude ratio for every saved pair. |
Classes¶
Functions:¶
response_records
¶
response_records(data: TimeHistory) -> list[int]
Records whose channel role is response, leaving force references out.
Source code in src/visualdynamics/core/time_compare.py
retarget_pairs
¶
Keep saved pair identities and their recipes following renamed objects.
Source code in src/visualdynamics/core/time_compare.py
match_records
¶
match_records(project: Any, sources: list[str], pairs: Any = None, records: Any = None) -> list[list[Any]]
Resolve explicit pairs, or match exactly two responses per channel key.
Explicit pairs are (left name, record, right name, record). They can map different node labels, but never different quantities or undefined units. Automatic matching uses signed DOF, dimension, and dimension hint. A missing or repeated match is refused rather than guessed from a name.
Source code in src/visualdynamics/core/time_compare.py
compare
¶
compare(project: Any, sources: list[str], *, pairs: Any = None, records: Any = None, start: float | None = None, stop: float | None = None) -> TimeHistory
Put paired SI responses on a shared clock without fitting their values.
The coarsest source clock is retained inside the common overlap; other rows are linearly interpolated to it, without extrapolation. No lag, sign, amplitude fitting, detrending, or spectral filtering is performed. The full common overlap is stored; start/stop limit the score and view.
Source code in src/visualdynamics/core/time_compare.py
sides
¶
sides(data: TimeHistory, window: tuple[float, float] | None = None) -> tuple[TimeHistory, TimeHistory]
Return the two paired sides with shared station labels for plotting.
The comparison's original right-side identities stay in its mapping; the temporary display arrays use the left DOFs on both sides so a manually mapped pair occupies one station. A window restricts the displayed samples to its inclusive bounds.
Source code in src/visualdynamics/core/time_compare.py
scores
¶
scores(data: TimeHistory, start: float | None = None, stop: float | None = None) -> list[dict[str, Any]]
TRAC, signed correlation, and amplitude ratio for every saved pair.
A zero, constant, or nonfinite record has no reported score; its reason travels with the row instead of a false pass. TRAC is the squared normalized inner product, so sign reversal and constant gain leave it unchanged. Signed correlation and RMS ratio make those limits visible. sTRAC is the signed least-squares multiplier from the second trace to the first, with an ideal value of one.