You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a setting ica_reject to remove bad epochs before fitting ICA. The epochs we feed into ICA are separate from the epochs we want to clean: they're high-pass filtered and they have drop_bad(reject=ica_reject) applied. This ensures ICA can be fit on epochs without flux / voltage spikes etc
Now in the apply_ica step, when we load the "actual" epochs we wish to clean, instead of simply applying ICA, we first call drop_bad(reject=ica_reject) too. In my opinion this is a bug, as normally we should be assuming that applying ICA may at least remove some of those high-amplitude artifacts. But if we reject those epochs before cleaning them via ICA, they're gone forever.
epochs_cleaned=ica.apply(epochs.copy()) # Copy b/c works in-place!
I think we should remove the drop_bad() call here. Any remaining large-amplitude artifacts after ICA cleaning will be caught in the following step, preprocessing/ptp_reject.
In an EEG dataset I'm currently working with, applying the PTP rejection threshold before applying ICA leads to a loss of many epochs that could have been saved through ICA
hoechenberger
changed the title
In sensor/apply_ica, we should not apply the ICA rejection threshold to the data before rejecting component
In sensor/apply_ica, we should not apply the ICA rejection threshold to the data before rejecting components
Nov 1, 2023
We have a setting
ica_reject
to remove bad epochs before fitting ICA. The epochs we feed into ICA are separate from the epochs we want to clean: they're high-pass filtered and they havedrop_bad(reject=ica_reject)
applied. This ensures ICA can be fit on epochs without flux / voltage spikes etcNow in the
apply_ica
step, when we load the "actual" epochs we wish to clean, instead of simply applying ICA, we first calldrop_bad(reject=ica_reject)
too. In my opinion this is a bug, as normally we should be assuming that applying ICA may at least remove some of those high-amplitude artifacts. But if we reject those epochs before cleaning them via ICA, they're gone forever.mne-bids-pipeline/mne_bids_pipeline/steps/preprocessing/_07a_apply_ica.py
Lines 102 to 115 in 1bc1e82
I think we should remove the
drop_bad()
call here. Any remaining large-amplitude artifacts after ICA cleaning will be caught in the following step,preprocessing/ptp_reject
.In an EEG dataset I'm currently working with, applying the PTP rejection threshold before applying ICA leads to a loss of many epochs that could have been saved through ICA
cc @agramfort
The text was updated successfully, but these errors were encountered: