Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion examples/preprocessing/plot_epoch_quality.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@
# Following visual inspection, bad epochs can be discarded using the
# :meth:`mne.Epochs.drop` method. Here, we remove the worst scoring epochs (≥ 0.6)
# which contained strong artifact activity. The remaining good epochs can then be used
# for further analysis.
# for further analysis. In this case, the large frontal deflections are likely blink
# artifacts, so dropping is not the only option. For artifacts like these, it can be
# preferable to repair the data and keep more epochs, for example with
# :ref:`ICA <tut-artifact-ica>` or
# :ref:`regression-based artifact correction <tut-artifact-regression>`.
epochs.drop(np.where(scores >= 0.6)[0])
print(f"Epochs remaining after dropping scores ≥ 0.6: {len(epochs)}")

Expand Down
Loading