Skill Tracer
Skills › Scientific Agent Skills › bids › metadata_fields.md

metadata_fields.md

180 lines · skills/bids/references/metadata_fields.md at 5f2bc03

Open on GitHub
1# BIDS Metadata Fields Reference
2
3Reviewed against [BIDS 1.11.2](https://bids-specification.readthedocs.io/en/stable/)
4on 2026-09-30. This is a practical selection, not a complete validator. The bundled
5`bids_schema.json` contains field definitions under `objects.metadata`, conditional
6requirements under `rules.sidecars`, and cross-file checks under `rules.checks`.
7A field can be required only for a particular suffix, acquisition, or dataset context.
8Read selectors before interpreting a rule; do not merge every modality's requirements.
9Required metadata may be inherited from matching higher-level sidecars.

BIDS Metadata Fields Reference

Reviewed against BIDS 1.11.2 on 2026-09-30. This is a practical selection, not a complete validator. The bundled bids_schema.json contains field definitions under objects.metadata, conditional requirements under rules.sidecars, and cross-file checks under rules.checks. A field can be required only for a particular suffix, acquisition, or dataset context. Read selectors before interpreting a rule; do not merge every modality's requirements. Required metadata may be inherited from matching higher-level sidecars.

Raw lines 1 to 10
11## MRI: units, timing and orientation
13Use seconds for MRI timing fields, degrees for `FlipAngle`, and tesla for
14`MagneticFieldStrength`. Convert DICOM millisecond values; do not copy units blindly.
15`Manufacturer`, `ManufacturersModelName`, scanner/software identifiers and institution
16fields are generally recommended. Check `rules.sidecars.mri` for exceptions, including
17ASL and concurrent PET requirements.
19- Anatomical MRI: `EchoTime` and `FlipAngle` are generally recommended;
20 `RepetitionTimeExcitation` and `RepetitionTimePreparation` are available where applicable.
21 Do not present one mandatory qMRI field set for all anatomical suffixes.
22- BOLD: `TaskName` is required. It need not equal or be derived from the `task-` label.
23 Specify **either** `RepetitionTime` **or** `VolumeTiming`, never both.
24 With `VolumeTiming`, provide `SliceTiming` or `FrameAcquisitionDuration`;
25 `DelayTime` is not used with `VolumeTiming`. Sparse sequences need the additional
26 timing information described in the [MRI timing table](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/magnetic-resonance-imaging-data.html#timing-parameters).
27- `EchoTime` is required for multi-echo data, ASL, or where the stated fieldmap
28 conditions apply. With an `echo-` entity, record that echo's actual time, not its index.
29- `PhaseEncodingDirection` uses NIfTI voxel axes `i`, `j`, `k` with optional `-`.
30 Anatomical AP/PA/LR labels do not determine the axis or sign without the affine and
31 converter orientation. Verify scanner metadata and image orientation together.
32- `PhaseEncodingDirection` and `TotalReadoutTime` are recommended for DWI/BOLD and
33 become required under specified fieldmap/opposing-encoding conditions. For pepolar
34 `_epi` images, readout timing must be supplied or calculable through supported metadata.
35 `EffectiveEchoSpacing` alone is not numerically interchangeable with total readout time.
36- `SliceTiming` contains acquisition offsets in seconds, indexed by slice (reversed
37 relative to slice index when `SliceEncodingDirection` is negative). It is not a list
38 of slice indices. The list length must match the slice dimension. Never infer offsets
39 from TR and slice order without accounting for multiband acquisition and dead time.
41Illustrative odd-first order 1,3,5,2,4,6 with TR=2 s, equal spacing, no dead time and
42positive slice encoding direction:
44```json
45{"SliceTiming": [0.0, 1.0, 0.333, 1.333, 0.667, 1.667]}
46```
48qMRI requirements are suffix-specific (`rules.sidecars.qmri`): VFA requires
49`FlipAngle`, `PulseSequenceType`, and `RepetitionTimeExcitation`; MP2RAGE additionally
50requires `InversionTime`, `RepetitionTimePreparation`, `NumberShots`, and field strength.
51`MTState` is required for MT collections, not universally for every quantitative map.
52The spelling is **`RepetitionTimePreparation`**.

MRI: units, timing and orientation

Use seconds for MRI timing fields, degrees for FlipAngle, and tesla for MagneticFieldStrength. Convert DICOM millisecond values; do not copy units blindly. Manufacturer, ManufacturersModelName, scanner/software identifiers and institution fields are generally recommended. Check rules.sidecars.mri for exceptions, including ASL and concurrent PET requirements.

  • Anatomical MRI: EchoTime and FlipAngle are generally recommended; RepetitionTimeExcitation and RepetitionTimePreparation are available where applicable. Do not present one mandatory qMRI field set for all anatomical suffixes.
  • BOLD: TaskName is required. It need not equal or be derived from the task- label. Specify either RepetitionTime or VolumeTiming, never both. With VolumeTiming, provide SliceTiming or FrameAcquisitionDuration; DelayTime is not used with VolumeTiming. Sparse sequences need the additional timing information described in the MRI timing table.
  • EchoTime is required for multi-echo data, ASL, or where the stated fieldmap conditions apply. With an echo- entity, record that echo's actual time, not its index.
  • PhaseEncodingDirection uses NIfTI voxel axes i, j, k with optional -. Anatomical AP/PA/LR labels do not determine the axis or sign without the affine and converter orientation. Verify scanner metadata and image orientation together.
  • PhaseEncodingDirection and TotalReadoutTime are recommended for DWI/BOLD and become required under specified fieldmap/opposing-encoding conditions. For pepolar _epi images, readout timing must be supplied or calculable through supported metadata. EffectiveEchoSpacing alone is not numerically interchangeable with total readout time.
  • SliceTiming contains acquisition offsets in seconds, indexed by slice (reversed relative to slice index when SliceEncodingDirection is negative). It is not a list of slice indices. The list length must match the slice dimension. Never infer offsets from TR and slice order without accounting for multiband acquisition and dead time.

Illustrative odd-first order 1,3,5,2,4,6 with TR=2 s, equal spacing, no dead time and positive slice encoding direction:

{"SliceTiming": [0.0, 1.0, 0.333, 1.333, 0.667, 1.667]}

qMRI requirements are suffix-specific (rules.sidecars.qmri): VFA requires FlipAngle, PulseSequenceType, and RepetitionTimeExcitation; MP2RAGE additionally requires InversionTime, RepetitionTimePreparation, NumberShots, and field strength. MTState is required for MT collections, not universally for every quantitative map. The spelling is **RepetitionTimePreparation**.

Raw lines 11 to 53
54## Diffusion gradients
56Store `.bvec` as 3 rows × N columns and `.bval` as 1 row × N columns, with N equal to
57stored image volumes. Use space-separated numbers. b=0 volumes have zero vectors;
58diffusion-weighted vectors should be unit length. Preserve dcm2niix's FSL/BIDS image
59coordinate convention and verify gradients after any image reorientation (including
60the x-component handedness convention); scanner anatomical directions are insufficient.
61See the [DWI specification](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/magnetic-resonance-imaging-data.html#diffusion-imaging-data).

Diffusion gradients

Store .bvec as 3 rows × N columns and .bval as 1 row × N columns, with N equal to stored image volumes. Use space-separated numbers. b=0 volumes have zero vectors; diffusion-weighted vectors should be unit length. Preserve dcm2niix's FSL/BIDS image coordinate convention and verify gradients after any image reorientation (including the x-component handedness convention); scanner anatomical directions are insufficient. See the DWI specification.

Raw lines 54 to 62
63## Fieldmaps and association
65| Acquisition | Required core fields | Additional checks |
66|---|---|---|
67| `_phasediff` | `EchoTime1`, `EchoTime2` | Shorter echo first; matching magnitude image |
68| `_phase1` / `_phase2` | `EchoTime` per image | Verify echo pairs and magnitude association |
69| `_fieldmap` | `Units` | `Hz`, `rad/s`, or `T`; retain actual physical units |
70| `_epi` pepolar | `PhaseEncodingDirection` | Readout time or supported inputs to calculate it; complementary encoding scans |
72`IntendedFor` is optional for fieldmaps, not universally required. Use meaningful
73associations for processing: `B0FieldIdentifier` defines a field estimate and
74`B0FieldSource` on a target selects it; `IntendedFor` remains supported. Check the
75pipeline's support before choosing the association method.
77Fieldmap JSON example for a target in the same raw dataset:
79```json
81 "B0FieldIdentifier": "pepolar_fmap0",
82 "IntendedFor": ["bids::sub-01/func/sub-01_task-rest_bold.nii.gz"]
84```
86Target BOLD JSON addition:
88```json
89{"B0FieldSource": "pepolar_fmap0"}
90```
92`bids::` is relative to the nearest dataset root, including a derivative's own root.
93For cross-dataset sources, use a named BIDS URI and `DatasetLinks`. Legacy subject-relative
94`IntendedFor` paths are deprecated. See [BIDS URI resolution](https://bids-specification.readthedocs.io/en/stable/common-principles.html#resolution-of-bids-uris).

Fieldmaps and association

AcquisitionRequired core fieldsAdditional checks
_phasediffEchoTime1, EchoTime2Shorter echo first; matching magnitude image
_phase1 / _phase2EchoTime per imageVerify echo pairs and magnitude association
_fieldmapUnitsHz, rad/s, or T; retain actual physical units
_epi pepolarPhaseEncodingDirectionReadout time or supported inputs to calculate it; complementary encoding scans

IntendedFor is optional for fieldmaps, not universally required. Use meaningful associations for processing: B0FieldIdentifier defines a field estimate and B0FieldSource on a target selects it; IntendedFor remains supported. Check the pipeline's support before choosing the association method.

Fieldmap JSON example for a target in the same raw dataset:

{
  "B0FieldIdentifier": "pepolar_fmap0",
  "IntendedFor": ["bids::sub-01/func/sub-01_task-rest_bold.nii.gz"]
}

Target BOLD JSON addition:

{"B0FieldSource": "pepolar_fmap0"}

bids:: is relative to the nearest dataset root, including a derivative's own root. For cross-dataset sources, use a named BIDS URI and DatasetLinks. Legacy subject-relative IntendedFor paths are deprecated. See BIDS URI resolution.

Raw lines 63 to 95
96## ASL
98For `_asl`, core requirements include `ArterialSpinLabelingType` (`CASL`, `PCASL`,
99`PASL`), `PostLabelingDelay`, `BackgroundSuppression`, `M0Type`,
100`RepetitionTimePreparation`, `TotalAcquiredPairs`, `MagneticFieldStrength`,
101`MRAcquisitionType`, and `EchoTime`. Also provide `_aslcontext.tsv` with one volume
102label per stored volume, and verify the M0 acquisition/estimate relation.
104- CASL/PCASL requires `LabelingDuration`; it is not a universal PASL field.
105- PASL requires `BolusCutOffFlag`; when true, also supply `BolusCutOffDelayTime`
106 and **`BolusCutOffTechnique`**.
107- `M0Type: "Estimate"` requires `M0Estimate`; a separate `_m0scan` has an `IntendedFor` requirement.
108- 2D ASL requires `SliceTiming`. Suppression pulse count/times are recommended when
109 background suppression is true.
111Use the full [ASL specification](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/magnetic-resonance-imaging-data.html#arterial-spin-labeling-perfusion-data)
112for acquisition-specific conditions and per-volume arrays.

ASL

For _asl, core requirements include ArterialSpinLabelingType (CASL, PCASL, PASL), PostLabelingDelay, BackgroundSuppression, M0Type, RepetitionTimePreparation, TotalAcquiredPairs, MagneticFieldStrength, MRAcquisitionType, and EchoTime. Also provide _aslcontext.tsv with one volume label per stored volume, and verify the M0 acquisition/estimate relation.

  • CASL/PCASL requires LabelingDuration; it is not a universal PASL field.
  • PASL requires BolusCutOffFlag; when true, also supply BolusCutOffDelayTime and **BolusCutOffTechnique**.
  • M0Type: "Estimate" requires M0Estimate; a separate _m0scan has an IntendedFor requirement.
  • 2D ASL requires SliceTiming. Suppression pulse count/times are recommended when background suppression is true.

Use the full ASL specification for acquisition-specific conditions and per-volume arrays.

Raw lines 96 to 113
114## Electrophysiology
116| Datatype | Core required JSON fields for task recordings |
117|---|---|
118| EEG | `TaskName`, `SamplingFrequency`, `EEGReference`, `PowerLineFrequency`, `SoftwareFilters` |
119| iEEG | `TaskName`, `SamplingFrequency`, `iEEGReference`, `PowerLineFrequency`, `SoftwareFilters` |
120| MEG | `TaskName`, `SamplingFrequency`, `PowerLineFrequency`, `DewarPosition`, `SoftwareFilters`, `DigitizedLandmarks`, `DigitizedHeadPoints` |
121| EMG | `TaskName`, `EMGPlacementScheme`, `EMGReference`, `SamplingFrequency`, `PowerLineFrequency`, `RecordingType`, `SoftwareFilters` |
123`PowerLineFrequency` accepts a numeric frequency or `"n/a"`; `SoftwareFilters` accepts
124a filter-description object or `"n/a"` under its field definition. EMG needs
125`EMGPlacementSchemeDescription` when the scheme is `"Other"` and `EpochLength` for
126epoched recordings. iEEG requires electrode/coordinate metadata; do not conflate
127channels (recorded signals) with electrodes (physical contacts).
129For EEG channels, `name`, `type`, and `units` are required columns. Coordinate units
130and coordinate-system identifiers belong in matching `coordsystem.json`. Consult the
131modality's rules for which companion files are required, recommended or conditional.
132BrainVision datasets need the complete `.vhdr`, `.vmrk`, `.eeg` triplet with valid links.
133Use `MiscChannelCount`; `MISCChannelCount` is a deprecated alias for EEG/motion.
135Official modality pages: [EEG](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/electroencephalography.html),
136[iEEG](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/intracranial-electroencephalography.html),
137[MEG](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/magnetoencephalography.html),
138[EMG](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/electromyography.html).

Electrophysiology

DatatypeCore required JSON fields for task recordings
EEGTaskName, SamplingFrequency, EEGReference, PowerLineFrequency, SoftwareFilters
iEEGTaskName, SamplingFrequency, iEEGReference, PowerLineFrequency, SoftwareFilters
MEGTaskName, SamplingFrequency, PowerLineFrequency, DewarPosition, SoftwareFilters, DigitizedLandmarks, DigitizedHeadPoints
EMGTaskName, EMGPlacementScheme, EMGReference, SamplingFrequency, PowerLineFrequency, RecordingType, SoftwareFilters

PowerLineFrequency accepts a numeric frequency or "n/a"; SoftwareFilters accepts a filter-description object or "n/a" under its field definition. EMG needs EMGPlacementSchemeDescription when the scheme is "Other" and EpochLength for epoched recordings. iEEG requires electrode/coordinate metadata; do not conflate channels (recorded signals) with electrodes (physical contacts).

For EEG channels, name, type, and units are required columns. Coordinate units and coordinate-system identifiers belong in matching coordsystem.json. Consult the modality's rules for which companion files are required, recommended or conditional. BrainVision datasets need the complete .vhdr, .vmrk, .eeg triplet with valid links. Use MiscChannelCount; MISCChannelCount is a deprecated alias for EEG/motion.

Official modality pages: EEG, iEEG, MEG, EMG.

Raw lines 114 to 139
140## PET
142PET metadata is substantially richer than tracer name and frame timing. Required
143raw `_pet` fields cover hardware (`Manufacturer`, `ManufacturersModelName`, `Units`),
144radiochemistry (including `SpecificRadioactivity` and its units), timing, and
145reconstruction (`AcquisitionMode`, decay correction fields, reconstruction method,
146parameter labels, filter type, and attenuation correction). Conditional reconstruction
147parameter values/units, filter sizes and infusion fields must also be satisfied.
148Use `rules.sidecars.pet` and the [PET specification](https://bids-specification.readthedocs.io/en/stable/modality-specific-files/positron-emission-tomography.html)
149for the full inventory; a small example is not a complete PET sidecar.
151`TimeZero` defines the reference clock time and is not necessarily injection time.
152`ScanStart`, `InjectionStart` and frame timing use the documented relation to that
153reference. State measured activity and mass units explicitly; do not relabel numeric
154values as MBq without conversion. `ReconFilterSize` accepts a number or an array under its definition.
155Blood recordings have separate required columns and availability/correction fields.

PET

PET metadata is substantially richer than tracer name and frame timing. Required raw _pet fields cover hardware (Manufacturer, ManufacturersModelName, Units), radiochemistry (including SpecificRadioactivity and its units), timing, and reconstruction (AcquisitionMode, decay correction fields, reconstruction method, parameter labels, filter type, and attenuation correction). Conditional reconstruction parameter values/units, filter sizes and infusion fields must also be satisfied. Use rules.sidecars.pet and the PET specification for the full inventory; a small example is not a complete PET sidecar.

TimeZero defines the reference clock time and is not necessarily injection time. ScanStart, InjectionStart and frame timing use the documented relation to that reference. State measured activity and mass units explicitly; do not relabel numeric values as MBq without conversion. ReconFilterSize accepts a number or an array under its definition. Blood recordings have separate required columns and availability/correction fields.

Raw lines 140 to 156
157## Microscopy, NIRS, motion and spectroscopy
159| Datatype | Core metadata and caveats |
160|---|---|
161| Microscopy | `PixelSize` and `PixelSizeUnits` are required for non-photo microscopy images. `PixelSize` is a two- or three-number array; `PixelSizeUnits` is `"mm"`, `"um"`, or `"nm"`. Manufacturer/model and `SampleEnvironment` are recommended. Validate embedded OME metadata and image dimensions. |
162| NIRS | `TaskName`, `SamplingFrequency`, `NIRSChannelCount`, `NIRSSourceOptodeCount`, `NIRSDetectorOptodeCount`; additional channel counts are conditional on channel type. Include channel/optode/coordinate companions according to the rules. |
163| Motion | `TaskName` and `SamplingFrequency` are required; `TrackingSystemName` is optional. Spatial-axis/rotation descriptions belong to the coordinate-system rules, not an invented universal motion sidecar requirement. |
164| MRS | `ResonantNucleus`, `SpectrometerFrequency`, `SpectralWidth`, and `EchoTime`; NIfTI-MRS also carries a header extension. A `voi-` entity requires body-part metadata. Verify nucleus/frequency arrays and acquisition-specific dimensions. |
166Load `rules.sidecars.micr`, `.nirs`, `.motion`, or `.mrs` and corresponding
167`objects.metadata` definitions rather than copying scalar types across modalities.
168BIDS 1.11.2 adds OME-Zarr imaging support; confirm actual consumer support separately.

Microscopy, NIRS, motion and spectroscopy

DatatypeCore metadata and caveats
MicroscopyPixelSize and PixelSizeUnits are required for non-photo microscopy images. PixelSize is a two- or three-number array; PixelSizeUnits is "mm", "um", or "nm". Manufacturer/model and SampleEnvironment are recommended. Validate embedded OME metadata and image dimensions.
NIRSTaskName, SamplingFrequency, NIRSChannelCount, NIRSSourceOptodeCount, NIRSDetectorOptodeCount; additional channel counts are conditional on channel type. Include channel/optode/coordinate companions according to the rules.
MotionTaskName and SamplingFrequency are required; TrackingSystemName is optional. Spatial-axis/rotation descriptions belong to the coordinate-system rules, not an invented universal motion sidecar requirement.
MRSResonantNucleus, SpectrometerFrequency, SpectralWidth, and EchoTime; NIfTI-MRS also carries a header extension. A voi- entity requires body-part metadata. Verify nucleus/frequency arrays and acquisition-specific dimensions.

Load rules.sidecars.micr, .nirs, .motion, or .mrs and corresponding objects.metadata definitions rather than copying scalar types across modalities. BIDS 1.11.2 adds OME-Zarr imaging support; confirm actual consumer support separately.

Raw lines 157 to 169
170## Events and validation
172`onset` and `duration` are the first two columns of `_events.tsv`. Times are seconds
173relative to the first **stored** data point; negative onset values are allowed.
174A zero duration denotes an impulse; `n/a` denotes an unavailable duration.
175`trial_type` and `response_time` are optional. Sort rows by onset and describe custom
176columns in JSON. Resting-state tasks do not necessarily have recorded events.
178Run the full validator including image-header checks. Validation establishes structural
179and metadata conformance, not the correctness of acquisition values, gradient orientation,
180fieldmap selection, deidentification, or scientific preprocessing choices.

Events and validation

onset and duration are the first two columns of _events.tsv. Times are seconds relative to the first stored data point; negative onset values are allowed. A zero duration denotes an impulse; n/a denotes an unavailable duration. trial_type and response_time are optional. Sort rows by onset and describe custom columns in JSON. Resting-state tasks do not necessarily have recorded events.

Run the full validator including image-header checks. Validation establishes structural and metadata conformance, not the correctness of acquisition values, gradient orientation, fieldmap selection, deidentification, or scientific preprocessing choices.

Raw lines 170 to 180