fMRIPrep skips SDC "no fieldmap correction"

Summary of what happened:

Hi,

I’ve been trying to use pepolar spin-echo fieldmaps for SDC, but fmriprep skips fieldmap correction.

I’m using the fmriprep docker image. Versions I’ve tried: 23.1.0, 23.2.0, 25.1.1, 25.1.2.
None of them run SDC on my data.

BIDS validator does not raise an error using my current IntendedFor syntax, and I’ve read everywhere that this should be correct for fmriprep to recognize:
“IntendedFor”: “func/sub-088_task-mid_bold.nii.gz”

Other relevant fields in the json file:
“PhaseEncodingDirection”: “j-” (the second SE has “j”)
“TotalReadoutTime”: 0.0597409

The folder structure has the root folder with the dataset description and task json files and the subject folder “sub-088”. Within the subject folder I have folders “anat”, “fmap” and “func”. The fieldmaps are named “sub-088_dir-AP_epi.nii.gz” (with either AP or PA) and corresponding bold file is named “sub-088_task-mid_bold.nii.gz” (both have corresponding json files with identical names).

In versions 25.1.x when building the pipeline it explicitly says “no fieldmap correction - skipping stage 3”. This line is the same whether the fieldmaps are present or removed altogether. If I change the IntendedFor syntax (e.g. adding “/” before the “func”) the validator raises an error. But with the correct syntax, it just skips SDC.

I’ve read every thread I could find on this, tried even updating the nii2dcmx version and rerun the conversion from dicoms. I’ve played around endlessly with the IntendedFor syntax and with the file names.

What am I missing? Could there be some other reason for fmriprep to skip SDC?

Thanks,
Talia

Command used (and if a helper script was used, a link to the helper script or the command generated):

docker run --rm \
-v C:\CLP015\Raw\nii:/data:ro \
-v C:\CLP015\out:/out \
-v C:\CLP015\work:/work \
-v "C:\Users\tali\Documents\Tools\fs_license\license.txt":/opt/freesurfer/license.txt:ro  \
nipreps/fmriprep:25.1.1 \
/data \
/out \
participant \
--participant-label sub-088

Version:

25.1.1

Environment (Docker, Singularity / Apptainer, custom installation):

Docker

Data formatted according to a validatable standard? Please provide the output of the validator:

bids-validator@1.14.10
        1: [WARN] The recommended file /README is missing. See Section 03 (Modality agnostic files) of the BIDS specification. (code: 101 - README_FILE_MISSING)

        Please visit https://neurostars.org/search?q=README_FILE_MISSING for existing conversations about this issue.

        2: [WARN] The Authors field of dataset_description.json should contain an array of fields - with one author per field. This was triggered based on the presence of only one author field. Please ignore if all contributors are already properly listed. (code: 102 - TOO_FEW_AUTHORS)

        Please visit https://neurostars.org/search?q=TOO_FEW_AUTHORS for existing conversations about this issue.

        Summary:                  Available Tasks:        Available Modalities:
        12 Files, 282.54MB        mid                     MRI
        1 - Subject
        1 - Session

Relevant log outputs (up to 20 lines):

250618-13:43:55,826 nipype.workflow INFO:
         Using single-band reference file(s) sub-088_task-mid_sbref.nii.gz.
250618-13:43:55,900 nipype.workflow INFO:
         Stage 1: Adding HMC boldref workflow
250618-13:43:55,905 nipype.workflow INFO:
         Stage 2: Adding motion correction workflow
250618-13:43:55,910 nipype.workflow INFO:
         No fieldmap correction - skipping Stage 3
250618-13:43:55,910 nipype.workflow INFO:
         Stage 4: Adding coregistration boldref workflow
250618-13:43:55,975 nipype.workflow INFO:
         Stage 5: Adding coregistration workflow
250618-13:43:55,984 nipype.workflow IMPORTANT:
         BOLD series will be slice-timing corrected to an offset of 0.612s.
250618-13:43:59,536 nipype.workflow INFO:
         fMRIPrep workflow graph with 404 nodes built successfully.

Screenshots / relevant information:

