# Enhancement Request: Support for Multiple Empty Room Recordings per Session/Subject in MNE-BIDS

**URL:** <https://mne.discourse.group/t/enhancement-request-support-for-multiple-empty-room-recordings-per-session-subject-in-mne-bids/11214>\
**Category:** Support & Discussions\
**Created:** [May 21, 2025, 5:19pm UTC](https://mne.discourse.group/t/enhancement-request-support-for-multiple-empty-room-recordings-per-session-subject-in-mne-bids/11214 "2025-05-21T17:19:50Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![TicTacTill](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/tictactill/32/1265_2.png) [@TicTacTill](https://mne.discourse.group/u/TicTacTill)\
**Post date:** [May 21, 2025, 5:19pm UTC](https://mne.discourse.group/t/enhancement-request-support-for-multiple-empty-room-recordings-per-session-subject-in-mne-bids/11214/1 "2025-05-21T17:19:50Z")

</div>

Dear MNE-BIDS developers,

I am in the process of converting my MEG dataset to BIDS format using MNE-BIDS. A particular challenge I’m facing is with empty room (ER) recordings. My experimental paradigm involves two ER recordings per session: one _before_ and one _after_ each participant’s recording session.

I’ve attempted to incorporate these multiple ER recordings by using the `task-noise_run-01`, `task-noise_run-02`, etc., naming convention for the ER files, as suggested in the discussion around issue #1373 (specifically, the comment [multiple empty room recordings · Issue #1373 · mne-tools/mne-bids · GitHub](https://github.com/mne-tools/mne-bids/issues/1373#issuecomment-2669590289)).

However, I’ve encountered limitations when trying to link these multiple ER recordings to the main experimental data:

1. **`write_raw_bids(empty_room=...)`**: This parameter appears to only support a single `Raw` object or path for the empty room recording. Passing a list of `Raw` objects (e.g., `empty_room = raw_er_list`) does not work, which is understandable given the current implementation.
2. **`update_sidecar_json(bids_path, {"AssociatedEmptyRoom": er_list})`**: While I can manually update the `_meg.json` sidecar file to include a list of ER paths under the `AssociatedEmptyRoom` field, the BIDS validator subsequently flags this as an error. This indicates that, as per current BIDS validation rules (or MNE-BIDS’s interpretation), only a single empty room recording is officially supported as a direct reference via this field.

This limitation means it’s currently not possible to directly associate multiple pre- and post-session empty room recordings within the BIDS structure in a validator-compliant way.

**My questions to the MNE-BIDS team are:**

- Would it be feasible to add native support within `mne_bids.write_raw_bids` (and potentially `mne_bids.BIDSPath.find_empty_room()`) for handling multiple empty room recordings ?
- In the interim, what is the recommended best practice for datasets with multiple empty room recordings per session? Should we simply choose the “most representative” (e.g., the first) empty room recording for the `AssociatedEmptyRoom` field and store the others as `task-noise` recordings without explicit linking? Or is there another BIDS-compliant approach that I’m overlooking?

Thank you in advance for your time and help.

Best regards,  
Till

---

<div class="post-metadata">

**Author:** ![sappelhoff](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sappelhoff/32/3276_2.png) [@sappelhoff](https://mne.discourse.group/u/sappelhoff)\
**Post date:** [May 22, 2025, 8:30am UTC](https://mne.discourse.group/t/enhancement-request-support-for-multiple-empty-room-recordings-per-session-subject-in-mne-bids/11214/2 "2025-05-22T08:30:16Z")

</div>

Hi @TicTacTill, there is an open issue on this on the mne-bids GitHub repo, please check it out: [support writing empty room as task-noise in subject's directory (not in sub-emptyroom) · Issue #1374 · mne-tools/mne-bids · GitHub](https://github.com/mne-tools/mne-bids/issues/1374)

Perhaps you could even open a PR to implement what you need.

---

<div class="post-metadata">

**Author:** ![TicTacTill](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/tictactill/32/1265_2.png) [@TicTacTill](https://mne.discourse.group/u/TicTacTill)\
**Post date:** [May 22, 2025, 9:54am UTC](https://mne.discourse.group/t/enhancement-request-support-for-multiple-empty-room-recordings-per-session-subject-in-mne-bids/11214/3 "2025-05-22T09:54:22Z")

</div>

Hi @sappelhoff,

Thanks for the fast reply. The issue is related, but my problem is slightly different: I’m suggesting a way to manage **multiple empty room recordings per subject** , regardless of whether they’re stored in `sub-emptyroom` or as `task-noise` .

This could, in principle, also be achieved within `sub-emptyroom` by refining the session data to include not just the day, but also **hours and minutes**. This would allow multiple empty room recordings to be stored within a single day.

Unfortunately, I’m not familiar enough with the MNE-BIDS implementation to implement this myself right now due to time constraints. 😕

Best,  
Till

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [May 22, 2025, 4:34pm UTC](https://mne.discourse.group/t/enhancement-request-support-for-multiple-empty-room-recordings-per-session-subject-in-mne-bids/11214/4 "2025-05-22T16:34:41Z")

</div>

Hello @TicTacTill,

according to the BIDS specification, your use case should be supported by specifying an array of paths to empty-room recordings in the `AssociatedEmptyRoom` field.

> **Name** : Associated Empty Room
> 
> **Type** : Metadata
> 
> **Description** : One or more [BIDS URIs](https://bids-specification.readthedocs.io/en/stable/common-principles.html#bids-uri) pointing to empty-room file(s) associated with the subject’s MEG recording. Using forward-slash separated paths relative to the dataset root is [DEPRECATED](https://bids-specification.readthedocs.io/en/stable/common-principles.html#definitions).
> 
> **Schema information** :
> 
> ```python
> anyOf:
> - items:
> anyOf:
> - format: dataset_relative
> type: string
> - format: bids_uri
> type: string
> type: array
> - format: dataset_relative
> type: string
> - format: bids_uri
> type: string
> 
> ```

> **[Glossary - Brain Imaging Data Structure 1.10.0](https://bids-specification.readthedocs.io/en/stable/glossary.html#associatedemptyroom-metadata)**

This means that we actually should enhance MNE-BIDS to support this – we’re currently not standard-compliant there! Would you be interested in helping out to add or at least test this?

Best wishes,  
Richard

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [May 23, 2025, 9:05am UTC](https://mne.discourse.group/t/enhancement-request-support-for-multiple-empty-room-recordings-per-session-subject-in-mne-bids/11214/5 "2025-05-23T09:05:11Z")

</div>

@sappelhoff I could imagine implementing the **writing** part of this; I think for **reading** / discovering the empty-room recordings, we’ll need to discuss the API and we might even need a deprecation cycle.

@TicTacTill Would just being able to **write** multiple ERs, without the possibility to **automatically** re-discover them, already help you? (i.e., you could manually construct the correct BIDS path to the ERs as you need them when you want to read them back)

Richard

---

<div class="post-metadata">

**Author:** ![TicTacTill](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/tictactill/32/1265_2.png) [@TicTacTill](https://mne.discourse.group/u/TicTacTill)\
**Post date:** [May 23, 2025, 10:18am UTC](https://mne.discourse.group/t/enhancement-request-support-for-multiple-empty-room-recordings-per-session-subject-in-mne-bids/11214/6 "2025-05-23T10:18:09Z")

</div>

@richard Yes, it sounds like being able to write multiple ERs, even without automatic rediscovery, would already help me. My primary need is to correctly format and store this data in a way that passes the validator, even if I have to manually retrieve it later.

---

<div class="post-metadata">

**Author:** ![sappelhoff](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/sappelhoff/32/3276_2.png) [@sappelhoff](https://mne.discourse.group/u/sappelhoff)\
**Post date:** [May 23, 2025, 2:44pm UTC](https://mne.discourse.group/t/enhancement-request-support-for-multiple-empty-room-recordings-per-session-subject-in-mne-bids/11214/7 "2025-05-23T14:44:09Z")

</div>

This is currently too far from my day to day work to offer anything but high level reviews and guidance, but I would be happy to welcome such improvements to mne-bids.

I have actually never worked with MEG data beyond playing with examples.

@richard if you have time and a plan how to do it, perhaps you could give it a shot 🙂

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [May 23, 2025, 3:07pm UTC](https://mne.discourse.group/t/enhancement-request-support-for-multiple-empty-room-recordings-per-session-subject-in-mne-bids/11214/8 "2025-05-23T15:07:23Z")

</div>

Yes I might take a stab at this tomorrow.
