MNE-BIDS-Pipeline processing MEG and EEG together

Hi All,

I just noticed that the documentation of the pipeline says that MEG and EEG data cannot be processed together, see config:

ch_types: Iterable[Literal["meg", "mag", "grad", "eeg"]] = ['meg', 'eeg']
"""
The channel types to consider.

!!! info
    Currently, MEG and EEG data cannot be processed together.

???+ example "Example"
    ```python
    # Use EEG channels:
    ch_types = ['eeg']

    # Use magnetometer and gradiometer MEG channels:
    ch_types = ['mag', 'grad']

    # Currently does not work and will raise an error message:
    ch_types = ['meg', 'eeg']
    ```
"""

I hadnโ€™t noticed this info before and have been processing MEG and EEG together with the pipeline without an error (at least no error specifically because of this) for the past couple of months. So Iโ€™m wondering if the documentation is wrong here or is it still valid and I should process MEG and EEG separately?

Many thanks,
Mรกtรฉ

System info:

Platform             Linux-3.10.0-1160.el7.x86_64-x86_64-with-glibc2.17
Python               3.11.3 | packaged by conda-forge | (main, Apr  6 2023, 08:57:19) [GCC 11.3.0]
Executable           /home/ma09/.conda/envs/my_mne1.4/bin/python
CPU                  x86_64 (32 cores)
Memory               251.4 GB

Core
โ”œโ˜‘ mne               1.4.0
โ”œโ˜‘ numpy             1.24.3 (OpenBLAS 0.3.23 with 32 threads)
โ”œโ˜‘ scipy             1.10.1
โ”œโ˜‘ matplotlib        3.7.1 (backend=agg)
โ”œโ˜‘ pooch             1.7.0
โ””โ˜‘ jinja2            3.1.2

Numerical (optional)
โ”œโ˜‘ sklearn           1.2.2
โ”œโ˜‘ numba             0.57.0
โ”œโ˜‘ nibabel           5.1.0
โ”œโ˜‘ nilearn           0.10.1
โ”œโ˜‘ dipy              1.7.0
โ”œโ˜‘ openmeeg          2.5.6
โ”œโ˜‘ pandas            2.0.2
โ””โ˜ unavailable       cupy

Visualization (optional)
โ”œโ˜‘ pyvista           0.39.1 (OpenGL unavailable)
โ”œโ˜‘ pyvistaqt         0.0.0
โ”œโ˜‘ ipyvtklink        0.2.2
โ”œโ˜‘ vtk               9.2.6
โ”œโ˜‘ qtpy              2.3.1 (None=None)
โ”œโ˜‘ pyqtgraph         0.13.3
โ”œโ˜‘ mne-qt-browser    0.0.0
โ””โ˜ unavailable       ipympl

Ecosystem (optional)
โ”œโ˜‘ mne-bids          0.12
โ”œโ˜‘ mne-bids-pipeline 1.3.0
โ””โ˜ unavailable       mne-nirs, mne-features, mne-connectivity, mne-icalabel

ping @richard @agramfort @larsoner question about processing EEG and MEG simultaneously in MNE-BIDS-pipeline

1 Like

Just to follow up on this, a colleague of mine pointed out to me that the MNE Sample Data example on the mne-bids-pipeline pages also uses ch_types = ["meg", "eeg"]. So, is this likely a documentation error then?

Yes I think it should be possible nowadays so the docs are just out of date. Would you be up for a PR to fix it?

1 Like

Thanks @larsoner, Iโ€™m happy to make a PR.

This has been fixed: Issue#744fix by allermat ยท Pull Request #745 ยท mne-tools/mne-bids-pipeline ยท GitHub

1 Like