mne-denoise provides artifact-suppression and signal-denoising methods for
EEG and MEG, with NumPy and MNE-Python integration.
The package contains several complementary methods for spatial, spectral,
statistical, and source-informed denoising. Many methods accept MNE Raw,
Epochs, and Evoked objects directly, and sklearn-style estimators are
provided where that interface fits the method.
See the user guide and API reference for method selection and exact contracts. Experimental APIs are identified in the documentation.
Python 3.12 or newer is required.
Base package — pip install mne-denoise
MNE-Python integration — pip install "mne-denoise[mne]"
Visualization (Matplotlib + Seaborn) — pip install "mne-denoise[viz]"
Progress bars (tqdm) — pip install "mne-denoise[progress]"
The example assumes that raw is an MNE Raw object loaded with
preload=True; install the mne extra to use it.
from mne_denoise.spectrum_interpolation import SpectrumInterpolation
# `raw` is an mne.io.Raw object loaded with preload=True.
# Set line_freq to the mains frequency in your recording.
cleaner = SpectrumInterpolation(line_freq=60.0, n_harmonics=3)
clean_raw = cleaner.fit_transform(raw)When using mne-denoise in scientific work, cite both the software and the primary publication(s) for the method(s) used in your analysis. See the citation guidance.
Contributions are welcome. See CONTRIBUTING.md for the human contribution guide.
BSD 3-Clause License. See LICENSE for details.