Adding a reference does not work after a montage has been set
See original GitHub issueThe order in which you perform assigning a montage and adding a reference matters, which probably shouldn’t be the case.
Consider the following example using the testing data from mne/io/brainvision/tests/data/test.*
(the first two lines could be combined by supplying the montage
argument in the call to mne.io.read_raw_brainvision
):
raw = mne.io.read_raw_brainvision("test.vhdr", preload=True)
raw.set_montage("standard_1020")
raw = mne.io.add_reference_channels(raw, "T3")
This assigns the montage first and then adds a new reference channel which wasn’t part of the data. This produces a RuntimeWarning: The locations of multiple reference channels are ignored (set to zero).
, which results in an incorrect location of the newly added channel T3.
If instead you first add the reference channel and then set the montage, everything works as expected:
raw = mne.io.read_raw_brainvision("test.vhdr", preload=True)
raw = mne.io.add_reference_channels(raw, "T3")
raw.set_montage("standard_1020")
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
MONTAGE Owner's Manual - Yamaha Music
- Some object has been dropped into the instrument. - There is a sudden loss of sound during use of the instrument. Power...
Read more >BESA Research Montage Editor
Each new click will alternately define a new montage channel and its reference. When done adding new channels, click on the Set chan....
Read more >Tutorials/MontageEditor - Brainstorm
The montages are not applied to the recordings, they are for visualization only. To re-reference correctly your EEG recordings, use the process ...
Read more >Everything You Need to Know About Montages - ScreenCraft
Montages are the visual equivalent of the idea that a whole can be ... There's nothing wrong with a good montage sequence, so...
Read more >How To Play A Random Animation Montage - YouTube
Hey guys, in today's video, I'm going to be showing you how to play a random animation montage. ... Your browser can 't...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I guess I should make an issue with the notes of the plan we discussed with @larsoner so that is easier to follow the status for everyone. Right now I only have messy notes.
I prefer the clear doc + warning approach than the more magical one.