visualdynamics.plot.chance¶
chance
¶
One channel of a comparison read as its miss from the target, line by line in decibels, beside what chance alone would put outside its bands.
The question this view answers is whether the lines outside a band are
the test or the estimate: an averaged spectrum scatters about its true
level by an amount its degrees of freedom set (core.chance), so a few
lines outside a narrow band are expected on every average. The plot
draws each judged line's (or group's) level over the target in dB, the
target at zero, and the warning and abort edges about it. The lines
outside are marked, and the legend and the title give each count beside
the number chance alone puts there at the comparison's DOF, so a reader
of a printed figure can tell the two apart without counting markers.
With lines combined, the groups are drawn over the single lines, which stand back in gray: the chance scatter shrinks in the groups, and an excursion that holds across neighbors survives.
Nothing here is carried by hue alone. The warning edges are dashed and the abort edges solid, each named in the legend. A line outside is marked with a triangle pointing the way it is out, down for under the band and up for over it: hollow outside the warning band, filled outside the abort band.
Functions:
| Name | Description |
|---|---|
title_text |
The plot's title: the channel, the DOF it was judged at, and each |
build_chance |
Draw one channel's miss from its target against the bands, with the |
Functions:¶
title_text
¶
The plot's title: the channel, the DOF it was judged at, and each pair's count beside its expectation, as in '1Z+ at 120 DOF: 5 of 389 lines outside warning, 3.3 by chance; 0 outside abort, 0.00039 by chance'.
Source code in src/visualdynamics/plot/chance.py
build_chance
¶
build_chance(layout: Any, specification: Any, measured: Any, *, channel: str | None = None, combine: int = 1, dof: float | None = None, scale_db: float | None = None, theme: Any = None) -> dict[str, Any]
Draw one channel's miss from its target against the bands, with the
lines outside marked, and return the reading
(core.chance.compare_chance).
channel is the DOF (or 'response/reference') to draw, the first the
two have in common by default. combine, dof and scale_db are
compare_chance's; the scale is resolved the way every comparison
resolves it when omitted. A pair that cannot be read is refused with
the reason as a ValueError, so nothing is drawn that would read as a
count.
Source code in src/visualdynamics/plot/chance.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 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 | |