@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
If you want to have a look at the functions we have them on: https://github.com/AdoNunes/ASD_MNE_pipe/blob/master/MNEprepro.py
@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_muscleDetect 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_posDetect 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_channelsIt 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
If you want to have a look at the functions we have them on: https://github.com/AdoNunes/ASD_MNE_pipe/blob/master/MNEprepro.py