EEG: convert a 28-run motor-imagery dataset.
PhysioNet's motor-imagery sample data. Two subjects, fourteen
EDF runs each, packaged with binary .edf.event
annotation files. The whole pipeline (scan, convert,
enrich, validate) runs in under a minute on this dataset.
No DICOM clustering, no fmaps, no IntendedFor.
But EEG datasets carry one quirk that needs human
attention before conversion: the scanner-derived
task entity defaults to the EDF filename
token (S001R01,
S001R02, …). Users
have to relabel each run with the real protocol task
name. We walk that step below.
PhysioNet motor imagery (2 subjects)
Mirror of the standard PhysioNet motor-imagery format.
Two subject folders (S001,
S002); each has 14
.edf recordings plus their
binary .edf.event
annotation siblings.
2 subjects, 28 EDF files.
Standard PhysioNet motor-imagery layout. Each subject has
14 runs (R01 …
R14). Each
.edf is paired with a binary
.edf.event annotation file the
mne-bids backend reads alongside.
The PhysioNet motor-imagery protocol
R01-R14 follow a fixed protocol; the recording filenames give no hint of the underlying task. Re-labelling them in the Inspection table before conversion gives every BIDS file a meaningful task entity. Common mapping:
| EDF token | Real task |
|---|---|
R01 | baseline_eyes_open |
R02 | baseline_eyes_closed |
R03 | open_fist_real |
R04 | open_fist_imagined |
R05 | both_fists_real |
R06 | both_fists_imagined |
R07-R10 | (repeats R03-R06) |
R11-R14 | (repeats R03-R06 again) |
Real numbers from the EEG pipeline.
The same four commands you saw in the MRI tutorial work unchanged on the EEG dataset. Real outputs captured on the local copy of this sample:
One row per .edf.
No skips (no scouts or scanner reports to flag).
Subject identity comes from path prefix (S001
→ sub-001).
mne-bids writes each EDF as a BIDS-named
.edf with a matching channel
TSV, events TSV, and JSON sidecar. One row fails on
this dataset: sub-001_task-S001R03_run-3
has an empty events table that mne-bids cannot encode.
The Log dock prints the failure cleanly; the rest
completes.
Zero errors. The 29 warnings are all
bidsmgr.todo_placeholder:
the dataset-level fields (License, Authors, etc.) and
the EEG-specific recommended fields
(ManufacturersModelName,
SoftwareVersions) that the
enrichment cannot infer without help.
One workflow, modality-specific quirks.
-
No DICOM clustering. EEG subjects come
from the folder name (
S001→sub-001). PatientID is not in the EDF header. -
Task names need user override. The
classifier writes the EDF filename token
(
S001R01) into thetaskcolumn. The user types the real protocol task in the Inspection table before conversion; the BIDS basename updates live (see Step 3, sub-step 3 in the MRI walkthrough). -
One bulk edit relabels every run.
Cmd-/shift-click selects every row ending in
R01across both subjects, then Bulk edit applies the real task name to all of them in one move. -
Different backend. The Convert step
calls
mne-bids(write_raw_bids) instead ofdcm2niix. Same orchestration layer. -
No fmap fixups. EEG sidecars do not
carry
IntendedFor. The Convert step's "fmap fixups" lines that appear on MRI do not stream here.