error in find_bad_channels_maxwell
See original GitHub issueI have an error from find_bad_channels_maxwell that I am not able to fix.
The file has a BAD_ACQ_SKIP segment at the beginning, but using skip_by_annotation
did not help.
Thanks for any hints on how to solve this!
File “/home/sh254795/anaconda3/lib/python3.7/site-packages/mne/preprocessing/maxwell.py”, line 1950, in find_bad_channels_maxwell ss[-1] = end
IndexError: index -1 is out of bounds for axis 0 with size 0
You can find the data here.
Here is a minimal example:
import mne
filename = 'example_badchan_error-raw.fif'
raw = mne.io.read_raw_fif(filename,
allow_maxshield=True,
preload=True, verbose='error')
auto_noisy_chs, auto_flat_chs = mne.preprocessing.find_bad_channels_maxwell(raw,
limit = 10., verbose=True, skip_by_annotation = 'BAD_ACQ_SKIP')
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
No results found
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
… actually it looks like the file is shared above already, thanks @SophieHerbst !
@larsoner thanks for the quick response. We don’t have that same function in our code, we’re still trying to find out where and why a segfault happens when the file was loaded.