You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ENH: make mne python for CTF data preprocessing more friendly #7077
@NataKozh and I have been doing some data preprocessing with CTF data and we found that mne-python needs a few PR upgrades to integrate common preprocessing steps done when maxfilter is not used.
Namely:
Muscle artifacts detection detect_artifact_muscle
Detect data segments with muscle artifacts by bandpassing the data between 110-140 Hz, taking the envelope, z-scoreing and low pass filtering to smooth it. Then annotate the segments above a given threshold. This was written by @bloyl and is very similar to how fieldtrip detects muscle artifacts.
Head movement detection and head position correction, detect_artifact_movement & correct_head_pos
Detect segments where the head position is further away from a given threshold distance from the median head position during the recording. It iterates twice to find the median position during the segments with an acceptable head position. @bloyl was our source of inspiration and we are looking forward to his comments ;)
Another function that I would like to add:
Detect_bad_channels
It depends on the threshold used and it is useful to highlight the channels that might be bad, rather than an automatic step that does not require data visualization and inspection. It z-scores the data to find channel outliers based on power and/or does local correlation to find channels that do not capture similar magnetic fields as it's neighbour peers.
I would like to add these functions and make an example tutorial. Let me know what do you think and if you have any suggestions. @jasmainak
After computing the head position the head pos time series can be plotted (the horizontal line is the threshold, each line is the distance of one of the three cHPI to the median head position):
In this case, the participant moved slightly only during the brake
After computing muscle artifacts, the z-scores can be plotted:
Activity
agramfort commentedon Nov 18, 2019
AdoNunes commentedon Nov 18, 2019
What about the brainstorm auditory dataset? There are bad channels and maybe the subject moved at least a bit...
I will call the
find_outliersfunc from bads.jasmainak commentedon Nov 18, 2019
what about making a separate repository for these issues as we did with
pyprepin #7049?agramfort commentedon Nov 18, 2019
AdoNunes commentedon Nov 21, 2019
I think that at least the muscle artifact and movement annotation would be good to have it in MNE.
I have added a script example and the functions script on gist: https://gist.github.com/AdoNunes/b8edec72916543acdde716b6b23e926f
After computing the head position the head pos time series can be plotted (the horizontal line is the threshold, each line is the distance of one of the three cHPI to the median head position):

In this case, the participant moved slightly only during the brake
After computing muscle artifacts, the z-scores can be plotted:

and the annotations inspected:

agramfort commentedon Nov 21, 2019