mne.viz.plot_ica_overlay#
- mne.viz.plot_ica_overlay(ica, inst, exclude=None, picks=None, start=None, stop=None, title=None, show=True, n_pca_components=None, *, on_baseline='warn', verbose=None)[source]#
Overlay of raw and cleaned signals given the unmixing matrix.
This method helps visualizing signal quality and artifact rejection.
- Parameters:
- icainstance of
mne.preprocessing.ICA The ICA object.
- instinstance of
RaworEvoked The signal to plot. If
Raw, the raw data per channel type is displayed before and after cleaning. A second panel with the RMS for MEG sensors and the GFP for EEG sensors is displayed. IfEvoked, butterfly traces for signals before and after cleaning will be superimposed.- excludearray_like of
int|None(default) The components marked for exclusion. If
None(default), the components listed inICA.excludewill be used.- picks
str| array_like |slice|None Channels to include. Slices and lists of integers will be interpreted as channel indices. In lists, channel type strings (e.g.,
['meg', 'eeg']) will pick channels of those types, channel name strings (e.g.,['MEG0111', 'MEG2623']will pick the given channels. Can also be the string values “all” to pick all channels, or “data” to pick data channels. None (default) will pick all channels that were included during fitting.- start, stop
float|None The first and last time point (in seconds) of the data to plot. If
instis aRawobject,start=Noneandstop=Nonewill be translated intostart=0.andstop=3., respectively. ForEvoked,Nonerefers to the beginning and end of the evoked signal.- title
str|None The title of the generated figure. If
None(default), no title is displayed.- showbool
Show the figure if
True.- n_pca_components
int|float|None The number of PCA components to be kept, either absolute (int) or fraction of the explained variance (float). If None (default), the
ica.n_pca_componentsfrom initialization will be used in 0.22; in 0.23 all components will be used.New in v0.22.
- on_baseline
str How to handle baseline-corrected epochs or evoked data. Can be
'raise'to raise an error,'warn'(default) to emit a warning,'ignore'to ignore, or “reapply” to reapply the baseline after applying ICA.New in v1.2.
- verbosebool |
str|int|None Control verbosity of the logging output. If
None, use the default verbosity level. See the logging documentation andmne.verbose()for details. Should only be passed as a keyword argument.
- icainstance of
- Returns:
- figinstance of
Figure The figure.
- figinstance of