I have applied the following workflow for automated artifact rejection (based on this example).
# Autoreject (local) to clean epochs before ICA ar_pre_ica = AutoReject(random_state = seed).fit(epochs[:20]) _, reject_log = ar_pre_ica.transform(epochs, return_log = True) # Fit ICA on non-artifactual epochs ica = mne.preprocessing.ICA(random_state = seed) ica.fit(epochs[~reject_log.bad_epochs]) # Exclude blink artifact components (use Fp1 as EOG proxy) epochs_eog = mne.preprocessing.create_eog_epochs(raw = raw, ch_name = 'Fp1') eog_idx, eog_scores = ica.find_bads_eog(epochs_eog, ch_name = 'Fp1', verbose = 2) ica.exclude = eog_idx # Apply ICA epochs_clean = ica.apply(epochs.copy()) # Autoreject (local) on blink-artifact-free epochs ar_post_ica = AutoReject(random_state = seed).fit(epochs_clean[:20]) epochs_clean = ar_post_ica.transform(epochs_clean)
The thing is,
find_bads_eog does not seem to catch the blink artifact components despite they are quite evident. Actually, the
eog_scores of the two first ICA components are
-0.77, however I get
eog_idx = 
Below is the plot of the ICA components.
I have also tried using
n_components = 0.99 to reduce the number of components. In this case, the two blink components are combined into a single component with an
eog_score = 0.97, however,
find_bads_eog still does not catch this component as
eog_idx = .
Does anyone know why this happens? Thanks.