MEG: convert an Elekta 3-session dataset.
Two-subject Elekta MEG sample with multiple sessions per subject. The scanner reads the FIF metadata, the path structure flags two date-named subfolders as separate sessions, and the pipeline runs unchanged from MRI.
One subject in this dataset has two date-named
recording folders (220209 and
220215). BIDS Manager
notices the multi-date layout and assigns them to
ses-1 and
ses-2 automatically. The
other subject has only one date folder, so no session
entity is written. No user override needed.
Elekta sample (2 subjects, 3 sessions)
Two subject folders. sub_us04rt22/
holds two date-named sessions
(220209 and
220215);
sub_ye07us06/ holds one
(220221). 23 FIF files
total across the standard MEG tasks: driving (with
runs), rest, empty-room pre and post.
2 subjects, 3 sessions, 23 FIF files.
The MEG sample uses Elekta's standard date-named-folder
convention. The scanner's subject_identity
module reads each FIF's mne.info
(channels, sample rate, duration) and uses path structure
to cluster sessions.
How the session inference works
When the path between the subject folder and the recording
contains a date-shaped token (YYMMDD
or YYYY-MM-DD), the scanner
treats each date as a separate session. Multiple dates per
subject → one session per date, ordered by date. One
date per subject → no session entity. The recording
basenames carry the auto-inferred entity.
Real numbers from the MEG pipeline.
The same four commands. Real outputs captured on the local copy of the Elekta sample:
One row per .fif.
Zero skips. Subject identity from folder name; session
from the date-shaped subfolder between subject and
recording.
All conversions succeed. mne-bids writes
each FIF as a BIDS-named
.fif plus a channel TSV,
coordinate TSV, and JSON sidecar. The empty-room
recordings get acq-emptypre
and acq-emptypost tags.
Zero errors. All 24 warnings are
bidsmgr.todo_placeholder:
the dataset-level fields plus the MEG-specific
recommended fields (ManufacturersModelName,
SoftwareVersions,
RecordingDuration in some
cases).
One workflow, modality-specific quirks.
-
Automatic session inference. Multiple
date-named subfolders → multiple sessions, ordered
by date. The MRI sample dataset uses
SeriesDescriptiontokens likeses-pre/ses-postinstead; MEG's file-system convention is honoured here. -
Tasks parse cleanly. The filename
task_driving_run_01.fifdecomposes intotask=driving,run=1. No user override needed. -
Empty-room recordings stay BIDS-valid.
task_emptypreandtask_emptypostbecometask-noisewithacq-pre/acq-post, the canonical BIDS naming for empty-room recordings. - FIF native format kept. mne-bids writes FIFs as FIFs (no transcoding). The MEG datatype skips the standard montage step that EEG runs.