Physiological data alongside neuroimaging data¶
This guide explains how to create BIDS-compliant physiological recordings (*_physio.tsv.gz + *_physio.json) together with neural recordings, following the BIDS specification.
1. Create the TSV file (compressed)¶
- Save your physio data as a tab-separated values file.
- Do not include a header line.
- Each row = one time point, each column = one channel (pulse, respiration, trigger, etc.).
- Compress the file with
gzip:
2. Create the JSON sidecar (required fields)¶
Each *_physio.tsv.gz must have a matching *_physio.json with:
SamplingFrequency: sampling frequency in Hz — applies to all columnsStartTime: time in seconds relative to the start of acquisition of the first neural data sample (can be negative)Columns: array listing column names in the same order as the TSV columns
Note
Make sure you align the physio recordings to the timings of the neural recording when setting StartTime.
{
"SamplingFrequency": 100.0,
"StartTime": -22.345,
"Columns": ["cardiac", "respiratory", "trigger"]
}
Recommended field:
PhysioType: type of physiological recording. Defaults to"generic"; use"eyetrack"for eye-tracking data.
Optional hardware fields: Manufacturer, ManufacturersModelName, DeviceSerialNumber, SoftwareVersions
3. Add descriptions and units for each column¶
Each column listed in Columns can have its own metadata block in the JSON:
{
"SamplingFrequency": 100.0,
"StartTime": -22.345,
"Columns": ["cardiac", "respiratory", "trigger"],
"cardiac": {
"Description": "continuous pulse measurement",
"Units": "mV"
},
"respiratory": {
"Description": "respiration belt signal",
"Units": "mV"
},
"trigger": {
"Description": "scanner trigger signal",
"Units": "a.u."
}
}
4. Physiological events (_physioevents)¶
If your recording contains discrete events (e.g. blink onsets, artefact markers), you can store them separately as:
*_physioevents.tsv.gz— event onsets and durations within the physiological recording*_physioevents.json— sidecar with column descriptions
5. Handle multiple sampling frequencies or recording devices¶
Note
This applies when channels were acquired at different sampling rates or with different devices.
Split them into separate files and distinguish with _recording-<label> in the filename:
sub-01_task-rest_recording-cardiac_physio.tsv.gz
sub-01_task-rest_recording-respiratory_physio.tsv.gz
6. Place your files in the correct folder¶
Physiological files go in the same directory as the matching imaging data. A session directory is mandatory in the ANC, even for single-session studies.
sub-<label>/
└── ses-<label>/
└── <datatype>/
├── <matches>[_recording-<label>]_physio.tsv.gz
├── <matches>[_recording-<label>]_physio.json
├── <matches>[_recording-<label>]_physioevents.tsv.gz
└── <matches>[_recording-<label>]_physioevents.json
<datatype>:func,anat,meg,eeg,ieeg,dwi,beh, etc.<matches>: filename entities matching the imaging file (e.g.sub-01_ses-01_task-rest_run-1).
Checklist¶
- File is
*_physio.tsv.gz(gzipped, no header) - Matching
*_physio.jsonexists - JSON includes
SamplingFrequency,StartTime,Columns - Column order in
Columnsmatches TSV columns exactly - Per-column
DescriptionandUnitsincluded -
StartTimeis aligned to the neural recording onset - Different sampling rates or devices → stored in separate files with
_recording-<label>