API reference#
ASR#
Artifact Subspace Reconstruction (ASR) scikit-learn transformer. |
|
Adaptive Artifact Subspace Reconstruction (AASR) estimator. |
|
Juggler Artifact Subspace Reconstruction (JugglerASR). |
|
DSS-biased soft Artifact Subspace Reconstruction (experimental). |
|
Calibrate a standard ASR model from continuous data. |
|
Compute a statistical retained-sample mask for continuous data. |
|
Fit robust clean EEG RMS statistics. |
|
Apply a calibrated ASR model to continuous data. |
|
Apply a calibrated ASR state with guided soft reconstruction. |
|
Select calibration samples using Juggler's ASR rules. |
Warning
GuidedASR and process_guided_asr are unpublished, unvalidated
experimental research prototypes. Their current evidence is limited to unit
tests and synthetic benchmarks; independently validate signal preservation
and artifact attenuation before scientific use.
DSS#
Compute DSS spatial filters from baseline and biased covariances. |
|
Denoising Source Separation (DSS) Transformer. |
|
Trial-average DSS in a lag-augmented sensor space. |
|
Extract multiple DSS components using iterative (nonlinear) algorithm. |
|
Iterative (Nonlinear) Denoising Source Separation Transformer. |
ZapLine#
ZapLine Transformer for line noise removal. |
Spectrum interpolation#
Remove power-line noise by amplitude spectrum interpolation. |
|
Remove line noise from 2D data by amplitude spectrum interpolation. |
iCanClean#
ICanClean Transformer for reference-based artifact removal. |
|
Compute one iCanClean pass on continuous NumPy arrays. |
BSS-CCA#
Reference-free BSS-CCA artifact-attenuation estimator. |
|
Learn and apply reference-free BSS-CCA to a channel-first array. |
SNS#
Sensor Noise Suppression estimator. |
|
Learn and apply Sensor Noise Suppression to a channel-first array. |
|
Compute the SNS spatial operator from a channel covariance matrix. |
SSA#
Frequency-guided per-channel Basic SSA transformer. |
|
Local-SSA high-amplitude artifact transformer. |
|
Decompose a one-dimensional series into additive Basic SSA components. |
|
Compute weighted correlations between SSA reconstructions. |
|
Apply frequency-guided Basic SSA independently to every channel. |
|
Clean one channel by grouping Basic SSA components by frequency. |
|
Apply local SSA independently to every input channel. |
|
Remove a locally reconstructed high-energy artifact from one channel. |
Denoisers#
Base class for linear bias functions. |
|
Bias function for finding repeatable components via averaging. |
|
Fixed-window event-locked averaging bias. |
|
Bandpass filter bias for narrow-band rhythm extraction. |
|
A bias LinearDenoiser for line noise isolation (Notch/IIR or FFT/Harmonic). |
|
Peak filter bias for single-frequency extraction. |
|
Comb filter bias for harmonic frequency extraction. |
|
Lag-averaging bias for emphasizing temporally smooth signals. |
|
Unified temporal smoothing bias (Moving Average). |
|
Linear spectrogram bias (Section 4.1.3). |
|
Base class for nonlinear/adaptive denoiser functions. |
|
Tanh mask denoiser (Standard FastICA nonlinearity). |
|
Robust tanh denoiser (FastICA / RobustICA formulation). |
|
Kurtosis maximization denoiser. |
|
Skewness nonlinearity (FastICA 'skew'). |
|
Gaussian nonlinearity (FastICA 'gauss'). |
|
Adaptive Wiener mask denoiser. |
|
Adaptive/Nonlinear spectrogram denoiser (Section 4.1.3). |
|
DCT domain denoiser (MATLAB denoise_dct.m). |
|
Quasi-periodic denoiser via cycle averaging. |
Variants#
Create an ordinary DSS configured for temporally smooth sources. |
|
Create a DSS configured for a specific frequency band. |
|
Scan frequencies to find optimal narrowband DSS components. |
|
Create a DSS configured for SSVEP extraction. |
Quality Assurance#
Attenuation (dB) of the dominant peak around a target frequency. |
|
Suppression ratio (dB) of mean band power around a target frequency. |
|
Residual peak-to-surround power ratio around a target frequency. |
|
Broadband spectral distortion (dB) outside excluded noise bands. |
|
Spectral distortion (dB RMS) at non-harmonic frequencies. |
|
Fraction of channels where the spectral floor is over-suppressed. |
|
Fraction of channels where the line-noise peak remains prominent. |
|
Geometric mean of |
|
Percentage of total variance removed after denoising. |
|
Compute all QA metrics for a line-noise removal benchmark. |
|
Root mean square (RMS) of the difference between before and after signals. |
|
Maximum absolute change between before and after signals. |
|
Per-channel variance ratio: var(after) / var(before). |
Visualization#
Plot the per-window count of reconstructed components over time. |
|
Bar chart of the clean calibration fraction for one or more estimators. |
|
Heatmap of per-window component variance relative to rejection thresholds. |
|
Plot experimental GuidedASR soft weights by window and component. |
|
Plot a compact per-component summary dashboard. |
|
Plot an interactive component selector for DSS or standard ZapLine. |
|
Plot stacked component time series with fixed vertical offsets. |
|
Plot a time-frequency power view for one component. |
|
Plot a 1D component score curve for a fitted estimator. |
|
Plot per-window score traces from a 2D score matrix. |
|
Plot spatial component patterns. |
|
Plot component activity as an epoch-by-time image. |
|
Plot PSD comparison for original and denoised data. |
|
Plot GFP comparison for before/after signals. |
|
Plot before/after channel time courses for explicit channel picks. |
|
Plot a topomap of preserved power ratio after denoising. |
|
Compare before/after spectrograms averaged across selected channels. |
|
Overlay one before/after trace to inspect reconstruction quality. |
|
Plot input PSD next to PSDs of selected components. |
|
Plot group-mean evoked responses with optional SEM bands. |
|
Plot score/eigenvalue profiles from a narrowband scan. |
|
Visualize a time-frequency mask matrix. |
|
Plot grouped bar charts for one or more scalar metrics. |
|
Plot a per-window count or metric series. |
|
Plot a grouped x/y trade-off scatter with optional group means. |
|
Plot one metric as grouped bars or paired subject trajectories. |
|
Plot subject-level paired trajectories for one or more metrics. |
|
Plot violin + strip distributions with optional paired subject lines. |
|
Plot a null-distribution histogram with observed statistic and CI. |
|
Plot per-subject point estimates with confidence intervals. |
|
Plot grouped per-harmonic attenuation bars for line-noise studies. |
|
Plot a two-panel metric trade-off summary. |
|
Plot a generic denoising diagnostics dashboard. |
|
Plot a generic component-cleaning dashboard. |
|
Plot grouped time-domain signal diagnostics. |
|
Plot condition-by-group interaction traces. |
|
Plot group-wise condition interaction traces. |
|
Plot a generic endpoint-metric storyboard. |
plot_component_selector return object#
- class mne_denoise.viz.ComponentSelector(*, estimator: Any, data: Any, fig: Any, state: _SelectionState, excluded: list[int])[source]#
Selection controller returned by
plot_component_selector().The controller stores the current component selection and the cached data needed by the live preview. Use
excludedto inspect the selection andapply()to reconstruct the selected signal.Notes
This class is a public return type, but direct construction is not part of the public API. Create instances with
plot_component_selector().- apply(data: Any = None) Any[source]#
Apply the current selection while preserving the input data type.
- Parameters:
data (Raw | Epochs | Evoked | ndarray | None, default=None) – Data to reconstruct. If None, use the cached snapshot supplied to
plot_component_selector(). Passing data explicitly computes fresh component sources for that input.- Returns:
cleaned – Reconstructed data with the same type and layout as the input. Channels not used by the fitted estimator are preserved for MNE objects.
- Return type:
Raw | Epochs | Evoked | ndarray