mne-python
mne-python copied to clipboard
[WIP, FIX] make plot_sensors and plot_topomap omit channels without positions (nan)
Currently sensors without position are shown at (0, 0)
position when using mne.viz.plot_sensors
- this can lead to multiple channels being at the same location (look at the middle part below):
but in general it may be confusing to plot channels without know position as if they were at the Cz location. This is an attempt to fix that - I'll see what I break as a consequence. :)
One thing I'm considering: Should there be a warning if some channel positions are missing?
TODO:
- [x] fix things that I broke
- [x] kind='3d'
- [x] plot_topomap
- [x] test
- [x] whats new
- [ ] add warning when channel positions are missing?
Before this PR, not dropping channels with undefined position could result in weird plots like this one:
maybe thats an interesting idea for an mne logo, but it does not represents underlying data well. After dropping one channel without position the same plot_topomap call gives:
This PR fixes the problem, but somehow introduces another: now the extrapolate='local' seems to have different image cropping limits, I'll have to investigate more.