Back to Claude Scientific Skills

BIDS Metadata Fields Reference

scientific-skills/bids/references/metadata_fields.md

2.39.014.2 KB
Original Source

BIDS Metadata Fields Reference

This reference lists the required and recommended JSON sidecar fields for each BIDS modality.

Legend:

  • R = Required
  • REC = Recommended
  • OPT = Optional

Common MRI Fields (All MRI Modalities)

FieldStatusTypeDescription
MagneticFieldStrengthRECnumberField strength in Tesla
ManufacturerRECstringScanner manufacturer
ManufacturersModelNameRECstringScanner model
DeviceSerialNumberRECstringScanner serial number
StationNameRECstringScanner station name
SoftwareVersionsRECstringScanner software version
InstitutionNameRECstringName of institution
InstitutionAddressRECstringAddress of institution
InstitutionalDepartmentNameRECstringDepartment name

Anatomical MRI (anat/)

T1w, T2w, FLAIR, T2star, PDw

FieldStatusTypeDescription
RepetitionTimeRECnumberTR in seconds
EchoTimeRECnumberTE in seconds
InversionTimeRECnumberTI in seconds (if applicable)
FlipAngleRECnumberFlip angle in degrees
SequenceNameRECstringPulse sequence name
SequenceVariantRECstringVariant of the sequence
ScanningSequenceRECstringGeneral description
PulseSequenceTypeRECstringType of pulse sequence
NonlinearGradientCorrectionRECbooleanWhether applied
ParallelReductionFactorInPlaneRECnumberiPAT/GRAPPA factor
ContrastBolusIngredientRECstringActive contrast ingredient

Quantitative MRI (T1map, T2map, etc.)

FieldStatusTypeDescription
RepetitionTimeExcitationRnumberExcitation TR in seconds
RepetitionTimePreprationRnumberPreparation TR in seconds
FlipAngleRnumber/arrayFlip angle(s) in degrees
MTStateRbooleanMagnetization transfer on/off
SpoilingStateRECbooleanWhether RF spoiling applied
SpoilingTypeRECstringRF, GRADIENT, or COMBINED
SpoilingRFPhaseIncrementRECnumberPhase increment in degrees

Functional MRI (func/)

BOLD

FieldStatusTypeDescription
RepetitionTimeRnumberTR in seconds (volume acquisition time)
TaskNameRstringName of the task (must match task-<label>)
SliceTimingRECarrayTime each slice was acquired, in seconds
EchoTimeRECnumberTE in seconds
FlipAngleRECnumberFlip angle in degrees
PhaseEncodingDirectionRECstringi, i-, j, j-, k, k-
EffectiveEchoSpacingRECnumberEffective echo spacing in seconds
TotalReadoutTimeRECnumberTotal readout time in seconds
MultibandAccelerationFactorRECnumberMultiband/SMS factor
NumberOfVolumesDiscardedByScannerRECintegerDummy scans removed
NumberOfVolumesDiscardedByUserRECintegerVolumes removed post-hoc
TaskDescriptionRECstringLonger description of the task
CogAtlasIDRECstringCognitive Atlas ID for the task
CogPOIDRECstringCognitive Paradigm Ontology ID
InstructionsRECstringInstructions given to participants

Multi-echo BOLD

FieldStatusTypeDescription
EchoTimeRnumberTE for this echo (each echo in separate file)
EchoTime1, EchoTime2--NOT used; use echo-<index> entity

BOLD Timing Details

SliceTiming - Array of times (in seconds) at which each slice was acquired relative to the start of volume acquisition. Length must equal the number of slices.

Example for ascending sequential (3 slices, TR=2s):

json
{"SliceTiming": [0.0, 0.667, 1.333]}

Example for interleaved (odd-first, 6 slices, TR=2s):

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

PhaseEncodingDirection values:

  • i / i- : along first image axis (typically left-right)
  • j / j- : along second image axis (typically anterior-posterior)
  • k / k- : along third image axis (typically inferior-superior)
  • The - suffix indicates the negative direction along that axis

Diffusion-Weighted Imaging (dwi/)

FieldStatusTypeDescription
PhaseEncodingDirectionRstringPhase encoding direction
TotalReadoutTimeRnumberTotal readout time in seconds
EchoTimeRECnumberTE in seconds
RepetitionTimeRECnumberTR in seconds
FlipAngleRECnumberFlip angle in degrees
EffectiveEchoSpacingRECnumberEffective echo spacing in seconds
MultibandAccelerationFactorRECnumberSMS/multiband factor
SliceTimingRECarraySlice timing

