mne_denoise.viz.plot_component_selector#
- mne_denoise.viz.plot_component_selector(estimator: DSS | IterativeDSS | ZapLine, data: Any, *, info: mne.Info | None = None, picks: Sequence[int] | np.ndarray | None = None, times: np.ndarray | None = None, n_components: int | Sequence[int] | np.ndarray | None = None, rows_per_page: int = 3, preview: bool = True, sfreq: float | None = None, psd_fmax: float | None = None, show: bool = True, fname: Any = None) ComponentSelector[source]#
Plot an interactive component selector for DSS or standard ZapLine.
- Parameters:
- estimatorDSS | IterativeDSS | ZapLine
Fitted estimator. ZapLine must use standard mode (
adaptive=False).- dataRaw | Epochs | Evoked | ndarray
Data used to compute component sources and the live preview.
- infomne.Info | None, default=None
Sensor metadata. This can be inferred from a fitted estimator for the sampling frequency, but topomaps require both explicit
infoand explicitpicks.- picksarray-like of int | None, default=None
Channel indices used for topomaps. Requires an explicitly supplied
info. If None, the spatial-pattern panels contain a placeholder.- timesarray | None, default=None
Time coordinates for component traces. The length must match the per-epoch time dimension, or the continuous sample count for Raw, Evoked, and two-dimensional arrays. If None, sample indices are used.
- n_componentsint | array-like of int | None, default=None
Components displayed and made clickable. An integer selects the first requested components; a sequence selects explicit component indices. If None, all fitted components are selectable, spread over pages.
- rows_per_pageint, default=3
Component rows drawn per page. This fixes the figure height regardless of how many components are selectable.
- previewbool, default=True
Add a live reference/selection GFP and PSD preview.
- sfreqfloat | None, default=None
Sampling frequency used for PSDs when
infois unavailable.- psd_fmaxfloat | None, default=None
Maximum PSD frequency. If None, use
min(100, sfreq / 2).- showbool, default=True
Show the figure.
- fnamepath-like | None, default=None
Optional path at which to save the figure.
- Returns:
- selectorComponentSelector
Selection controller. Read
selector.excludedand callselector.apply()to obtain the current reconstruction.
- Raises:
- TypeError
If
estimatoris not a supported estimator.- RuntimeError
If the estimator is not fitted.
- NotImplementedError
If adaptive ZapLine is supplied.
- ValueError
If the data, plotting coordinates, or frequency parameters are invalid.