Bad channels not being read

  • MNE version: 1.2.2
  • operating system: Windows 10


e2

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 raw.info['bads'] = ['bad channel name'] . However, I’m running it for multiple participants and as such not sure how to proceed.

Thanks

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
Richard

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:
image

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,
Richard

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?

Thanks

Hi,
@mscheltienne @richard

Data:

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.

Thanks
Bilal

1 Like

I am having a similar struggle, so would also appreciate an answer to this question, thank you!

1 Like