Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENH] Reject ICA components based on muscle artifact #10514

Closed
alexrockhill opened this issue Apr 11, 2022 · 7 comments · Fixed by #10534
Closed

[ENH] Reject ICA components based on muscle artifact #10514

alexrockhill opened this issue Apr 11, 2022 · 7 comments · Fixed by #10534
Labels

Comments

@alexrockhill
Copy link
Contributor

@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.

@alexrockhill
Copy link
Contributor Author

How large the problem is https://doi.org/10.1016/j.clinph.2007.04.027 (pretty thorough, used neuromuscular block to paralyze face and head muscles) how the ICA solution should look https://ieeexplore.ieee.org/document/7590828

@alexrockhill
Copy link
Contributor Author

Ok might need to be updated because the existing frequency range in MNE of 110-140 Hz doesn't match

Spectral slope measures the gradient (straight line fit) of the log-log power spectrum of an IC between 7 and 75 Hz, a putative frequency range for muscle. ICs of muscular origin are expected to have positive slopes, whereas ICs of neural origin are expected to have negative slopes

from the second paper.

The other two criteria that they call for are distance from the vertex (since less muscle up there) and smoothness (topologically mixed ICs are probably mixed muscle and brain activity)

@alexrockhill
Copy link
Contributor Author

Does anyone know if muscle artifact is a big component of MEG? Maybe @larsoner or @agramfort?

@AdoNunes
Copy link
Contributor

Ok might need to be updated because the existing frequency range in MNE of 110-140 Hz doesn't match

Spectral slope measures the gradient (straight line fit) of the log-log power spectrum of an IC between 7 and 75 Hz, a putative frequency range for muscle. ICs of muscular origin are expected to have positive slopes, whereas ICs of neural origin are expected to have negative slopes

from the second paper.

The other two criteria that they call for are distance from the vertex (since less muscle up there) and smoothness (topologically mixed ICs are probably mixed muscle and brain activity)

The 110-140 Hz range was based on fieldtrip's parameter. It seems that this frequency range is good enough for detecting muscle activity and not being confounded by other signals. For the most part, muscle artifacts are quite obvious, at least large ones like jaw clenching, and at that frequency range the algorithm does a good job in detecting them. But as you mention, there might be better criteria to detect muscle activity.

@alexrockhill
Copy link
Contributor Author

Thanks for chiming in @AdoNunes! Good to know that's from FieldTrip, maybe when I do the PR I will add that to the example because I think those sources are super helpful to include.

I think there's two separate problems that you alluded to, gross movements like jaw clenching that ruin epochs and should not try and be salvaged compared to postural muscle activity like that which is omnipresent in T8/9. I think the second type of movement is important to be compensated for by ICA and is not done currently. The gross movements I think are well accounted for by your example and I think autoreject does a good job picking that up too. The Journal of Clinical Neurophysiology reference claims there is more EMG than EEG signal based on paralyzing (i.e. on a ventilator!) experimenters in their lab so I think we should mention and try and account for this in the MNE tutorials.

@agramfort
Copy link
Member

agramfort commented Apr 11, 2022 via email

@alexrockhill
Copy link
Contributor Author

alexrockhill commented 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants