mne_denoise.viz.ComponentSelector#

class mne_denoise.viz.ComponentSelector(*, estimator: Any, data: Any, fig: Any, state: _SelectionState, excluded: list[int])[source]#

Selection controller returned by plot_component_selector().

Parameters:
estimatorDSS | IterativeDSS | ZapLine

Fitted estimator associated with the selection. Direct construction is an internal operation; normally this is supplied by plot_component_selector().

dataRaw | Epochs | Evoked | ndarray | None

Cached input used by the selector’s preview and by apply() when no replacement data is supplied.

figmatplotlib.figure.Figure

Figure owned by the selector.

stateobject

Internal cached component-state object created by plot_component_selector().

excludedsequence of int

Component indices initially excluded from the reconstruction.

apply(data: Any = None) Any[source]#

Apply the current selection while preserving the input data type.

Parameters:
dataRaw | 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:
cleanedRaw | Epochs | Evoked | ndarray

Reconstructed data with the same type and layout as the input. Channels not used by the fitted estimator are preserved for MNE objects.

property excluded: list[int]#

Return sorted component indices excluded from the clean output.

property n_pages: int#

Number of pages needed to display every selectable component.

property page: int#

Zero-based index of the currently displayed page of components.

set_page(page: int) None[source]#

Display a page of components, clamped to the available range.

Parameters:
pageint

Zero-based page index. Values outside [0, n_pages - 1] are clamped rather than raising, so scroll and key handlers can call this without bounds checks.