DWI Gradient Files

.bvec file (3 rows x N columns, N = number of volumes):

0 0.707 -0.707 0 0.577
0 0.707 0.707 0 0.577
0 0 0 1 0.577

.bval file (1 row x N columns):

0 1000 1000 1000 2000
  • b=0 volumes have zero-vectors in .bvec
  • Gradient directions are in the image coordinate system
  • Values are space-separated (not tab-separated)
  • Number of columns must match number of volumes in the NIfTI

Fieldmaps (fmap/)

Case 1: Phase-difference map (_phasediff)

FieldStatusTypeDescription
EchoTime1RnumberTE of the first echo (shorter)
EchoTime2RnumberTE of the second echo (longer)
IntendedForRstring/arrayBIDS URI(s) of files to correct
B0FieldIdentifierRECstringIdentifier for this B0 field

Case 2: Two phase maps (_phase1, _phase2)

FieldStatusTypeDescription
EchoTimeRnumberTE for this phase image
IntendedForRstring/arrayFiles to correct

Case 3: Direct fieldmap (_fieldmap)

FieldStatusTypeDescription
UnitsRstringMust be Hz or rad/s
IntendedForRstring/arrayFiles to correct

Case 4: "Pepolar" fieldmaps (_epi)

FieldStatusTypeDescription
PhaseEncodingDirectionRstringPE direction for this image
TotalReadoutTimeRnumberTotal readout time
IntendedForRstring/arrayFiles to correct
B0FieldIdentifierRECstringIdentifier for this B0 field
B0FieldSourceRECstringWhich B0 field to use

IntendedFor Syntax

BIDS URI format (recommended, v1.7+):

json
{
    "IntendedFor": [
        "bids::sub-01/func/sub-01_task-rest_bold.nii.gz",
        "bids::sub-01/dwi/sub-01_dwi.nii.gz"
    ]
}

Relative path format (legacy):

json
{
    "IntendedFor": [
        "func/sub-01_task-rest_bold.nii.gz",
        "dwi/sub-01_dwi.nii.gz"
    ]
}

B0FieldIdentifier/B0FieldSource (preferred in v1.9+):

json
// In the fieldmap sidecar
{"B0FieldIdentifier": "pepolar_fmap0"}

// In the BOLD sidecar
{"B0FieldSource": "pepolar_fmap0"}

Perfusion Imaging (perf/)

ASL

FieldStatusTypeDescription
ArterialSpinLabelingTypeRstringCASL, PCASL, or PASL
PostLabelingDelayRnumber/arrayPLD in seconds
BackgroundSuppressionRbooleanWhether applied
MagneticFieldStrengthRnumberIn Tesla
M0TypeRstringSeparate, Included, Estimate, Absent
RepetitionTimePreparationRnumberTime between ASL pulses
LabelingDurationRnumberDuration of labeling pulse
BackgroundSuppressionNumberPulsesRECintegerNumber of suppression pulses
BackgroundSuppressionPulseTimeRECarrayTiming of suppression pulses
VascularCrushingRECbooleanWhether applied
LabelingOrientationRECstringOrientation of labeling plane
LabelingDistanceRECnumberDistance from isocenter (mm)
BolusCutOffFlagR (PASL)booleanWhether QUIPSS applied
BolusCutOffTimingSequenceR (PASL)stringQUIPSS sequence type
BolusCutOffDelayTimeR (PASL)numberQUIPSS delay time

aslcontext.tsv

Required file listing the order of volumes (label/control/m0scan):

volume_type
control
label
control
label
m0scan

EEG (eeg/)

FieldStatusTypeDescription
TaskNameRstringName of the task
SamplingFrequencyRnumberIn Hz
EEGReferenceRstringReference electrode(s)
PowerLineFrequencyRnumber50 or 60 Hz (or n/a)
SoftwareFiltersRobjectOnline filters applied
EEGPlacementSchemeRECstringe.g., 10-20, 10-10
CapManufacturerRECstringCap manufacturer
CapManufacturersModelNameRECstringCap model
EEGChannelCountRECintegerNumber of EEG channels
EOGChannelCountRECintegerNumber of EOG channels
ECGChannelCountRECintegerNumber of ECG channels
EMGChannelCountRECintegerNumber of EMG channels
MiscChannelCountRECintegerNumber of misc channels
TriggerChannelCountRECintegerNumber of trigger channels
RecordingDurationRECnumberIn seconds
RecordingTypeRECstringcontinuous, epoched, discontinuous

