Commit f23049f
committed
FIX: Support biaxial OPM sensor grouping for visualization
Fixed two critical bugs in OPM grouped topomap rendering:
1. Use symmetric distance matrix (not upper triangle) to properly detect all
colocated channel overlaps bidirectionally.
2. Lower grouping threshold from >=3 to >=2 channels to support both biaxial
(e.g., bx+by or by+bz) and triaxial (bx+by+bz) OPM sensors.
Real OPM hardware like Kernel phantom has biaxial pairs instead of perfect
triaxial arrays. This fix enables grouped radial/tangential visualization
for real datasets.
Changes:
- mne/viz/topomap.py: Fixed distance matrix and threshold
- mne/viz/tests/test_topomap.py: Updated test expectations
- examples/datasets/kernel_phantom.py: Updated docstring
- tutorials/preprocessing/80_opm_processing.py: Restored plot_joint call
Closes the rendering issue where only 1 plot showed instead of 2.1 parent 8fd2600 commit f23049f
4 files changed
Lines changed: 12 additions & 11 deletions
File tree
- examples/datasets
- mne/viz
- tests
- tutorials/preprocessing
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
115 | | - | |
116 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
852 | 852 | | |
853 | 853 | | |
854 | 854 | | |
855 | | - | |
| 855 | + | |
856 | 856 | | |
857 | 857 | | |
858 | 858 | | |
| |||
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
872 | | - | |
873 | | - | |
874 | | - | |
| 872 | + | |
| 873 | + | |
875 | 874 | | |
876 | 875 | | |
877 | 876 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
| 230 | + | |
230 | 231 | | |
231 | 232 | | |
232 | 233 | | |
| |||
362 | 363 | | |
363 | 364 | | |
364 | 365 | | |
365 | | - | |
366 | | - | |
| 366 | + | |
| 367 | + | |
367 | 368 | | |
368 | 369 | | |
369 | 370 | | |
| |||
376 | 377 | | |
377 | 378 | | |
378 | 379 | | |
379 | | - | |
| 380 | + | |
380 | 381 | | |
381 | 382 | | |
382 | 383 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
| 246 | + | |
246 | 247 | | |
247 | 248 | | |
248 | 249 | | |
| |||
0 commit comments