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.

[ENH] Reject ICA components based on muscle artifact

See original GitHub issue

@AdoNunes wrote this code + example https://mne.tools/dev/auto_examples/preprocessing/muscle_detection.html to detect muscle artifacts in epochs but I think it’s helpful to apply muscle classification to ICA components for EEG which I don’t think is documented. The thought is to use annotate_muscle_zscore on ICA components. This is really important for TMS-EEG but also pretty important for just EEG, depending on how relaxed the subject’s head and face is. Potentially we could use TMS-EEG data from OpenNeuro, there is one dataset. I think maybe not necessary though.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
agramfortcommented, Apr 11, 2022

MEG is not too artifacted my EMG. At least much less than EEG and for most common protocols

my 2c

Message ID: @.***>

0reactions
alexrockhillcommented, Apr 13, 2022

I’ve looked at the sample data and the muscle components are non-existent in MEG as far as I can tell.

One complication is that, for the default topomap, the properties plot for MEG and EEG data is magnetometers and, since the muscle artifacts don’t show up pretty much at all on magnetometers and since the topography is the main confirmation, that makes it difficult to use. You can programmatically pass topomap_args=dict(ch_type='eeg') but it would be nice to add a keyboard shortcut to toggle the topomap type. I think pretty easy to do as well.

This is what typical muscle artifacts look like in my experience and in the paper cited above. They are very low ICA components with MEG so it would probably be better to split this out into a separate example with just EEG (although if I were analyzing simultaneous MEG and EEG, I would probably want to go through even these low components to remove them from the EEG or compute ICA separately by channel type).

Also, from what I understand the “spiky” nature of the ICA components is a giveaway and is the firing of a single motor unit for that muscle.

Screen Shot 2022-04-13 at 4 26 54 PM Screen Shot 2022-04-13 at 4 44 55 PM
Read more comments on GitHub >

github_iconTop Results From Across the Web

Automatic Classification of Artifactual ICA-Components for ...
We propose a universal and efficient classifier of ICA components for the subject independent removal of artifacts from EEG data. Based on ...
Read more >
Removal of muscular artifacts in EEG signals - NCBI - NIH
The most widespread technique to reduce muscle artifacts in EEG recordings ... They find that mutual information-based ICA methods such as ...
Read more >
Robust artifactual independent component classification for ...
Objective. EEG artifacts of non-neural origin can be separated from neural signals by independent component analysis (ICA).
Read more >
Improved rejection of artifacts from EEG data using high-order ...
We show that for this or other methods ICA preprocessing can improve the detection of data epochs containing eye, muscle, and electrical artifacts...
Read more >
A Novel Method Based on Combination of Independent ...
Another most classic method based on the independent component analysis (ICA) algorithm has been widely employed for artifacts rejection in EEG ...
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