visualdynamics.plot.sine_frequency¶
sine_frequency
¶
A sine tone's frequency error against frequency, with the band drawn.
The question this view answers is the frequency check's: where, if
anywhere, was the tone on the channel off the frequency the profile asks
for by more than the band allows. So the view puts the error
(core.sine_frequency, the tone's frequency less the specified, as a
share of the specified, in percent) against the specified frequency, on
the log frequency axis every sine level is read on, and draws the band
either side of zero. Everything is said by line style, marker shape and
words as well as by color, never by hue alone:
- the band, a dashed line above and below zero, named in the legend in words ('band ±2 %', or '±2 % or 1 Hz, whichever is greater', when a floor widens it at low frequency, where the dashed lines open out);
- each channel, a solid line with a hollow marker of its own shape every few lines, named with its worst reading and its verdict in words;
- a line outside the band, the same marker filled, as the distortion view marks a line over its limit.
A line the check could not judge is left out, a gap in the curve, and the notes say how many. The error axis is linear and centered on zero, because a tone runs off its frequency either way.
Functions:
| Name | Description |
|---|---|
channel_words |
One channel in the legend's words: its name, its worst reading and |
band_words |
The band in the legend's words: 'band ±2 %'. |
readout |
The check's numbers as the window's readout words them, on |
draw_frequency |
Draw a |
error_range |
How far either side of zero the error axis reaches, percent: past |
build_frequency |
Draw a frequency check into a graphics layout, its legend below |
Functions:¶
channel_words
¶
One channel in the legend's words: its name, its worst reading and its verdict, such as '101Z+: worst +1.5 % at 100 Hz, 79 lines outside the band'.
Source code in src/visualdynamics/plot/sine_frequency.py
band_words
¶
readout
¶
The check's numbers as the window's readout words them, on
channel dof (every channel when None): 'band', 'worst', 'over' and
'verdict'. A number the check does not give reads as a dash; the
notes say why.
Source code in src/visualdynamics/plot/sine_frequency.py
draw_frequency
¶
draw_frequency(plot: Any, check: Any, *, dof: str | None = None, colors: Any = None, legend: bool = True) -> list[Any]
Draw a FrequencyCheck onto a pyqtgraph plot item and return the
items drawn.
The band dashed above and below zero in the plot's foreground, then
each channel (or only dof) as a solid curve in its color, in
percent of the specified frequency, with a hollow marker of its own
shape every few lines and the same marker filled on every line
outside the band. With legend, the band and each channel are named
for the plot's legend in words (band_words, channel_words); the
panel's small preview passes False and words them in its readout
instead. The plot is expected on a log frequency axis.
Source code in src/visualdynamics/plot/sine_frequency.py
error_range
¶
How far either side of zero the error axis reaches, percent: past the band and past the widest judged error, by a quarter and a tenth.
Source code in src/visualdynamics/plot/sine_frequency.py
build_frequency
¶
Draw a frequency check into a graphics layout, its legend below it, and return the plot item.
The title names the tone and the verdict in words; the notes the check carries, if any, go under it, since a verdict that left lines unjudged should not be read without them.