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.

Drop bad channels/ epochs. Gives RuntimeError: bad channel(s) ['Fp1'] marked do not exist in info

See original GitHub issue

Hey guys,

want to mark channel ‘Fp1’ as bad, which works perfectly, but then afterwards when I call the mne.pick_types function, I get the RuntimerError: bad channel(s) [‘Fp1’] marked do not exist in info

# drop Fp1 channel
raw.info['bads'] = ['Fp1']

#work with eeg date, so eeg=True
picks_eeg = mne.pick_types(raw.info, meg=False, eeg=True, eog=False,
                           stim=False, exclude='bads')

Any idea what might the problem be?

Thanks in advance!!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mmagnuskicommented, Jan 25, 2018

@Stoffander You’d probably want to rename your channels to remove the spaces. You can use raw.rename_channels:

remove_blanks = lambda s: s.replace(' ', '')
raw.rename_channels(remove_blanks)
0reactions
Chris-code1commented, Jan 25, 2018

It worked. Thanks a lot!!! Classic amateur mistake 😉

Read more comments on GitHub >

github_iconTop Results From Across the Web

Handling bad channels — MNE 0.23.4 documentation
The list of bad channels is stored in the 'bads' field of the Info object that is attached to Raw , Epochs ,...
Read more >
Interpolation of bad channels in fNIRS data - MNE Forum
When a channel is marked as bad it stays in the data, but the software will know it is a bad channel. How...
Read more >
QRadar APARs 101 - IBM
The QRadar Support team created this QRadar APARs 101 to make APARs more usable for administrators. Use the search to locate APARs or...
Read more >
SleepWorks 9 - Reference Manual - Natus Partner
The Natus Sleep System includes amplifiers, a personal computer (PC), software and sleep accessories. The software is installed on a PC that process...
Read more >
ACTCD19-PERFILE.txt
... "%s%s" 0.376647 10 0x00000004 0.376607 15 platform_device 0.376326 4 Info ... 2 py 0.23321 3 bad 0.23317 4 0xe4 0.23317 3 231...
Read more >

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