mne-tools / mne-bids-pipeline

Automatically process entire electrophysiological datasets using MNE-Python.
https://mne.tools/mne-bids-pipeline/
BSD 3-Clause "New" or "Revised" License
137 stars 65 forks source link

SSP cannot be used with EEG data that doesn't contain an ECG sensor #798

Open hoechenberger opened 10 months ago

hoechenberger commented 10 months ago

I wanted to try out SSP for EOG artifact removal from my EEG data. I don't have an ECG channel and this makes impossible to use SSP in the pipeline, because we always try to create projectors for both, EOG and ECG, and the latter naturally fails for me:

https://github.com/mne-tools/mne-bids-pipeline/blob/9904fb3f31b4144c4efbcae2b657adb20298331c/mne_bids_pipeline/steps/preprocessing/_06b_run_ssp.py#L94

larsoner commented 10 months ago

To me you should just set n_proj_ecg=dict(eeg=0). Maybe we need to improve some error message suggesting to tweak f"n_proj_{kind}" to disable computing projectors of that kind if not desired?

hoechenberger commented 10 months ago

You're right, an error message improvement could already help!