C:.
│   dataset_description.json
│   task-mid_bold.json
│
└───sub-088
    ├───anat
    │       sub-088_T1w.json
    │       sub-088_T1w.nii.gz
    │
    ├───fmap
    │       sub-088_dir-AP_epi.json
    │       sub-088_dir-AP_epi.nii.gz
    │       sub-088_dir-PA_epi.json
    │       sub-088_dir-PA_epi.nii.gz
    │
    └───func
            sub-088_task-mid_bold.json
            sub-088_task-mid_bold.nii.gz
            sub-088_task-mid_sbref.json
            sub-088_task-mid_sbref.nii.gz

sub-088_dir-AP_epi.json content:

{
    "Modality": "MR",
    "MagneticFieldStrength": 3,
    "ImagingFrequency": 123.256,
    "Manufacturer": "Siemens",
    "ManufacturersModelName": "MAGNETOM Prisma",
    "InstitutionName": "UA",
    "InstitutionAddress": "850 PETER BRYCE BOULEVARD ,TUSCALOOSA,ALABAMA,US,35401",
    "DeviceSerialNumber": "166285",
    "StationName": "AWP166285",
    "BodyPartExamined": "BRAIN",
    "PatientPosition": "HFS",
    "ProcedureStepDescription": "xxx",
    "SoftwareVersions": "syngo MR XA30",
    "MRAcquisitionType": "2D",
    "SeriesDescription": "SpinEchoFieldMap_AP",
    "ProtocolName": "SpinEchoFieldMap_AP",
    "ScanningSequence": "EP",
    "SequenceVariant": "SK",
    "ScanOptions": "FS",
    "PulseSequenceName": "epse2d1_104",
    "ImageType": [
        "ORIGINAL",
        "PRIMARY",
        "FMRI",
        "NONE"
    ],
    "ImageTypeText": [
        "ORIGINAL",
        "PRIMARY",
        "M",
        "MB",
        "ND",
        "NORM"
    ],
    "NonlinearGradientCorrection": false,
    "SeriesNumber": 21,
    "AcquisitionTime": "11:04:16.727500",
    "AcquisitionNumber": 1,
    "ImageComments": "Unaliased MB3/PE3/LB",
    "SliceThickness": 2,
    "SpacingBetweenSlices": 2,
    "EchoTime": 0.0672,
    "RepetitionTime": 8,
    "MTState": false,
    "FlipAngle": 90,
    "PartialFourier": 1,
    "BaseResolution": 104,
    "ShimSetting": [
        -1282,
        7159,
        -11230,
        414,
        -55,
        -132,
        -150,
        47
    ],
    "TxRefAmp": 238.9,
    "PhaseResolution": 1,
    "VendorReportedEchoSpacing": 0.00058,
    "ReceiveCoilName": "HeadNeck_64",
    "ReceiveCoilActiveElements": "HC1-7;NC1,2",
    "CoilString": "HeadNeck_64",
    "PulseSequenceDetails": "%CustomerSeq%\\cmrr_mbep2d_se",
    "WipMemBlock": "b0dcfc1c-c791-4ae8-a9a8-6781336e83b6||Sequence: R017 nxva30a/master r/294d878e6; May 17 2024 19:43:56 by eja",
    "CoilCombinationMethod": "Sum of Squares",
    "MatrixCoilMode": "SENSE",
    "MultibandAccelerationFactor": 3,
    "PercentPhaseFOV": 100,
    "PercentSampling": 100,
    "EchoTrainLength": 104,
    "AcquisitionMatrixPE": 104,
    "ReconMatrixPE": 104,
    "BandwidthPerPixelPhaseEncode": 16.578,
    "EffectiveEchoSpacing": 0.000580009,
    "DerivedVendorReportedEchoSpacing": 0.000580009,
    "AcquisitionDuration": 63.647,
    "TotalReadoutTime": 0.0597409,
    "PixelBandwidth": 2289,
    "DwellTime": 0.0000021,
    "PhaseEncodingDirection": "j-",
    "SliceTiming": [
        0,
        3.6575,
        7.315,
        2.9925,
        6.65,
        2.3275,
        5.985,
        1.6625,
        5.32,
        0.9975,
        4.655,
        0.3325,
        3.99,
        7.6475,
        3.325,
        6.9825,
        2.66,
        6.3175,
        1.995,
        5.6525,
        1.33,
        4.9875,
        0.665,
        4.3225,
        0,
        3.6575,
        7.315,
        2.9925,
        6.65,
        2.3275,
        5.985,
        1.6625,
        5.32,
        0.9975,
        4.655,
        0.3325,
        3.99,
        7.6475,
        3.325,
        6.9825,
        2.66,
        6.3175,
        1.995,
        5.6525,
        1.33,
        4.9875,
        0.665,
        4.3225,
        0,
        3.6575,
        7.315,
        2.9925,
        6.65,
        2.3275,
        5.985,
        1.6625,
        5.32,
        0.9975,
        4.655,
        0.3325,
        3.99,
        7.6475,
        3.325,
        6.9825,
        2.66,
        6.3175,
        1.995,
        5.6525,
        1.33,
        4.9875,
        0.665,
        4.3225
    ],
    "ImageOrientationPatientDICOM": [
        0.998788,
        0.0406874,
        -0.0276875,
        -0.0418616,
        0.998187,
        -0.0432404
    ],
    "InPlanePhaseEncodingDirectionDICOM": "COL",
    "ConversionSoftware": "dcm2niix",
    "ConversionSoftwareVersion": "v1.0.20220720",
    "IntendedFor": "func/sub-088_task-mid_bold.nii.gz"
}

