Skip to content

Commit a432320

Browse files
authored
DOC: Add artifact-cleaning note to epoch quality example. (#13827)
1 parent 5011844 commit a432320

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

doc/conf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,13 @@
180180
"picard": ("https://mind-inria.github.io/picard/", None),
181181
"eeglabio": ("https://eeglabio.readthedocs.io/en/latest", None),
182182
"pybv": ("https://pybv.readthedocs.io/en/latest", None),
183-
# should go back below after https://github.com/dipy/dipy/issues/3870 is fixed
184-
"dipy": ("https://docs.dipy.org/1.12.0", None),
185183
}
186184
intersphinx_mapping.update(
187185
get_intersphinx_mapping(
188186
packages=set(
189187
"""
190188
imageio matplotlib numpy pandas python scipy statsmodels sklearn numba joblib nibabel
191-
seaborn patsy pyvista nilearn pyqtgraph
189+
seaborn patsy pyvista dipy nilearn pyqtgraph
192190
""".strip().split()
193191
),
194192
)

examples/preprocessing/plot_epoch_quality.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,14 @@
111111
# :meth:`mne.Epochs.drop` method. Here, we remove the worst scoring epochs (≥ 0.6)
112112
# which contained strong artifact activity. The remaining good epochs can then be used
113113
# for further analysis.
114+
#
115+
# .. admonition:: Repairing and retaining epochs with artifacts
116+
#
117+
# In this case, the large frontal deflections are likely blink artifacts, so
118+
# dropping is not the only option. For artifacts like these, it can be
119+
# preferable to repair the data and keep more epochs, for example with
120+
# :ref:`ICA <tut-artifact-ica>` or
121+
# :ref:`regression-based artifact correction <tut-artifact-regression>`.
114122
epochs.drop(np.where(scores >= 0.6)[0])
115123
print(f"Epochs remaining after dropping scores ≥ 0.6: {len(epochs)}")
116124

0 commit comments

Comments
 (0)