channels.tsv (EEG)

ColumnStatusDescription
nameRChannel name
typeREEG, EOG, ECG, EMG, MISC, TRIG, etc.
unitsRV, mV, uV
sampling_frequencyOPTPer-channel if different
low_cutoffRECHigh-pass filter frequency (Hz)
high_cutoffRECLow-pass filter frequency (Hz)
notchRECNotch filter frequency (Hz)
referenceRECReference electrode name
statusRECgood or bad
status_descriptionOPTReason for bad status

electrodes.tsv (EEG)

ColumnStatusDescription
nameRElectrode name
xRX coordinate
yRY coordinate
zRZ coordinate
typeOPTElectrode type
materialOPTElectrode material
impedanceOPTImpedance in kOhm

MEG (meg/)

FieldStatusTypeDescription
TaskNameRstringName of the task
SamplingFrequencyRnumberIn Hz
PowerLineFrequencyRnumber50 or 60 Hz
DewarPositionRstringPosition of the dewar
SoftwareFiltersRobjectOnline filters
DigitizedLandmarksRbooleanFiducials digitized
DigitizedHeadPointsRbooleanHead shape digitized
MEGChannelCountRECintegerNumber of MEG channels
MEGREFChannelCountRECintegerReference channels
ContinuousHeadLocalizationRECbooleanHPI on
HeadCoilFrequencyRECarrayHPI coil frequencies
InstitutionNameRECstringInstitution name

PET (pet/)

FieldStatusTypeDescription
TracerNameRstringName of the radiotracer
TracerRadionuclideRstringe.g., C11, F18, O15
InjectedRadioactivityRnumberIn MBq
InjectedRadioactivityUnitsRstringMust be MBq
InjectedMassRnumberMass of tracer injected
InjectedMassUnitsRstringe.g., ug
ModeOfAdministrationRstringbolus, infusion, bolus-infusion
TimeZeroRstringTime of injection (HH:MM:SS)
ScanStartRnumberStart time relative to TimeZero
InjectionStartRnumberInjection time relative to TimeZero
FrameTimesStartRarrayFrame start times in seconds
FrameDurationRarrayFrame durations in seconds
UnitsRstringUnit of voxel values (e.g., Bq/mL)
TracerRadLexRECstringRadLex ID for tracer
BodyWeightRECnumberIn kg
BodyPartRECstringImaged body part
AttenuationCorrectionRECstringMethod description
ReconMethodNameRECstringReconstruction method
ReconMethodParameterLabelsRECarrayParameter names
ReconMethodParameterValuesRECarrayParameter values
ReconFilterTypeRECstringPost-recon filter type
ReconFilterSizeRECnumberFilter FWHM in mm

Microscopy (micr/)

FieldStatusTypeDescription
ManufacturerRstringMicroscope manufacturer
ManufacturersModelNameRstringMicroscope model
PixelSizeRarray[X, Y] or [X, Y, Z] in micrometers
PixelSizeUnitsRstringum (micrometers)
MagnificationRECnumberObjective magnification
SampleEnvironmentRstringin vivo, ex vivo, in vitro
SampleFixationRECstringFixation method
SampleStainingRECstringStaining protocol
SliceThicknessRECnumberIn micrometers
TissueDeformationScalingRECnumberScaling factor

NIRS (nirs/)

FieldStatusTypeDescription
TaskNameRstringName of the task
SamplingFrequencyRnumberIn Hz
NIRSSourceOptodeCountRintegerNumber of sources
NIRSDetectorOptodeCountRintegerNumber of detectors
ACCELChannelCountRECintegerAccelerometer channels
NIRSPlacementSchemeRECstringe.g., 10-20

Motion (motion/)

FieldStatusTypeDescription
TaskNameRstringName of the task
SamplingFrequencyRnumberIn Hz
TrackingSystemNameRstringName of tracking system
ACCELChannelCountRECintegerAccelerometer channels
GYROChannelCountRECintegerGyroscope channels
MAGNChannelCountRECintegerMagnetometer channels
RotationOrderRECstringe.g., XYZ
RotationRuleRECstringleft-hand or right-hand
SpatialAxesRECstringe.g., ALS