visualdynamics.core.mixed_mode¶
mixed_mode
¶
A mixed-mode test as one specification, and its data sheet.
A sine-on-random or random-on-random test is controlled to one drive
made of parts: a broadband random floor written as breakpoints, tones
written in amplitude (peak), fixed or swept, and narrow bands of random
laid over the floor, fixed or swept. Each part is judged by its own
rule, and the parts are only told apart if the specification says which
is which. MixedSpecification says it: the floor (a Specification),
the tones (a SineSweepSpecification), the narrowbands (Narrowband)
and the width left out of the floor either side of each tone.
Nothing new is written to a file for it. The floor is saved as the
random specification it is and the tones as the sine specification they
are, the two objects a random and sine project already holds. A fixed
tone is the dwell a controller's file writes, a linear segment across a
hair of a hertz (SineTone.dwell), so no segment type is added; the
tone table (Tone) is the form it is entered and read in. The
narrowbands and the width left out are attributes of the floor
(Specification.narrowbands, Specification.tone_exclusion), saved
with it the way its band constraints are.
judge_mixed reads a record against it, one channel at a time:
- Where the tones begin in the record is found by matched filter
(
core.sine.find_environment), unless an onset is given. Each tone is read through a tracking band locked to its frequency (core.sine_tracking.track_sine), the way a controller reads it. The band settles in about one over its width, so the readings before that are not used; the tone's level is the median of the rest, in amplitude, compared with the tone table, by default at plus or minus 10 percent (an example of what test documents ask for). The median, not the rms of the readings' deviation in dB that a sweep comparison scores (core.compliance.sine_errors): a small tone near the floor scatters through its band from reading to reading, and that scatter is the floor's, not an error in the tone's level. - What each band passed (
track_waveform) is taken out of the record. What is left, the residual, is the floor and the narrowbands, and its averaged autospectrum is read for them. - The floor is judged on the residual's lines with the lines that held
a tone, and the lines of every narrowband, left out. A line held a
tone when the tone spent at least
LEFT_OUT_SHAREof its run within the left-out width of it: every line beside a fixed tone, and few or none of the lines a long sweep passes, which it holds only briefly. The floor is judged as a comparison is (core.compliance.judge, line by line against the reference and the reference moved by the line tolerance, by default plus or minus 3 dB): its rms against the reference's over the same lines (by default plus or minus 10 percent), and its lines outside against the number chance puts outside at their degrees of freedom. An averaged line scatters, so a correctly controlled floor of a few hundred lines has some outside a 3 dB band on a short record; the lines fail only when more are outside than chance would put there one time in a thousand (FLOOR_CHANCE). A floor with no line left to judge is not judged, and the reading says so. - Each narrowband is judged at the degrees of freedom a narrow band
has, which are fewer than the floor's. A fixed band's level is the
mean of the residual's lines between its edges, worth what those
lines are worth together: adjacent lines vary together under a
window, so the degrees of freedom are
chance's count for combined lines with the averaging's own line correlation. A swept band is read in slices of the run, each half as long as the band takes to move its own width, over the lines within a quarter of its width of its center at the slice's middle, which the band covered for the whole slice. Each slice is worth only the frames it holds. A swept band's level is its slices pooled, each weighted by its degrees of freedom, and is worth their sum; the share of slices that lie inside the tolerance widened to their own scatter is reported beside it, as how far the band wandered moment to moment. A band's tolerance is the one the plan states (tolerance_db), or the floor's line tolerance, widened in either case to the chi-square scatter of an estimate at those degrees of freedom (90 percent by default), so a band of few degrees of freedom is not failed for scatter wider than its tolerance. A band with no line under it, or a swept band with no slice, is not judged; so is a swept band when the onset was found from steady tones alone, which place where they play but not where the environment, and the band's sweep with it, begins. - The total is the rms of the whole record over the span read, every line of the composite's autospectrum. It has no tolerance: it is the figure the amplifier, the coil and the fixture see.
The parts are independent, so their mean squares add: the reference total is the root of the floor's mean square, each tone's A²/2 and each band's level times its width.
References
The tracking band is core.sine_tracking's. The averaged periodogram,
its degrees of freedom and the chi-square scatter of an estimate are
core.averaging's; that a band of width B averaged over T seconds is
worth about 2BT degrees of freedom is the band-limited estimate's
normalized random error.
- Bendat, J. S., & Piersol, A. G. (2010). Random Data: Analysis and Measurement Procedures, 4th ed. Wiley. The autospectrum's normalized random error, 1/sqrt(B T) for a band B wide averaged over T, and the chi-square distribution of an averaged autospectrum, by which a line's scatter and its chance of lying outside the line tolerance are read.
- Welch, P. D. (1967). "The Use of Fast Fourier Transform for the Estimation of Power Spectra." IEEE Transactions on Audio and Electroacoustics, 15(2), 70-73. doi:10.1109/TAU.1967.1161901 The variance of an average of overlapped, windowed frames.
Classes:
| Name | Description |
|---|---|
Narrowband |
A narrow band of random laid over the floor: a rectangle of |
Tone |
One row of a mixed test's tone table: a tone at a fixed frequency |
MixedSpecification |
A mixed-mode test's requirement as one object: the floor, the |
FloorRow |
The floor's row of the data sheet, in SI. |
ToneRow |
One tone's row of the data sheet, in SI. |
BandRow |
One narrowband's row of the data sheet, in SI. |
TotalRow |
The total's row: the rms of the whole drive, which has no |
MixedReading |
A record read against a mixed specification: what |
Functions:
| Name | Description |
|---|---|
narrowbands_json |
Narrowbands as the text a file holds them in: a JSON list of |
narrowbands_from_json |
The narrowbands |
tone_span |
(low, high), the frequencies a tone passes, in Hz. |
held_share |
The share of a tone's run it spends within |
tone_mean_square |
A tone's mean square as written: A²/2 for a tone held at one |
mixed |
|
settling_seconds |
How long a tracking band takes to settle: about one over its |
judge_mixed |
Read one channel of a record against a mixed specification, part |
Classes¶
Narrowband
dataclass
¶
Narrowband(center: float, level: float, width: float | None = None, share: float | None = None, sweep_to: float | None = None, rate: float | None = None, mode: int = LINEAR, tolerance_db: float | None = None, name: str = '')
A narrow band of random laid over the floor: a rectangle of higher density, fixed or swept.
center is the band's center in Hz, where a fixed band stays and a
swept one starts. level is the density the band adds over the
floor between its edges, in SI ((m/s²)²/Hz for an acceleration), so
its mean square is level times its width. The width is given one
of two ways: width, a full width in Hz, or share, a full width as
a share of the center, which widens with the center the way a
harmonic's band does (0.10 for a band written plus or minus 5
percent). A swept band sweeps its center from center to
sweep_to and back, over and over, at rate: Hz/s for a LINEAR
sweep, octaves a minute for a LOG one (mode). tolerance_db is
the tolerance the plan states for the band, dB either way, or None
for the floor's. name is what the sheet calls it.
Raises ValueError for a center, level or width that is not above zero, for both widths or neither, for a band reaching below zero frequency, and for a sweep without a rate, a rate without a sweep, or a mode that is neither.
Methods:
| Name | Description |
|---|---|
plus_minus |
A band written as a standard writes it, plus or minus |
between |
A band written as its two edges in Hz, the form a plan checks |
width_at |
The band's full width in Hz with its center at |
edges |
(low, high), the band's edges in Hz with its center at |
mean_square |
What the band adds to the record's mean square: its level |
span |
(low, high), every frequency the band covers over its sweep; |
leg_seconds |
How long the center takes from |
center_at |
The band's center in Hz at |
crossing_seconds |
How long the swept band takes to move its own width with its |
to_dict |
The band's fields as plain numbers and text, the form it is |
from_dict |
The band |
Attributes:
| Name | Type | Description |
|---|---|---|
swept |
bool
|
Whether the band moves. |
label |
str
|
The band's name, or its center and width in words. |
rms |
float
|
The band's rms at its own center, the root of its mean |
Attributes¶
Methods:¶
plus_minus
classmethod
¶
plus_minus(center: float, percent: float, level: float, **options: Any) -> Narrowband
A band written as a standard writes it, plus or minus
percent of its center: Narrowband.plus_minus(400, 5, w) runs
from 380 to 420 Hz. Its width is kept as a share of the center,
so a swept band widens as it climbs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
center
|
float
|
Hz. |
required |
percent
|
float
|
The half-width, percent of the center. |
required |
level
|
float
|
The density added over the floor, SI. |
required |
**options
|
Any
|
|
{}
|
Returns:
| Type | Description |
|---|---|
Narrowband
|
The band, its full width twice |
Source code in src/visualdynamics/core/mixed_mode.py
between
classmethod
¶
between(low: float, high: float, level: float, **options: Any) -> Narrowband
A band written as its two edges in Hz, the form a plan checks the control plot against.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
low
|
float
|
The edges, Hz, |
required |
high
|
float
|
The edges, Hz, |
required |
level
|
float
|
The density added over the floor, SI. |
required |
**options
|
Any
|
|
{}
|
Returns:
| Type | Description |
|---|---|
Narrowband
|
The band, centered between its edges. |
Source code in src/visualdynamics/core/mixed_mode.py
width_at
¶
The band's full width in Hz with its center at center (its
own by default).
Source code in src/visualdynamics/core/mixed_mode.py
edges
¶
(low, high), the band's edges in Hz with its center at
center (its own by default).
Source code in src/visualdynamics/core/mixed_mode.py
mean_square
¶
What the band adds to the record's mean square: its level times its width, in SI.
span
¶
(low, high), every frequency the band covers over its sweep; its edges for a fixed band.
Source code in src/visualdynamics/core/mixed_mode.py
leg_seconds
¶
How long the center takes from center to sweep_to; zero
for a fixed band.
Source code in src/visualdynamics/core/mixed_mode.py
center_at
¶
The band's center in Hz at seconds after the band started:
from center to sweep_to and back, over and over; its own
center throughout for a fixed band.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seconds
|
array - like
|
Seconds from the band's start. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Hz, the shape of |
Source code in src/visualdynamics/core/mixed_mode.py
crossing_seconds
¶
How long the swept band takes to move its own width with its
center at center: how long any one frequency near it is
covered. Infinite for a fixed band.
Source code in src/visualdynamics/core/mixed_mode.py
to_dict
¶
from_dict
classmethod
¶
from_dict(fields: dict[str, Any]) -> Narrowband
The band to_dict wrote.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
fields
|
dict
|
As |
required |
Returns:
| Type | Description |
|---|---|
Narrowband
|
The band. |
A field this version does not know, written by a later one, is
|
|
passed over, so a file stays readable as the band gains fields.
|
|
Source code in src/visualdynamics/core/mixed_mode.py
Tone
dataclass
¶
Tone(frequency: float, amplitude: float, sweep_to: float | None = None, rate: float | None = None, mode: int = LINEAR, name: str = '')
One row of a mixed test's tone table: a tone at a fixed frequency or swept between two, at one amplitude (peak).
frequency is where a fixed tone stands and a swept one starts, in
Hz; sweep_to is where a swept tone ends, None for a fixed tone.
rate is the sweep rate, Hz/s for a LINEAR sweep and octaves a
minute for a LOG one (mode), always above zero, the direction being
the one from frequency to sweep_to; None on a row read from a
tone of several segments, whose rates are its segments'. amplitude
is the level in SI, peak (m/s² for an acceleration); a tone read
from a specification whose level changes along its sweep gives its
largest. name is the controller's name for it.
sine_tone writes the row as the SineTone a sine specification
holds; Tone.of reads one back.
Methods:
| Name | Description |
|---|---|
sine_tone |
This row as a sine specification holds it. |
of |
The tone-table row of a sine specification's tone, on control |
Attributes:
| Name | Type | Description |
|---|---|---|
fixed |
bool
|
Whether the tone stands at one frequency. |
label |
str
|
The tone's name, or its frequency in words. |
Attributes¶
Methods:¶
sine_tone
¶
sine_tone(seconds: float | None = None, channels: int = 1, *, start_time: float = 0.0) -> SineTone
This row as a sine specification holds it.
A fixed tone is a dwell held seconds (SineTone.dwell), the
form a controller's file gives one; a swept tone is one segment
from frequency to sweep_to at rate. The amplitude is the
same on every one of channels control channels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
seconds
|
float
|
How long a fixed tone holds; needed for a fixed tone only. |
None
|
channels
|
int
|
How many control channels the specification has. |
1
|
start_time
|
float
|
Seconds after the environment started that the tone turns on. |
0.0
|
Returns:
| Type | Description |
|---|---|
SineTone
|
The tone, named by |
Source code in src/visualdynamics/core/mixed_mode.py
of
classmethod
¶
The tone-table row of a sine specification's tone, on control
channel column.
A tone that stands at one frequency for its whole run, every
frequency it passes within DWELL_SPAN of its highest (a dwell,
SineTone.is_dwell, or several in a row), is fixed: the rule the
data sheet reads a row by (ToneRow.fixed). Any other is swept
from its first breakpoint to its last, with its one segment's
rate and mode, or no rate when it has several segments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tone
|
SineTone
|
The tone. |
required |
column
|
int
|
Which control channel's amplitude. |
0
|
Returns:
| Type | Description |
|---|---|
Tone
|
The row. |
Source code in src/visualdynamics/core/mixed_mode.py
MixedSpecification
¶
MixedSpecification(floor: Any, tones: SineSweepSpecification | Sequence[Tone] | None = None, narrowbands: Sequence[Narrowband] | None = None, exclusion: float | None = None, *, seconds: float | None = None)
A mixed-mode test's requirement as one object: the floor, the tones, the narrowbands and the width left out around each tone.
floor is the random specification the broadband part was written
as, one record per control channel. tones is the sine
specification of the tones, or the tone table as Tone rows, which
is written into one (a fixed tone as a dwell held seconds), or
None for a random-on-random test. narrowbands and exclusion (the
width left out of the floor either side of each tone, Hz) are kept
on the floor (Specification.narrowbands,
Specification.tone_exclusion), which is how they are saved; given
here, they are written onto a copy of the floor, which floor then
holds (add it to a project to keep them), and left out, the floor's
own are used (none, and EXCLUSION). Nothing else is saved for the
object:
the floor and the tones are the two specifications a random and
sine project holds, and MixedSpecification(floor, tones) puts them
back together.
Raises ValueError when the tones' control channels are not the
floor's, or when a fixed tone is given as a row without seconds.
Attributes: floor: The random specification, carrying the narrowbands and the width left out. tones: The sine specification, or None.
Methods:
| Name | Description |
|---|---|
record |
The floor's record for |
column |
The tones' amplitude column for |
tone_table |
The tones as tone-table rows ( |
floor_at |
The floor's density at |
reference |
The composite reference density at |
left_out |
Which of |
band_lines |
Which of |
reference_rms |
The written levels of each part as rms, from the |
Attributes:
| Name | Type | Description |
|---|---|---|
narrowbands |
tuple[Narrowband, ...]
|
The narrowbands, as the floor carries them. |
exclusion |
float
|
The width left out of the floor either side of each tone, Hz: |
channels |
list[str]
|
The control channels, the floor's records. |
Source code in src/visualdynamics/core/mixed_mode.py
Attributes¶
narrowbands
property
¶
narrowbands: tuple[Narrowband, ...]
The narrowbands, as the floor carries them.
exclusion
property
¶
The width left out of the floor either side of each tone, Hz:
the floor's, or EXCLUSION when it does not say.
Methods:¶
record
¶
The floor's record for channel (its first by default);
ValueError for a channel it is not written at.
Source code in src/visualdynamics/core/mixed_mode.py
column
¶
The tones' amplitude column for channel (the floor's first
by default), or None when there are no tones or they are not
controlled there.
Source code in src/visualdynamics/core/mixed_mode.py
tone_table
¶
tone_table(channel: str | None = None) -> list[Tone]
The tones as tone-table rows (Tone.of) at channel; empty
without tones.
Source code in src/visualdynamics/core/mixed_mode.py
floor_at
¶
The floor's density at frequencies, read between its
breakpoints as the floor is drawn (log-log), NaN where it is not
written.
Source code in src/visualdynamics/core/mixed_mode.py
reference
¶
The composite reference density at frequencies: the floor,
with each fixed narrowband's level added between its edges. A
swept band and the tones have no fixed place on a density and are
not added.
Source code in src/visualdynamics/core/mixed_mode.py
left_out
¶
Which of frequencies are left out of the floor for a tone:
those a tone at channel spent at least LEFT_OUT_SHARE of its
run within exclusion of (held_share). Every line beside a
fixed tone; of a sweep, only the lines it lingers near.
Source code in src/visualdynamics/core/mixed_mode.py
band_lines
¶
Which of frequencies any narrowband covers, over its whole
sweep: the lines the floor is not judged on, since they hold a
band.
Source code in src/visualdynamics/core/mixed_mode.py
reference_rms
¶
The written levels of each part as rms, from the
specification alone: 'floor' (the floor's own area,
compliance.specification_rms), 'tones' (the root of the tones'
mean squares), 'narrowbands' (the root of the bands' level times
width) and 'total' (the root of all of them), in SI.
Source code in src/visualdynamics/core/mixed_mode.py
FloorRow
dataclass
¶
FloorRow(reference: float, measured: float, residual: float, rms_percent: float, db: float, judged: int, outside: int, left_out: float, exclusion: float, spacing: float, dof: float, expected: float, allowed: int)
The floor's row of the data sheet, in SI.
reference and measured are the rms over the lines judged (the
floor's band, less the lines left out for tones and narrowbands), of
the reference and of the residual. residual is the residual's rms
over every line, tones taken out and nothing left out. rms_percent
and db are the two tolerances; judged and outside count the
lines judged and those outside db, expected the lines chance
puts outside db at dof and allowed the most that may be
outside before the lines fail (FLOOR_CHANCE). left_out is the
share of the floor's lines left out, exclusion the width left out
either side of a tone, spacing the line spacing and dof each
line's statistical degrees of freedom.
Attributes:
| Name | Type | Description |
|---|---|---|
error |
float
|
The measured rms over the reference, less one, in percent. |
assessed |
bool
|
Whether any line was left to judge the floor on. |
passed |
bool | None
|
Whether the rms is within its tolerance and no more lines are |
ToneRow
dataclass
¶
ToneRow(name: str, low: float, high: float, reference: float, measured: float, tolerance: float, readings: int, inside: float, band: str)
One tone's row of the data sheet, in SI.
reference and measured are the tone's amplitude (peak), written
and read: for a swept tone the median, over the readings, of the
level written at each and of the level read. readings counts the
readings used (those after the band settled) and inside the share
of them within the tolerance of the level written where each was
read. tolerance is percent either way; low and high the
frequencies the tone passes; band the tracking band in words.
Attributes:
| Name | Type | Description |
|---|---|---|
fixed |
bool
|
Whether the tone stands at one frequency. |
error |
float
|
The measured amplitude over the written, less one, percent. |
passed |
bool | None
|
Whether the tone's level is within its tolerance; None when no |
BandRow
dataclass
¶
BandRow(name: str, low: float, high: float, swept: bool, span: tuple[float, float], reference: float, measured: float, error_db: float, low_db: float, high_db: float, dof: float, slices: int, slice_dof: float, inside: float)
One narrowband's row of the data sheet, in SI.
low and high are its edges at its own center (a swept band's
span is where it travels). reference and measured are its rms
above the floor: the root of its level times its width, and of the
residual's lines between its edges less the floor, times the
spacing (a fixed band; a swept band's slices give the median of
each slice's measured level times its width). error_db is the
band's level read over the floor's plus the band's, in dB (over all
its slices together for a swept band); low_db and high_db the
tolerance it was judged against, the stated or the floor's, widened
to the scatter at dof, the degrees of freedom of its estimate (all
its slices' together for a swept band). slices counts the slices
of a swept band (one for a fixed band), slice_dof what each was
worth (the median), and inside the share of slices within the
tolerance widened to their own scatter, which says how far a swept
band wandered from moment to moment.
Attributes:
| Name | Type | Description |
|---|---|---|
passed |
bool | None
|
Whether the band's level is within its tolerance; None when it |
TotalRow
dataclass
¶
The total's row: the rms of the whole drive, which has no
tolerance. reference is the root of every part's written mean
square, measured the composite's every line over the span read,
and record the record's own rms over the same samples.
MixedReading
dataclass
¶
MixedReading(channel: str, dimension: str, floor: FloorRow, tones: tuple[ToneRow, ...], narrowbands: tuple[BandRow, ...], total: TotalRow, tones_reference: float, tones_measured: float, frequencies: ndarray, composite: ndarray, residual: ndarray, reference: ndarray, left_out: ndarray, band_lines: ndarray, residual_history: Any, averaging: Any, start: float, onset: float, notes: tuple[str, ...] = ())
A record read against a mixed specification: what judge_mixed
returns.
The four parts of the data sheet (floor, tones, narrowbands,
total) and the tones together (tones_reference,
tones_measured, rms), with what they were read from:
frequencies and the averaged densities of the record over the span
read (composite), of what is left with the tones taken out
(residual) and of the reference (reference, floor and fixed
bands); left_out and band_lines mark the lines left out of the
floor for the tones and held by narrowbands. residual_history is
the residual as a record, averaging how its spectrum was averaged,
start the second the span read begins (the band settled), onset
where the tones began in the record. dimension is the record's
quantity, channel its DOF, and notes what the reading says
rather than hides. Every value is in SI.
Methods:
| Name | Description |
|---|---|
describe |
The reading in one line: the floor, the tones and the total, |
Attributes:
| Name | Type | Description |
|---|---|---|
passed |
bool | None
|
Whether every judged part passes: the floor, each tone and |
Attributes¶
passed
property
¶
Whether every judged part passes: the floor, each tone and each narrowband, each where it was judged. None when no part was judged: a sheet that judged nothing has not passed. The total is not judged.
Methods:¶
describe
¶
The reading in one line: the floor, the tones and the total,
each labeled, and what failed. scale converts SI into unit
('g' with 1/9.80665).
Source code in src/visualdynamics/core/mixed_mode.py
Functions:¶
narrowbands_json
¶
narrowbands_json(bands: Sequence[Narrowband]) -> str
Narrowbands as the text a file holds them in: a JSON list of
Narrowband.to_dict.
narrowbands_from_json
¶
narrowbands_from_json(text: str) -> tuple[Narrowband, ...]
held_share
¶
held_share(tone: SineTone, frequencies: Any, width: float) -> ndarray
The share of a tone's run it spends within width Hz of each of
frequencies: 1 beside a fixed tone, and about twice the width over
the range for a line a linear sweep passes.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tone
|
SineTone
|
The tone. |
required |
frequencies
|
array - like
|
Hz. |
required |
width
|
float
|
Hz either side. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
A share from 0 to 1 for each frequency. |
Source code in src/visualdynamics/core/mixed_mode.py
tone_mean_square
¶
tone_mean_square(tone: SineTone, column: int = 0) -> float
A tone's mean square as written: A²/2 for a tone held at one level, and the time average of its amplitude squared over two for one whose level changes along its run, swept or held.
Source code in src/visualdynamics/core/mixed_mode.py
mixed
¶
mixed(floor: Any, tones: Any = None, **options: Any) -> MixedSpecification
floor as a MixedSpecification, whether it is one already or
the random specification of one; tones and the options as for the
class, applied only when floor is not one already.
Source code in src/visualdynamics/core/mixed_mode.py
settling_seconds
¶
settling_seconds(band: Any, tones: Sequence[SineTone] = ()) -> float
How long a tracking band takes to settle: about one over its width, at the lowest frequency of any tone for a proportional band (2 s for a 0.5 Hz band); zero for no band.
Source code in src/visualdynamics/core/mixed_mode.py
judge_mixed
¶
judge_mixed(history: Any, specification: Any, tones: Any = None, *, channel: str | None = None, band: Any = None, onset: float | None = None, settle: float | None = None, averaging: Any = None, tone_tolerance: float = TONE_TOLERANCE, floor_db: float = FLOOR_DB, floor_rms: float = FLOOR_RMS, confidence: float = CONFIDENCE) -> MixedReading
Read one channel of a record against a mixed specification, part by part: the data sheet's floor, tones, narrowbands and total.
The tones are tracked and taken out, the floor is judged on what is left with the tone and band lines left out, each narrowband at its own degrees of freedom, and the total is reported unjudged; the module's notes give the method.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
history
|
TimeHistory
|
The record, evenly sampled. |
required |
specification
|
MixedSpecification or Specification
|
The requirement, or its floor, with |
required |
tones
|
SineSweepSpecification
|
The tones, when |
None
|
channel
|
str
|
The control channel read; the floor's first by default. |
None
|
band
|
SineTracking
|
The tracking band the tones are read through; a fixed band
|
None
|
onset
|
float
|
Seconds into the record where the tones' environment begins;
each tone starts its own |
None
|
settle
|
float
|
Seconds from |
None
|
averaging
|
Averaging
|
How the residual's spectrum is averaged; the record's own, or half-overlapped Hann frames at 1 Hz lines or finer, by default. Its frames start no earlier than the span read and fill the record. |
None
|
tone_tolerance
|
float
|
Percent either way on each tone's amplitude. |
`TONE_TOLERANCE`
|
floor_db
|
float
|
dB either way on each line of the floor, and the narrowbands' tolerance where the plan states none. |
`FLOOR_DB`
|
floor_rms
|
float
|
Percent either way on the floor's rms. |
`FLOOR_RMS`
|
confidence
|
float
|
The confidence a narrowband's scatter is read at. |
`CONFIDENCE`
|
Returns:
| Type | Description |
|---|---|
MixedReading
|
The data sheet and the spectra it was read from, in SI. |
Raises:
| Type | Description |
|---|---|
ValueError
|
For a channel the record or the floor does not hold, or that the record holds twice in the floor's quantity; a record of another quantity than the floor or the tones; a channel holding a sample that is not finite, zero throughout or one value throughout; a record not evenly sampled; or a span too short for one frame. |
Source code in src/visualdynamics/core/mixed_mode.py
1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 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 1479 1480 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 | |