sub-088_dir-AP_epi.json content:

{
    "Modality": "MR",
    "MagneticFieldStrength": 3,
    "ImagingFrequency": 123.256,
    "Manufacturer": "Siemens",
    "ManufacturersModelName": "MAGNETOM Prisma",
    "InstitutionName": "UA",
    "InstitutionAddress": "850 PETER BRYCE BOULEVARD ,TUSCALOOSA,ALABAMA,US,35401",
    "DeviceSerialNumber": "166285",
    "StationName": "AWP166285",
    "BodyPartExamined": "BRAIN",
    "PatientPosition": "HFS",
    "ProcedureStepDescription": "GrayMatters Novus Neurology PRISM-64ch",
    "SoftwareVersions": "syngo MR XA30",
    "MRAcquisitionType": "2D",
    "SeriesDescription": "SpinEchoFieldMap_PA",
    "ProtocolName": "SpinEchoFieldMap_PA",
    "ScanningSequence": "EP",
    "SequenceVariant": "SK",
    "ScanOptions": "FS",
    "PulseSequenceName": "epse2d1_104",
    "ImageType": [
        "ORIGINAL",
        "PRIMARY",
        "FMRI",
        "NONE"
    ],
    "ImageTypeText": [
        "ORIGINAL",
        "PRIMARY",
        "M",
        "MB",
        "ND",
        "NORM"
    ],
    "NonlinearGradientCorrection": false,
    "SeriesNumber": 23,
    "AcquisitionTime": "11:05:16.717500",
    "AcquisitionNumber": 1,
    "ImageComments": "Unaliased MB3/PE3/LB",
    "SliceThickness": 2,
    "SpacingBetweenSlices": 2,
    "EchoTime": 0.0672,
    "RepetitionTime": 8,
    "MTState": false,
    "FlipAngle": 90,
    "PartialFourier": 1,
    "BaseResolution": 104,
    "ShimSetting": [
        -1282,
        7159,
        -11230,
        414,
        -55,
        -132,
        -150,
        47
    ],
    "TxRefAmp": 238.9,
    "PhaseResolution": 1,
    "VendorReportedEchoSpacing": 0.00058,
    "ReceiveCoilName": "HeadNeck_64",
    "ReceiveCoilActiveElements": "HC1-7;NC1,2",
    "CoilString": "HeadNeck_64",
    "PulseSequenceDetails": "%CustomerSeq%\\cmrr_mbep2d_se",
    "WipMemBlock": "ab432798-3f90-4c9a-a762-b13cd7b0dda7||Sequence: R017 nxva30a/master r/294d878e6; May 17 2024 19:43:56 by eja",
    "CoilCombinationMethod": "Sum of Squares",
    "MatrixCoilMode": "SENSE",
    "MultibandAccelerationFactor": 3,
    "PercentPhaseFOV": 100,
    "PercentSampling": 100,
    "EchoTrainLength": 104,
    "AcquisitionMatrixPE": 104,
    "ReconMatrixPE": 104,
    "BandwidthPerPixelPhaseEncode": 16.578,
    "EffectiveEchoSpacing": 0.000580009,
    "DerivedVendorReportedEchoSpacing": 0.000580009,
    "AcquisitionDuration": 63.647,
    "TotalReadoutTime": 0.0597409,
    "PixelBandwidth": 2289,
    "DwellTime": 0.0000021,
    "PhaseEncodingDirection": "j",
    "SliceTiming": [
        0,
        3.6575,
        7.315,
        2.9925,
        6.65,
        2.3275,
        5.985,
        1.6625,
        5.32,
        0.9975,
        4.655,
        0.3325,
        3.99,
        7.6475,
        3.325,
        6.9825,
        2.66,
        6.3175,
        1.995,
        5.6525,
        1.33,
        4.9875,
        0.665,
        4.3225,
        0,
        3.6575,
        7.315,
        2.9925,
        6.65,
        2.3275,
        5.985,
        1.6625,
        5.32,
        0.9975,
        4.655,
        0.3325,
        3.99,
        7.6475,
        3.325,
        6.9825,
        2.66,
        6.3175,
        1.995,
        5.6525,
        1.33,
        4.9875,
        0.665,
        4.3225,
        0,
        3.6575,
        7.315,
        2.9925,
        6.65,
        2.3275,
        5.985,
        1.6625,
        5.32,
        0.9975,
        4.655,
        0.3325,
        3.99,
        7.6475,
        3.325,
        6.9825,
        2.66,
        6.3175,
        1.995,
        5.6525,
        1.33,
        4.9875,
        0.665,
        4.3225
    ],
    "ImageOrientationPatientDICOM": [
        0.998788,
        0.0406874,
        -0.0276875,
        -0.0418616,
        0.998187,
        -0.0432404
    ],
    "InPlanePhaseEncodingDirectionDICOM": "COL",
    "ConversionSoftware": "dcm2niix",
    "ConversionSoftwareVersion": "v1.0.20220720",
    "IntendedFor": "func/sub-088_task-mid_bold.nii.gz"
}

