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.

Limit Epochs rejection to subset of channels / exclude channels from rejection

See original GitHub issue

I’m working with EEG recordings that include data from electrodes placed very close to the eyes, capturing lots of EOG activity. I use these channels to identify and auto-clean EOG artifacts using ICA. I have ICA operate on Epochs.

Because I want to avoid passing any Epochs with spuriously large signal amplitudes to ICA, I set a reject parameter for my epochs. This successfully removes a bunch of epochs where the signal indeed jumped way out of bounds for an electrode or two.

However, the EOG amplitudes I get in Fp1 and Fp2 are so big that in order to not remove a large number of epochs based on the EOG signal alone, I’d have to set the rejection threshold so high that I’d then be unable to reject epochs where some of the other electrodes went rogue. So this is a problem for me: either I set the threshold so high that it more or less becomes useless; or I lower it and sacrifice a lot of data due to the EOG signal.

What I’d like to do is specify “drop epochs as bad if amplitude exceeds X, unless this occurs in Fp1 and Fp2”.

Wanted to discuss with you

  • if you think this would be good to have (I very much do!)
  • and in a second step, what the API could look like

Thanks!

cc @cbrnr @agramfort

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

2reactions
hoechenbergercommented, Mar 25, 2021

Ok, everybody cool with going with

reject={"eeg": 100e-6, "Fp1": 2e-5, "Fp2": 2e-5}

then…?

1reaction
drammockcommented, Mar 25, 2021

thinking about your particular use case @hoechenberger, would it work to mark the frontal channels as “bad”, run the epoching, then set them back to “good” before running ICA?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rejecting bad data spans and breaks - MNE-Python
Epochs class constructor has another means of rejecting epochs, based on signal amplitude thresholds for each channel type.
Read more >
[Eeglablist] bad channel rejection - threshold limits default 5
I meant in epoch rejection around 10% would be ok, not the number of > channels. > > > Could you please help...
Read more >
Autoreject - Mainak Jas
Marking bad epochs. MNE allows you to specify rejection dictionary based on peak-to-peak thresholds for each channel type. reject = ...
Read more >
ERP Core N400 in MNE-Python: part III - Mateus Silvestrin, PhD
Here we do some final steps in cleaning the data: interpolation of bad channels, epoching and rejection of epochs with possible artifacts.
Read more >
The Harvard Automated Processing Pipeline for ... - Frontiers
The ROI-channel subset option allows users to tailor segment rejection for a specific ROI analysis if multiple ROIs were included in the ...
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