Query#1 MNE_Python equivalent of 'pop_rejcont" in EEGLab; epoch rejection based on power threshold

I’m developing a semi-automated analysis pipeline for 64 channel EEG recorded from ~ 100 individuals, using a publicly available OpenNeuro dataset (ds00003969). The dataset has been previously analyzed in EEGLab and published Braboszcz C, et al.

After referencing to right mastoid and downsampling (1kHz to 256 Hz) the raw data (I have managed this for one subjects data), the authors used an EEGLab function called pop_rejcont to remove non-stereotyped artifacts. I’m not sure what they mean by this. Could you please suggest an equivalent method to pop_rejcont in MNE-Python?

Further, they mention creating overlapping epochs (1sec with 0.5 sec overlap) and then rejecting any 8 contigous epochs that have > 14 dB power in 1-10 Hz band (to eliminate head movements). I have managed to create these epochs using mne.make_fixed_length_epochs method after filtering between 1 and 10 Hz. My second question: how does one do the next step of calculating the power in 8 contigous epochs in each individual channel and reject them based on the power threshold in MNE-Python and could you please point out a relevant tutorial?
My sincere thanks for this amazing project and this forum. Best regards,

Based on this: eeglab/pop_rejcont.m at develop · sccn/eeglab · GitHub
It looks like this function is doing exactly what you are describing in your last paragraph.

To my knowledge, MNE does not have a build-in function to do this. You would have to:

  • create your epochs.
  • compute the PSD with multitapers or with the welch method.
  • set a threshold and look for consecutive epochs that exceed that threshold.
1 Like

Thanks will try your suggestion