visualdynamics.plot.matrix_comparison¶
matrix_comparison
¶
A measured cross-spectral matrix against its specification, drawn as the matrix: one small plot per cell, its verdict over it.
The question this view answers is whether the run was the test that was asked for, and a multi-input test's answer is a matrix. So the picture is the matrix itself, a grid with one row and one column per control channel:
- on the diagonal, each channel's autospectrum (the measurement as it is compared, with the comparison's scale) over its specification and abort limits, on log axes;
- above the diagonal, each pair's coherence, measured over specified, with the tolerance either side of the specified one;
- below the diagonal, the same pair's phase in degrees, with its tolerance, drawn where the phase is judged.
Under the grid two strips read the whole matrix at each line: the RMS over the channels of their level errors in dB, and how many cross terms are out on either reading.
Nothing here is carried by hue alone. Every cell's title says its reading and its verdict in words ('coherence OUT 23 %'). A cell's frame says it too: heavy and solid round a cell that is out, thin round one that is in, dotted round one that was not judged or not specified. The measurement is a solid line and the specification a dashed one, the tolerance and abort lines dotted, and the lines judged out wear a cross marker on the measured curve.
Every number is core.matrix_comparison.compare_matrix's.
Functions:
| Name | Description |
|---|---|
short_words |
A cell's verdict as its title carries it, in a few words: |
table_html |
The summary as an HTML table: one row per reading of the matrix |
build_matrix_comparison |
Draw the grid, the two summary strips under it and (with |
matrix_comparison_steps |
Draw the grid, the two summary strips under it and (with |
Functions:¶
short_words
¶
A cell's verdict as its title carries it, in a few words: 'level in +0.4 dB', 'coherence OUT 23 % of lines', 'phase not judged'. Out is written in capitals, so it is read before it is seen.
Source code in src/visualdynamics/plot/matrix_comparison.py
table_html
¶
The summary as an HTML table: one row per reading of the matrix (each level, then each pair's coherence and phase) with its value and verdict, then the tolerances, the verdict and the notes.
Source code in src/visualdynamics/plot/matrix_comparison.py
build_matrix_comparison
¶
Draw the grid, the two summary strips under it and (with table)
the summary table beside it, and return the comparison
(core.matrix_comparison.compare_matrix): every step of
matrix_comparison_steps taken at once. The keywords are its.
Source code in src/visualdynamics/plot/matrix_comparison.py
matrix_comparison_steps
¶
matrix_comparison_steps(layout: Any, specification: Any, measured: Any, *, coherence_tolerance: float = COHERENCE_TOLERANCE, phase_tolerance: float = PHASE_TOLERANCE, coherence_floor: float = COHERENCE_FLOOR, scale_db: float | None = None, comparison: Any = None, table: bool = True, unit_system: Any = None, theme: Any = None) -> Any
Draw the grid, the two summary strips under it and (with table)
the summary table beside it a step at a time: a generator that
pauses before each cell and before the strips, and whose return
value is the comparison (core.matrix_comparison.compare_matrix).
The application takes the steps a few at a time between turns of
its event loop, so a grid of sixty-four cells, a second or two of
drawing, never holds the window for long; build_matrix_comparison
takes them all at once.
A comparison already made of the two is drawn as it is, and the
settings are not read; the application holds the last one and
judges it again at a new tolerance (with_tolerances). The
application puts its own table in the panel beside the plot and
passes table=False.
Source code in src/visualdynamics/plot/matrix_comparison.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 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 | |