# De-artifacting 2-4 channel EEG data

**URL:** <https://mne.discourse.group/t/de-artifacting-2-4-channel-eeg-data/2819>\
**Category:** Support & Discussions\
**Tags:** preprocessing, eeg\
**Created:** [March 11, 2021, 3:44am UTC](https://mne.discourse.group/t/de-artifacting-2-4-channel-eeg-data/2819 "2021-03-11T03:44:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![barlehmann](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/barlehmann/32/277_2.png) [@barlehmann](https://mne.discourse.group/u/barlehmann)\
**Post date:** [March 11, 2021, 3:44am UTC](https://mne.discourse.group/t/de-artifacting-2-4-channel-eeg-data/2819/1 "2021-03-11T03:44:07Z")

</div>

I am working to analyze EEG of 2-4 active electrodes (not counting the ground and references electrodes) from some neurofeedback training, and wondering if anyone has any particular suggestions on good automated de-artifacting algorithms or protocols for such a low number of electrodes. Most de-artifacting algorithms and ICA seem to use methods that are specifically geared to at least 11 and typically many more channels.

---

<div class="post-metadata">

**Author:** ![sappelhoff](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sappelhoff/32/3276_2.png) [@sappelhoff](https://mne.discourse.group/u/sappelhoff)\
**Post date:** [March 11, 2021, 9:36am UTC](https://mne.discourse.group/t/de-artifacting-2-4-channel-eeg-data/2819/2 "2021-03-11T09:36:05Z")

</div>

EDIT: Didn’t read carfully enough – my text only refers to **rejection** , not **correction** … sorry 🙂

[mne.preprocessing.annotate\_flat](https://mne.tools/dev/generated/mne.preprocessing.annotate_flat.html?highlight=annotate#mne.preprocessing.annotate_flat) and [mne.preprocessing.annotate\_muscle\_zscore](https://mne.tools/dev/generated/mne.preprocessing.annotate_muscle_zscore.html?highlight=annotate#mne.preprocessing.annotate_muscle_zscore) should work normally, and help you to mark time segments in your data that you may want to reject from analysis (that is, disregard/drop them when forming epochs).

Other than that, a simple “peak to peak” rejection criterion may serve you well. You need to define a threshold (in `µV`) that you deem “too high”, and then go over your data in time windows (or epochs), check for highest difference in peaks (`abs(lowest_peak - highest_peak)`) and reject that time window (epoch) when it surpasses your threshold.

I am not aware of a function in MNE that does that, but you could build your own using:

- [mne.preprocessing.peak\_finder — MNE 0.23.dev0 documentation](https://mne.tools/dev/generated/mne.preprocessing.peak_finder.html?highlight=peak#mne.preprocessing.peak_finder)
- [mne.make\_fixed\_length\_epochs — MNE 0.23.dev0 documentation](https://mne.tools/dev/generated/mne.make_fixed_length_epochs.html?highlight=fixed_length#mne.make_fixed_length_epochs)

---

<div class="post-metadata">

**Author:** ![cbrnr](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/cbrnr/32/1409_2.png) [@cbrnr](https://mne.discourse.group/u/cbrnr)\
**Post date:** [March 11, 2021, 3:04pm UTC](https://mne.discourse.group/t/de-artifacting-2-4-channel-eeg-data/2819/3 "2021-03-11T15:04:00Z")

</div>

If you have EOG channels, you could regress out ocular artifacts. If you really have only 2-4 EEG channels I am not aware of any artifact correction method.
