Bad channels not being read

  • MNE version: 1.2.2
  • operating system: Windows 10


Hi there, I’m trying to run ICA on mne but before doing that I want to remove bad channels. My raw function doesn’t seem to be reading any bad channels (see screenshot e2) even though there is clearly one in the signal i.e. a dead channel. If I was doing it for a single participant I’d not mind just simple assignment of['bads'] = ['bad channel name'] . However, I’m running it for multiple participants and as such not sure how to proceed.


Hello, I believe what could be of help to you is the annotate_amplitude() function. Be sure to take a look at its bad_percent and min_duration parameters.

Best wishes

Hi Richard,
I tried using annotate_amplitude(), it doesn’t seem to be working either. I maybe using it incorrectly or something else is going on here.

Here’s how I used it:

ann, bad = mne.preprocessing.annotate_amplitude(raw, peak = 23115.56,flat=None, bad_percent=5, min_duration=0.005, picks='eeg', verbose=None)

This is what it produced as a result:

The peak-to-peak amplitude you specified is several orders of magnitude too big, MNE uses SI units for data, which would be Volts for EEG. Hence, the threshold is never reached and nothing gets rejected.

And to find flat channels, you need to pass the respective parameter, too.

Best wishes,

Hi Richard,
I have not pre-processed the data at that point. Now, I have normalized (using z-scores) and have input the following values.

ann, bad = mne.preprocessing.annotate_amplitude(raw, peak = 20, flat=0.01, bad_percent=5, min_duration=0.005, picks='misc', verbose=None)

But it is still producing an empty list. Could you please tell me where I’m going wrong?


@mscheltienne @richard


ann, b = mne.preprocessing.annotate_amplitude(raw, peak = 1 ,flat=0.000, bad_percent=0.05, min_duration=5, picks='misc', verbose=None)

I’m trying to use the above mentioned code to identify the bad electrodes but the code is returning empty list.