visualdynamics.io.rattlesnake_sine¶
rattlesnake_sine
¶
Rattlesnake sine specification files (.npz): one tone per file.
The controller's sine environment saves each specification the way
its own save_specification writes it: frequency (the breakpoints),
amplitude (channels by breakpoints, the table's column transposed),
sweep_type and sweep_rate per segment, and when the version
writing it had them, phase in degrees, warning and abort as
(lower/upper, left/right, channels, breakpoints), start_time and
name. Older files hold the first five only (Brandon, 2026-10-02: nine
such files, one per sweep, refused as "an npz archive holding 5
arrays").
The file names no channels and carries no units. The channels come
back as the controller's own order, '1', '2', ... — which is also what
a run through a response transformation records them as — unless
response_dof names them; the amplitudes come back as written unless
ordinate_unit says what they are in. Nine files are nine
specifications of one tone each; Project.merge joins them into one.
Functions:
| Name | Description |
|---|---|
sniff |
The four arrays every sine specification carries, and not the |
load |
One tone, as the controller wrote it. |
Classes¶
Functions:¶
sniff
¶
The four arrays every sine specification carries, and not the random specification's own pair — the two formats share a writer family and nothing else.
Source code in src/visualdynamics/io/rattlesnake_sine.py
load
¶
load(path: str | PathLike, response_dof: Sequence[str] | None = None, ordinate_dim: str = 'acceleration', ordinate_unit: str | None = None) -> SineSweepSpecification
One tone, as the controller wrote it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
str or PathLike
|
The |
required |
response_dof
|
sequence of str
|
The control channels the amplitude columns belong to, in the file's order. Defaults to '1', '2', ... — the controller's channel order, which is what a transformed run calls them. |
None
|
ordinate_dim
|
str
|
What the amplitudes measure; acceleration unless said. |
'acceleration'
|
ordinate_unit
|
str
|
The amplitudes' unit. None keeps the file's raw values, to be read beside data in the same unit. |
None
|