sub-088_task-mid_bold.json content:

{
	"Modality": "MR",
	"MagneticFieldStrength": 3,
	"ImagingFrequency": 123.256,
	"Manufacturer": "Siemens",
	"ManufacturersModelName": "MAGNETOM Prisma",
	"InstitutionName": "UA",
	"InstitutionAddress": "850 PETER BRYCE BOULEVARD ,TUSCALOOSA,ALABAMA,US,35401",
	"DeviceSerialNumber": "166285",
	"StationName": "AWP166285",
	"BodyPartExamined": "BRAIN",
	"PatientPosition": "HFS",
	"ProcedureStepDescription": "xxx",
	"SoftwareVersions": "syngo MR XA30",
	"MRAcquisitionType": "2D",
	"SeriesDescription": "tfMRI_MID2_AP",
	"ProtocolName": "tfMRI_MID2_AP",
	"ScanningSequence": "EP",
	"SequenceVariant": "SK\\SS",
	"ScanOptions": "FS",
	"PulseSequenceName": "epfid2d1_104",
	"ImageType": ["ORIGINAL", "PRIMARY", "FMRI", "NONE"],
	"ImageTypeText": ["ORIGINAL", "PRIMARY", "M", "MB", "NORM", "DIS2D"],
	"NonlinearGradientCorrection": true,
	"SeriesNumber": 19,
	"AcquisitionTime": "10:55:45.012500",
	"AcquisitionNumber": 1,
	"ImageComments": "Unaliased MB3/PE4/LB",
	"SliceThickness": 2,
	"SpacingBetweenSlices": 2,
	"EchoTime": 0.0228,
	"RepetitionTime": 1.3,
	"MTState": false,
	"FlipAngle": 67,
	"PartialFourier": 1,
	"BaseResolution": 104,
	"ShimSetting": [
		-1282,
		7159,
		-11230,
		414,
		-55,
		-132,
		-150,
		47	],
	"TxRefAmp": 238.9,
	"PhaseResolution": 1,
	"ReceiveCoilName": "HeadNeck_64",
	"ReceiveCoilActiveElements": "HC1-7;NC1,2",
	"CoilString": "HeadNeck_64",
	"PulseSequenceDetails": "%CustomerSeq%\\cmrr_mbep2d_bold",
	"WipMemBlock": "e01f86dd-f476-4165-9784-473872c321b2||Sequence: R017 nxva30a/master r/294d878e6; May 17 2024 19:22:59 by eja",
	"RefLinesPE": 50,
	"CoilCombinationMethod": "Sum of Squares",
	"MatrixCoilMode": "GRAPPA",
	"MultibandAccelerationFactor": 3,
	"PercentPhaseFOV": 100,
	"PercentSampling": 100,
	"EchoTrainLength": 51,
	"AcquisitionMatrixPE": 104,
	"ReconMatrixPE": 104,
	"BandwidthPerPixelPhaseEncode": 36.284,
	"ParallelReductionFactorInPlane": 2,
	"ParallelAcquisitionTechnique": "GRAPPA",
	"EffectiveEchoSpacing": 0.000265003,
	"DerivedVendorReportedEchoSpacing": 0.000530007,
	"AcquisitionDuration": 470.227,
	"TotalReadoutTime": 0.0272954,
	"PixelBandwidth": 2289,
	"DwellTime": 2.1e-06,
	"PhaseEncodingDirection": "j-",
	"SliceTiming": [
		0,
		0.585,
		1.1725,
		0.48,
		1.065,
		0.3725,
		0.96,
		0.265,
		0.8525,
		0.16,
		0.745,
		0.0525,
		0.64,
		1.225,
		0.5325,
		1.12,
		0.425,
		1.0125,
		0.32,
		0.905,
		0.2125,
		0.8,
		0.105,
		0.6925,
		0,
		0.585,
		1.1725,
		0.48,
		1.065,
		0.3725,
		0.96,
		0.265,
		0.8525,
		0.16,
		0.745,
		0.0525,
		0.64,
		1.225,
		0.5325,
		1.12,
		0.425,
		1.0125,
		0.32,
		0.905,
		0.2125,
		0.8,
		0.105,
		0.6925,
		0,
		0.585,
		1.1725,
		0.48,
		1.065,
		0.3725,
		0.96,
		0.265,
		0.8525,
		0.16,
		0.745,
		0.0525,
		0.64,
		1.225,
		0.5325,
		1.12,
		0.425,
		1.0125,
		0.32,
		0.905,
		0.2125,
		0.8,
		0.105,
		0.6925	],
	"ImageOrientationPatientDICOM": [
		0.998788,
		0.0406874,
		-0.0276875,
		-0.0418616,
		0.998187,
		-0.0432404	],
	"InPlanePhaseEncodingDirectionDICOM": "COL",
	"ConversionSoftware": "dcm2niix",
	"ConversionSoftwareVersion": "v1.0.20220720"
}

