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:
- raw
mne.io.Raw
The raw EEG data to clean.
- ica
mne.preprocessing.ICA
The fitted ICA object.
- components_to_reject
list
ofint
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.
- raw
- Returns:
- raw_cleaned
mne.io.Raw
The cleaned EEG data with artifact components removed.
- raw_cleaned
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])