visualdynamics.plot.mixed_mode¶
mixed_mode
¶
A mixed-mode test's data sheet beside the spectrum it was read from.
The reading (core.mixed_mode.judge_mixed) puts three kinds of figure
side by side that are misread when quoted alone: the floor's rms with
the tone lines left out, each tone in amplitude, and the total rms of
the whole drive. The view draws the averaged autospectrum on the left
and the sheet on the right, one row for the floor, a row for the tones
together and one for each tone, a row for each narrowband, and the
total, each with its written and measured figure, its tolerance and its
verdict in words.
On the spectrum, each meaning has a line style, a fill pattern or a word, never a hue alone:
- the reference (the floor with each fixed narrowband on it), wide and gray behind the rest, as a requirement is drawn everywhere, with the floor's line tolerance dashed either side;
- the residual, the record with the tones taken out, solid: what the floor and the bands are judged on;
- the record as recorded, tones in, dotted, with a marker on each fixed
tone (
plot.tone_readout.ToneOverlay): a stem to the height its spike stands at for this spacing and window, and its amplitude in words; - the lines left out of the floor for a tone, hatched with diagonal lines and labeled "left out", since a floor feature inside them is not judged;
- each narrowband's edges, dash-dotted verticals named with the band, and a swept band's travel cross-hatched and labeled "swept band".
A failing verdict is set in bold in the sheet and named in the title.
Functions:
| Name | Description |
|---|---|
scales |
(amplitude scale, density scale, amplitude unit) that take the |
sheet_rows |
The data sheet's rows, each a tuple of |
sheet_settings |
The settings that decide what the sheet's numbers mean, a clause |
sheet_html |
The data sheet as rich text, for a |
draw_mixed_mode |
Draw a |
build_mixed_mode |
Draw a mixed reading into a graphics layout: the spectrum with its |
Functions:¶
scales
¶
(amplitude scale, density scale, amplitude unit) that take the
reading's SI values into unit_system's: g and g²/Hz for an
acceleration shown in g; ones and no unit for a record whose units
are not declared.
Source code in src/visualdynamics/plot/mixed_mode.py
sheet_rows
¶
The data sheet's rows, each a tuple of COLUMNS strings, in the
display units: the floor, the tones together, each tone, each
narrowband and the total. The total's tolerance says it has none
and why.
Source code in src/visualdynamics/plot/mixed_mode.py
sheet_settings
¶
The settings that decide what the sheet's numbers mean, a clause each: the line spacing and degrees of freedom, the width left out and the share of the floor it took, the tracking band, when the span read starts, and the residual's rms over every line.
Source code in src/visualdynamics/plot/mixed_mode.py
sheet_html
¶
The data sheet as rich text, for a LabelItem or a QLabel: a
header row, then sheet_rows, each failing verdict in bold, and the
settings under it.
Source code in src/visualdynamics/plot/mixed_mode.py
draw_mixed_mode
¶
draw_mixed_mode(plot: Any, reading: Any, *, unit_system: Any = None, colors: Any = None, legend: bool = True, markers: bool = True) -> list[Any]
Draw a MixedReading's spectra onto a pyqtgraph plot item, on
log axes, and return the items drawn.
The reference wide and gray with the floor's tolerance dashed, the
residual solid, the record dotted, the left-out lines hatched and
labeled, each narrowband's edges dash-dotted and named, and, with
markers, a tone marker on each fixed tone. With legend the
curves are named for the plot's legend; the panel's small preview
passes False.
Source code in src/visualdynamics/plot/mixed_mode.py
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | |
build_mixed_mode
¶
Draw a mixed reading into a graphics layout: the spectrum with its legend below on the left, the data sheet on the right; return the spectrum's plot item.
The title is the reading in one line (MixedReading.describe), the
floor, the tones and the total each labeled, and what failed.