Hi everyone,
I am using the mne bids pipeline to process my EEG (currently on a single subject for testing). I first ran the pipeline on all channels, which successfully completed. I then restricted the channels to analyze for evoked potentials to a set of posterior-occip electrodes (I am interested in MMN).
MNE version: 1.6
MNE bids pipeline version: 1.5.0
OS: Ubuntu 22.04.2 LTS
# analyze_channels: Union[
# Literal["all"], Literal["ch_types"], Iterable["str"]
# ] = "ch_types"
analyze_channels = ['PO7','PO8','POz','PO4','PO3','O1','Oz','O2']
ββββββββββ¬ sensor/_01_make_evoked βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β11:36:13β β³οΈ sub-p015 ses-eeg Input: sub-p015_ses-eeg_task-seqPred_proc-clean_epo.fif
β11:36:13β β³οΈ sub-p015 ses-eeg Output: sub-p015_ses-eeg_task-seqPred_ave.fif
β11:36:13β β³οΈ sub-p015 ses-eeg Creating evoked data based on experimental conditions β¦
β11:36:14β β³οΈ sub-p015 ses-eeg Contrasting evoked responses β¦
β11:36:14β β³οΈ sub-p015 ses-eeg Adding 2 evoked responses and 1 contrast to the report.
β11:36:14β β³οΈ sub-p015 ses-eeg Adding config and sys info to report
β11:36:16β β³οΈ sub-p015 ses-eeg Saving report: /RAID1/jupytertmp/ahechler/data/eeg/derivatives/mne-bids-pipeline/sub-p015/ses-eeg/eeg/sub-p015_ses-eeg_task-seqPred_report.html
β11:36:17β β sub-p015 ses-eeg A critical error occurred. The error message was: 'types.SimpleNamespace' object has no attribute 'eeg_reference'
Aborting pipeline run. The traceback is:
File "/home/tumnic/ahechler/.conda/envs/pr_andre_2024/envs/mne/lib/python3.12/site-packages/mne_bids_pipeline/_run.py", line 54, in __mne_bids_pipeline_failsafe_wrapper__
out = memory.cache(func)(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tumnic/ahechler/.conda/envs/pr_andre_2024/envs/mne/lib/python3.12/site-packages/mne_bids_pipeline/_run.py", line 267, in wrapper
memorized_func(*args, **kwargs)
File "/home/tumnic/ahechler/.conda/envs/pr_andre_2024/envs/mne/lib/python3.12/site-packages/joblib/memory.py", line 655, in __call__
return self._cached_call(args, kwargs)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tumnic/ahechler/.conda/envs/pr_andre_2024/envs/mne/lib/python3.12/site-packages/joblib/memory.py", line 598, in _cached_call
out, metadata = self.call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tumnic/ahechler/.conda/envs/pr_andre_2024/envs/mne/lib/python3.12/site-packages/joblib/memory.py", line 856, in call
output = self.func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tumnic/ahechler/.conda/envs/pr_andre_2024/envs/mne/lib/python3.12/site-packages/mne_bids_pipeline/steps/sensor/_01_make_evoked.py", line 131, in run_evoked
_restrict_analyze_channels(evoked, cfg)
File "/home/tumnic/ahechler/.conda/envs/pr_andre_2024/envs/mne/lib/python3.12/site-packages/mne_bids_pipeline/_config_utils.py", line 419, in _restrict_analyze_channels
elif "eeg" in cfg.ch_types and cfg.eeg_reference == "average":
^^^^^^^^^^^^^^^^^
It seems like the reference electrodes were never correctly set. This is weird because the pipeline worked before I restricted the channels.
# eeg_reference: Union[Literal["average"], str, Iterable["str"]] = "average"
eeg_reference=['TP9','TP10']
I also checked that the channels are correctly named by comparing against the _electrodes.tsv created by BIDS converting my BrainVision files. Which other reasons could there be for this error?
Thanks for the help!
AndrΓ©