visualdynamics.viz.mac_bars¶
mac_bars
¶
The MAC matrix as 3-D bars: height and colour are both the value.
The flat grid answers "which pairs match" at a glance; the bars answer the follow-up the grid is poor at — how much the near-misses differ, which as colour alone is a judgement of shade. Height makes a 0.6 against a 0.9 a visible step. The reading is pinned 0..1 exactly like the flat grid and the coherence map, because a MAC is a bounded ratio.
One mesh whatever the mode count, like the waterfall: a 139×139 cross-MAC is 19 321 boxes and still one actor. Rows are the first set's modes and columns the second's, labelled by frequency the way the flat grid's axes are, and thinned past the same label limit. Row 0 sits nearest the viewer — the flat grid reads downward from the top-left, and the camera puts the same first mode in front.
Functions:
| Name | Description |
|---|---|
cell_to_pair |
Which (row, column) a picked mesh cell belongs to. |
add_mac_bars |
Draw the MAC bars into a plotter: one mesh, labels, the 0..1 axis. |
place_camera |
The bars' home view: row 0 nearest, columns left to right. |
mac_bars_scene |
Build (or add to) a PyVista plotter showing the MAC bars. |
Functions:¶
cell_to_pair
¶
Which (row, column) a picked mesh cell belongs to.
The bars mesh is built box by box, six faces each, in row-major order — this is that construction read backwards, and the picking depends on it staying true.
Source code in src/visualdynamics/viz/mac_bars.py
add_mac_bars
¶
add_mac_bars(
plotter: Any,
frequencies: Sequence[float],
matrix: Any,
column_frequencies: Sequence[float] | None = None,
theme: Any = None,
selected: Sequence[tuple[int, int]] = (),
active: tuple[int, int] | None = None,
matched: Sequence[tuple[int, int]] = (),
) -> dict[str, Any]
Draw the MAC bars into a plotter: one mesh, labels, the 0..1 axis.
The marks mirror the flat grid's, in the same red: selected pairs
wear an outline traced around their bar, the active (animated)
pair the boldest one, and matched pairs — already committed to
the matched-modes table — wear the diagonal stripes across their
bar's top. Returns {'rows', 'columns', 'named_rows',
'named_columns'} — the named lists say which modes got a frequency
label, for the same thinning test the waterfall's labels have.
Source code in src/visualdynamics/viz/mac_bars.py
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 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 | |
place_camera
¶
The bars' home view: row 0 nearest, columns left to right.
Placed when the comparison changes and at no other time, the same standing rule as every scene. Framed from the front-left and high enough that a full-height bar clears the far edge.
Source code in src/visualdynamics/viz/mac_bars.py
mac_bars_scene
¶
mac_bars_scene(
frequencies: Sequence[float],
matrix: Any,
column_frequencies: Sequence[float] | None = None,
plotter: Any = None,
off_screen: bool = False,
theme: Any = None,
) -> Any
Build (or add to) a PyVista plotter showing the MAC bars.