dataset_description.json content:

{"Name": "FMRIPREP Inputs", "BIDSVersion": "1.10.0", "DatasetType": "derivative", "License": "GrayMAtters proprietry data", "Authors": ["Shai Attia"], "Acknowledgments": "", "ReferencesAndLinks": [""], "GeneratedBy": [{"Name": "fmriprep", "Version": "25.1.1", "Container": {"Type": "docker", "Tag": "nipreps/fmriprep:25.1.1"}}, {"Name": "Manual", "Description": "Re-added RepetitionTime metadata to bold.json files"}]}

Hi @tbrandman, and welcome to neurostars!

In the future please use the software support post category and template, which prompts you for important information. You can see I added the template to your post. You can edit your post to reorganize and add information as required. In particular, the BIDS validation output and command used would be good to know. Additionally, it would help to see the tree structure of a subject raw data folder, and the contents of an example subject’s BOLD and fmap JSON files. Please share the text and code-formatted (either surrounding by tickmarks or using the </> button in the text editor) for better readability.

Best,
Steven

Thanks Steven, this template is helpful. I’ve added all the information you suggested. Do you have an idea what could be causing the issue?

Hi @tbrandman,

Thanks for the info. May you also provide the dir-PA fmap JSON please?

Also, unrelated but you did not specify a work directory (-w) in your fmriprep command, despite specifying a work directory in your docker run preamable.

Also, just in case, what are the contents of dataset_description.json?

Best,
Steven

Thanks for pointing that out! Yes I forgot the -w /work at the end there:)
I’ve added the contents of the additional json files.
Do you see anything out of the ordinary?

Hi @tbrandman,

Yes. Please change the DatasetType in the dataset_description from derivative to raw.

Best,
Steven

1 Like

Right! That did it!! Thanks so much Steven :slight_smile:

1 Like