Trouble storing empty room recording in subject's session directory

  • 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.

is there any log or error output?

I am a bit suspicious of why the freezing occurs. Have you tried running this on another machine, or with a new/fresh installation?

Apparently my institution’s HPC was encountering some issues when I was last testing, causing the freezing issue. Everything now runs to completion. Using the second block of code in my original post, I’m now able to create the Example 2 BIDS structure.

1 Like