ica_processing.apply_ica_rejection#

autoclean.functions.ica.ica_processing.apply_ica_rejection(raw, ica, components_to_reject, copy=True, verbose=None)[source]#

Apply ICA to remove specified components from EEG data.

This function applies the ICA transformation to remove specified artifact components from the EEG data, effectively cleaning the signal.

Parameters:
rawmne.io.Raw

The raw EEG data to clean.

icamne.preprocessing.ICA

The fitted ICA object.

components_to_rejectlist of int

List of component indices to remove from the data.

copybool, default True

If True, returns a copy of the data. If False, modifies in place.

verbosebool or None, default None

Control verbosity of output.

Returns:
raw_cleanedmne.io.Raw

The cleaned EEG data with artifact components removed.

See also

fit_ica

Fit ICA decomposition to EEG data

classify_ica_components

Classify ICA components

mne.preprocessing.ICA.apply

Apply ICA transformation

Examples

>>> raw_clean = apply_ica_rejection(raw, ica, [0, 2, 5])