question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

error in find_bad_channels_maxwell

See original GitHub issue

I 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:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
larsonercommented, May 6, 2020

… actually it looks like the file is shared above already, thanks @SophieHerbst !

0reactions
gabrielbmottacommented, Jul 24, 2020

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found