- MNE version: e.g. 1.6.0
- operating system: Linux
The current BIDS specification (1.9.0) provides an Example 1 and an Example 2 for how empty room recordings can be described in an MEG BIDS structure. I’ve been able to replicate Example 1 using the following code:
import mne
import mne_bids
# Load imaging and empty room data
raw_data = mne.io.read_raw_ctf("fname_data.ds")
raw_er = mne.io.read_raw_ctf("fname_er.ds")
# Specify the BIDS path
bids_path =mne_bids.BIDSPath(subject="01", task="bart", datatype="meg", root="bids_root_dir")
# Write data to BIDS structure
mne_bids.write_raw_bids(raw_data, bids_path=bids_path, empty_room=raw_er, overwrite=True)
Where I’m encountering trouble is when trying to replicate an Example 2 structure. I’ve tried:
# Load imaging and empty room data
raw_data = mne.io.read_raw_ctf("fname_data.ds")
raw_er = mne.io.read_raw_ctf("fname_er.ds")
# Specify the BIDS path
bids_path_data =mne_bids.BIDSPath(subject="01", task="bart", datatype="meg", root="bids_root_dir")
bids_path_er =mne_bids.BIDSPath(subject="01", task="noise", datatype="meg", root="bids_root_dir")
# Write data to BIDS structure
mne_bids.write_raw_bids(raw_data, bids_path=bids_path_data, overwrite=True)
mne_bids.write_raw_bids(raw_er, bids_path=bids_path_er, overwrite=True)
which begins to run but appears to freeze at the line Copying data files to sub-01_task-noise_meg.ds
I was able to find this empty room tutorial, but it appears to align with the Example 1.