mne-tools / mne-python

MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
https://mne.tools
BSD 3-Clause "New" or "Revised" License
2.66k stars 1.31k forks source link

question about ICA : corrmap with multiple template #8289

Open aayrolles opened 3 years ago

aayrolles commented 3 years ago

Dear MNE team, I'm using corrmap() for independent components analysis, is it possible to use more than one component as template? For exemple selecting blinks and ecg components as the same time?

For exemple:

subj_number = [0] component_numbers = [1, 3] template_components = icas[subj_number].get_components()[component_numbers] fig_template, fig_detected = corrmap(icas, template=template_components, threshold=0.9, label='artifacts', ch_type='eeg')

But I get an error when doing this, corrmap seems not to support template larger than (subject_index, component_index) is there another way to do it?

Thanks

mmagnuski commented 3 years ago

I'd run corrmap twice - onece for blinks and then once for ecg, but I've never actually used corrmap so I can't guarantee that it will work.