# MNE-BIDS-Pipeline processing MEG and EEG together

**URL:** <https://mne.discourse.group/t/mne-bids-pipeline-processing-meg-and-eeg-together/7129>\
**Category:** Support & Discussions\
**Tags:** mne-bids-pipeline\
**Created:** [June 21, 2023, 2:01pm UTC](https://mne.discourse.group/t/mne-bids-pipeline-processing-meg-and-eeg-together/7129 "2023-06-21T14:01:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![allermat](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/allermat/32/43_2.png) [@allermat](https://mne.discourse.group/u/allermat)\
**Post date:** [June 21, 2023, 2:01pm UTC](https://mne.discourse.group/t/mne-bids-pipeline-processing-meg-and-eeg-together/7129/1 "2023-06-21T14:01:47Z")

</div>

Hi All,

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

````python
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:

```python
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

```

---

<div class="post-metadata">

**Author:** ![drammock](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/drammock/32/4_2.png) [@drammock](https://mne.discourse.group/u/drammock)\
**Post date:** [June 23, 2023, 7:49pm UTC](https://mne.discourse.group/t/mne-bids-pipeline-processing-meg-and-eeg-together/7129/2 "2023-06-23T19:49:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![allermat](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/allermat/32/43_2.png) [@allermat](https://mne.discourse.group/u/allermat)\
**Post date:** [June 26, 2023, 10:55am UTC](https://mne.discourse.group/t/mne-bids-pipeline-processing-meg-and-eeg-together/7129/3 "2023-06-26T10:55:33Z")

</div>

Just to follow up on this, a colleague of mine pointed out to me that [the MNE Sample Data example](https://mne.tools/mne-bids-pipeline/dev/examples/ds000248_base.html) on the mne-bids-pipeline pages also uses `ch_types = ["meg", "eeg"]`. So, is this likely a documentation error then?

---

<div class="post-metadata">

**Author:** ![larsoner](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/larsoner/32/3_2.png) [@larsoner](https://mne.discourse.group/u/larsoner)\
**Post date:** [June 26, 2023, 1:00pm UTC](https://mne.discourse.group/t/mne-bids-pipeline-processing-meg-and-eeg-together/7129/4 "2023-06-26T13:00:13Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![allermat](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/allermat/32/43_2.png) [@allermat](https://mne.discourse.group/u/allermat)\
**Post date:** [June 26, 2023, 2:52pm UTC](https://mne.discourse.group/t/mne-bids-pipeline-processing-meg-and-eeg-together/7129/5 "2023-06-26T14:52:16Z")

</div>

Thanks @larsoner, I’m happy to make a PR.

---

<div class="post-metadata">

**Author:** ![allermat](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/allermat/32/43_2.png) [@allermat](https://mne.discourse.group/u/allermat)\
**Post date:** [June 26, 2023, 4:13pm UTC](https://mne.discourse.group/t/mne-bids-pipeline-processing-meg-and-eeg-together/7129/6 "2023-06-26T16:13:31Z")

</div>

This has been fixed: [Issue#744fix by allermat · Pull Request #745 · mne-tools/mne-bids-pipeline · GitHub](https://github.com/mne-tools/mne-bids-pipeline/pull/745)
