How to set B0FieldIdentifier and B0FieldSource?

Hello everyone,

I’m currently attempting to process my multi-echo data using version 23.1.3, following a previous error-free run with version 21.0.1. However, the output from version 21.0.1 presented a skull-stripping issue (not necessary for this question though, Inaccurate alignment of EPI and T1). So now I’m trying v23.

I’m looking for guidance regarding the proper configuration for the B0FieldIdentifier and B0FieldSource parameters to do AP/PA SE for distortion correction. The following has more details.

In my recent attempt with version 23.1.3 with the command like,

singularity exec \
    --cleanenv --bind ${BIDS_DIR},${WORK_DIR},${FREESURFER_DIR} \
    $FMRIPREP_IMG fmriprep \
    $BIDS_DIR $OUTPUT_DIR participant --participant_label $PARTICIPANT_LABEL -w $WORK_DIR \
    --nprocs 8 \    --nthreads 12 \     --mem_mb 60000 \     --write-graph \     --dummy-scans 10 \
    --fd-spike-threshold 0.9 \    --fs-license-file /optnfs/freesurfer/6.0.0/license.txt \
    --skip-bids-validation \     --random-seed 42 \     --skull-strip-fixed-seed \
    --resource-monitor \     --bold2t1w-dof 9 \     --me-output-echos  

I encountered the following error message:

  File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/workflows/base.py", line 561, in init_single_subject_wf
    raise NotImplementedError("Sophisticated PEPOLAR schemes are unsupported.")
NotImplementedError: Sophisticated PEPOLAR schemes are unsupported.

Based on my research on similar issues, it appears that this problem might be related to the IntendedFor, B0FieldIdentifier, or B0FieldSource. Although I currently don’t have the IntendedFor field, I have manually added B0FieldIdentifier and B0FieldSource to my JSON files, and it worked well with version 21.

Since I’d like to use AP/PA SE images for distortion correction, I included the following entries manually into JSON files:

  • In the AP/PA JSONs: "B0FieldIdentifier": "phasediff_fmap0"
  • In the BOLD JSONs: "B0FieldSource": "phasediff_fmap0"

However, I have come across other examples with varying settings in NeuroStarts, including:

  • "B0FieldIdentifier": "B0map", "B0FieldSource": "B0map"
  • "B0FieldSource": "phdiff_fmap", "B0FieldSource": "phdiff_fmap"

Consequently, I am currently uncertain about the ideal approach for setting the B0Field.
Are there specific options, such as “B0map” or “phasediff_fmap0,” that I should consider?
Or is it possible that the actual contents are inconsequential, and fmriprep is just seeking a consistent pair of B0FieldIdentifier and B0FieldSource between the AP/PA and BOLD files?

Thank you for your help in advance!

Hi @ByeolKLux,

All of these are synonymous. The B0FieldIdentifier, specified in the fmap JSON, is saying “what do I want this fieldmap to be called in my BIDS schema, such that I can reference it later?” So if you multiple fmaps, you can give them any kind of identifiers, e.g., fmap_resting or fmap_task. Those examples are just generic names that refer to the kind of field map collected (B0 map is a SpinEcho map and phdiff is a GRE map).

In this case, the more correct name would be the B0map for the identifier, since phase-diff maps are from GRE acquisitions, not AP/PA SE. However, as explained above, it doesn’t really matter what you name it as long as the naming is consistent (but better to use proper naming than not).

The B0FieldSource specified in the BOLD JSON is saying “which fieldmap identifier (as defined above) do I want to be associated with this BOLD run?”.

How many fieldmaps / BOLD runs do you have? Can you give us some information on the metadata you tried that led to that error?

Best,
Steven

2 Likes

Hi Steven,

Thanks for your clear answer! Then the name is arbitrary. Good to know.

The participants have one set of AP/PA and 7 runs with 3 different echo times, resulting in 21 BOLD runs.

fmap

sub-07_ses-1_acq-mb3_dir-ap_run-01_epi.json
sub-07_ses-1_acq-mb3_dir-ap_run-01_epi.nii.gz
sub-07_ses-1_acq-mb3_dir-pa_run-01_epi.json
sub-07_ses-1_acq-mb3_dir-pa_run-01_epi.nii.gz

func

sub-07_ses-1_task-movie_run-04_echo-1_bold.json
sub-07_ses-1_task-movie_run-04_echo-1_bold.nii.gz
sub-07_ses-1_task-movie_run-04_echo-2_bold.json
sub-07_ses-1_task-movie_run-04_echo-2_bold.nii.gz
sub-07_ses-1_task-movie_run-04_echo-2_sbref.json
sub-07_ses-1_task-movie_run-04_echo-2_sbref.nii.gz
sub-07_ses-1_task-movie_run-04_echo-3_bold.json
sub-07_ses-1_task-movie_run-04_echo-3_bold.nii.gz
sub-07_ses-1_task-movie_run-04_echo-3_sbref.json
sub-07_ses-1_task-movie_run-04_echo-3_sbref.nii.gz
sub-07_ses-1_task-movie_run-04_events.tsv
sub-07_ses-1_task-movie_run-05_echo-1_bold.json
sub-07_ses-1_task-movie_run-05_echo-1_bold.nii.gz
sub-07_ses-1_task-movie_run-05_echo-2_bold.json
sub-07_ses-1_task-movie_run-05_echo-2_bold.nii.gz
sub-07_ses-1_task-movie_run-05_echo-2_sbref.json
sub-07_ses-1_task-movie_run-05_echo-2_sbref.nii.gz
sub-07_ses-1_task-movie_run-05_echo-3_bold.json
sub-07_ses-1_task-movie_run-05_echo-3_bold.nii.gz
sub-07_ses-1_task-movie_run-05_echo-3_sbref.json
sub-07_ses-1_task-movie_run-05_echo-3_sbref.nii.gz
sub-07_ses-1_task-movie_run-05_events.tsv
sub-07_ses-1_task-movie_run-06_echo-1_bold.json
sub-07_ses-1_task-movie_run-06_echo-1_bold.nii.gz
sub-07_ses-1_task-movie_run-06_echo-2_bold.json
sub-07_ses-1_task-movie_run-06_echo-2_bold.nii.gz
sub-07_ses-1_task-movie_run-06_echo-2_sbref.json
sub-07_ses-1_task-movie_run-06_echo-2_sbref.nii.gz
sub-07_ses-1_task-movie_run-06_echo-3_bold.json
sub-07_ses-1_task-movie_run-06_echo-3_bold.nii.gz
sub-07_ses-1_task-movie_run-06_echo-3_sbref.json
sub-07_ses-1_task-movie_run-06_echo-3_sbref.nii.gz
sub-07_ses-1_task-movie_run-06_events.tsv
sub-07_ses-1_task-rest_run-07_echo-1_bold.json
sub-07_ses-1_task-rest_run-07_echo-1_bold.nii.gz
sub-07_ses-1_task-rest_run-07_echo-2_bold.json
sub-07_ses-1_task-rest_run-07_echo-2_bold.nii.gz
sub-07_ses-1_task-rest_run-07_echo-2_sbref.json
sub-07_ses-1_task-rest_run-07_echo-2_sbref.nii.gz
sub-07_ses-1_task-rest_run-07_echo-3_bold.json
sub-07_ses-1_task-rest_run-07_echo-3_bold.nii.gz
sub-07_ses-1_task-rest_run-07_echo-3_sbref.json
sub-07_ses-1_task-rest_run-07_echo-3_sbref.nii.gz
sub-07_ses-1_task-rest_run-07_events.tsv
sub-07_ses-1_task-rsa_run-01_echo-1_bold.json
sub-07_ses-1_task-rsa_run-01_echo-1_bold.nii.gz
sub-07_ses-1_task-rsa_run-01_echo-2_bold.json
sub-07_ses-1_task-rsa_run-01_echo-2_bold.nii.gz
sub-07_ses-1_task-rsa_run-01_echo-2_sbref.json
sub-07_ses-1_task-rsa_run-01_echo-2_sbref.nii.gz
sub-07_ses-1_task-rsa_run-01_echo-3_bold.json
sub-07_ses-1_task-rsa_run-01_echo-3_bold.nii.gz
sub-07_ses-1_task-rsa_run-01_echo-3_sbref.json
sub-07_ses-1_task-rsa_run-01_echo-3_sbref.nii.gz
sub-07_ses-1_task-rsa_run-01_events.tsv
sub-07_ses-1_task-rsa_run-02_echo-1_bold.json
sub-07_ses-1_task-rsa_run-02_echo-1_bold.nii.gz
sub-07_ses-1_task-rsa_run-02_echo-2_bold.json
sub-07_ses-1_task-rsa_run-02_echo-2_bold.nii.gz
sub-07_ses-1_task-rsa_run-02_echo-2_sbref.json
sub-07_ses-1_task-rsa_run-02_echo-2_sbref.nii.gz
sub-07_ses-1_task-rsa_run-02_echo-3_bold.json
sub-07_ses-1_task-rsa_run-02_echo-3_bold.nii.gz
sub-07_ses-1_task-rsa_run-02_echo-3_sbref.json
sub-07_ses-1_task-rsa_run-02_echo-3_sbref.nii.gz
sub-07_ses-1_task-rsa_run-02_events.tsv
sub-07_ses-1_task-rsa_run-03_echo-1_bold.json
sub-07_ses-1_task-rsa_run-03_echo-1_bold.nii.gz
sub-07_ses-1_task-rsa_run-03_echo-2_bold.json
sub-07_ses-1_task-rsa_run-03_echo-2_bold.nii.gz
sub-07_ses-1_task-rsa_run-03_echo-2_sbref.json
sub-07_ses-1_task-rsa_run-03_echo-2_sbref.nii.gz
sub-07_ses-1_task-rsa_run-03_echo-3_bold.json
sub-07_ses-1_task-rsa_run-03_echo-3_bold.nii.gz
sub-07_ses-1_task-rsa_run-03_echo-3_sbref.json
sub-07_ses-1_task-rsa_run-03_echo-3_sbref.nii.gz
sub-07_ses-1_task-rsa_run-03_events.tsv

Thanks for explaining! May you also share the contents of the two fmap JSON files?

Sure, here you go.

{
  "AcquisitionMatrixPE": 82,
  "AcquisitionNumber": 1,
  "AcquisitionTime": "08:37:57.722500",
  "BandwidthPerPixelPhaseEncode": 24.888,
  "BaseResolution": 82,
  "BodyPartExamined": "BRAIN",
  "CoilCombinationMethod": "Sum of Squares",
  "ConsistencyInfo": "N4_VE11E_LATEST_20181129",
  "ConversionSoftware": "dcm2niix",
  "ConversionSoftwareVersion": "v1.0.20220720",
  "DerivedVendorReportedEchoSpacing": 0.00049,
  "DeviceSerialNumber": "66112",
  "DwellTime": 2e-06,
  "EchoTime": 0.073,
  "EchoTrainLength": 82,
  "EffectiveEchoSpacing": 0.00049,
  "FlipAngle": 90,
  "HeudiconvVersion": "0.11.6",
  "ImageOrientationPatientDICOM": [
    0.992507,
    0.0981554,
    -0.0727628,
    -0.10204,
    0.993434,
    -0.0517432
  ],
  "ImageOrientationText": "Tra>Sag(-3.9)>Cor(-3.4)",
  "ImageType": [
    "ORIGINAL",
    "PRIMARY",
    "M",
    "ND",
    "NORM",
    "MOSAIC"
  ],
  "ImagingFrequency": 123.259,
  "InPlanePhaseEncodingDirectionDICOM": "COL",
  "InstitutionAddress": "Maynard 3,Hanover,NH,US,03755",
  "InstitutionName": "Dartmouth College - PBS",
  "InstitutionalDepartmentName": "Department",
  "MRAcquisitionType": "2D",
  "MagneticFieldStrength": 3,
  "Manufacturer": "Siemens",
  "ManufacturersModelName": "Prisma",
  "MatrixCoilMode": "SENSE",
  "Modality": "MR",
  "NonlinearGradientCorrection": false,
  "PartialFourier": 1,
  "PatientPosition": "HFS",
  "PercentPhaseFOV": 100,
  "PercentSampling": 100,
  "PhaseEncodingDirection": "j-",
  "PhaseEncodingSteps": 82,
  "PhaseResolution": 1,
  "PixelBandwidth": 3050,
  "ProcedureStepDescription": "Wager_Wager^1091_imensa",
  "ProtocolName": "fmap-epi_dir-ap_acq-mb3_run-01",
  "PulseSequenceDetails": "%CustomerSeq%\\cmrr_mbep2d_se",
  "ReceiveCoilActiveElements": "HEA;HEP",
  "ReceiveCoilName": "Head_32",
  "ReconMatrixPE": 82,
  "RepetitionTime": 5.479,
  "SAR": 0.187257,
  "ScanOptions": "FS",
  "ScanningSequence": "EP",
  "SequenceName": "epse2d1_82",
  "SequenceVariant": "SK",
  "SeriesDescription": "fmap-epi_dir-ap_acq-mb3_run-01",
  "SeriesNumber": 6,
  "ShimSetting": [
    4204,
    -7828,
    -7200,
    305,
    -83,
    -224,
    -55,
    117
  ],
  "SliceThickness": 2.7,
  "SliceTiming": [
    0,
    2.785,
    0.1075,
    2.89,
    0.215,
    2.9975,
    0.3225,
    3.105,
    0.43,
    3.2125,
    0.535,
    3.32,
    0.6425,
    3.425,
    0.75,
    3.5325,
    0.8575,
    3.64,
    0.965,
    3.7475,
    1.0725,
    3.855,
    1.1775,
    3.96,
    1.285,
    4.0675,
    1.3925,
    4.175,
    1.5,
    4.2825,
    1.6075,
    4.39,
    1.7125,
    4.4975,
    1.82,
    4.6025,
    1.9275,
    4.71,
    2.035,
    4.8175,
    2.1425,
    4.925,
    2.2475,
    5.0325,
    2.355,
    5.1375,
    2.4625,
    5.245,
    2.57,
    5.3525,
    2.6775
  ],
  "SoftwareVersions": "syngo MR E11",
  "SpacingBetweenSlices": 2.7,
  "StationName": "AWP66112",
  "TotalReadoutTime": 0.03969,
  "TxRefAmp": 262.73,
  "WipMemBlock": "96a883d3-29e8-4896-a0bb-02f97ce49068||Sequence: R016 ve11e/master r/434b28f1; Aug  7 2019 19:20:16 by eja",
  "dcmmeta_affine": [
    [
      -2.662824869155884,
      -0.27376702427864075,
      -0.18145668506622314,
      126.45502471923828
    ],
    [
      -0.263343870639801,
      2.6653099060058594,
      -0.1587066501379013,
      -67.76390838623047
    ],
    [
      -0.19521737098693848,
      0.13882315158843994,
      2.6892166137695312,
      -37.76222610473633
    ],
    [
      0.0,
      0.0,
      0.0,
      1.0
    ]
  ],
  "dcmmeta_reorient_transform": [
    [
      0.0,
      -1.0,
      0.0,
      81.0
    ],
    [
      1.0,
      0.0,
      0.0,
      0.0
    ],
    [
      0.0,
      0.0,
      1.0,
      0.0
    ],
    [
      0.0,
      0.0,
      0.0,
      1.0
    ]
  ],
  "dcmmeta_shape": [
    82,
    82,
    51,
    2
  ],
  "dcmmeta_slice_dim": 2,
  "dcmmeta_version": 0.6,
  "global": {
    "const": {
      "AccessionNumber": "A004395",
      "AcquisitionMatrix": [
        82,
        0,
        0,
        82
      ],
      "AngioFlag": "N",
      "BitsAllocated": 16,
      "BitsStored": 16,
      "BodyPartExamined": "BRAIN",
      "Columns": 656,
      "EchoNumbers": 1,
      "EchoTime": 73.0,
      "EchoTrainLength": 82,
      "FlipAngle": 90.0,
      "HighBit": 15,
      "ImageOrientationPatient": [
        0.99250747057659,
        0.09815543991254,
        -0.0727628371165,
        -0.1020404368621,
        0.99343363805606,
        -0.0517431736917
      ],
      "ImagePositionPatient": [
        -789.93952531164,
        -988.64979739433,
        69.352081063919
      ],
      "ImageType": [
        "ORIGINAL",
        "PRIMARY",
        "M",
        "ND",
        "NORM",
        "MOSAIC"
      ],
      "ImagedNucleus": "1H",
      "ImagingFrequency": 123.259025,
      "InPlanePhaseEncodingDirection": "COL",
      "MRAcquisitionType": "2D",
      "MagneticFieldStrength": 3.0,
      "Manufacturer": "SIEMENS",
      "ManufacturerModelName": "Prisma",
      "Modality": "MR",
      "NumberOfAverages": 1.0,
      "NumberOfPhaseEncodingSteps": 82,
      "PercentPhaseFieldOfView": 100.0,
      "PercentSampling": 100.0,
      "PerformedProcedureStepStartTime": "080205.337000",
      "PhotometricInterpretation": "MONOCHROME2",
      "PixelBandwidth": 3050.0,
      "PixelRepresentation": 0,
      "PixelSpacing": [
        2.6829268932343,
        2.6829268932343
      ],
      "ProtocolName": "fmap-epi_dir-ap_acq-mb3_run-01",
      "RepetitionTime": 5479.0,
      "Rows": 656,
      "SAR": 0.18725727004319,
      "SamplesPerPixel": 1,
      "ScanOptions": "FS",
      "ScanningSequence": "EP",
      "SequenceName": "epse2d1_82",
      "SequenceVariant": "SK",
      "SeriesDescription": "fmap-epi_dir-ap_acq-mb3_run-01",
      "SeriesNumber": 6,
      "SeriesTime": "083808.922000",
      "SliceLocation": -42.126787339591,
      "SliceThickness": 2.7000000476837,
      "SmallestImagePixelValue": 0,
      "SoftwareVersions": "syngo MR E11",
      "SpacingBetweenSlices": 2.7000000585219,
      "SpecificCharacterSet": "ISO_IR 100",
      "StudyID": "1",
      "StudyTime": "080205.134000",
      "TransmitCoilName": "Body",
      "VariableFlipAngleFlag": "N",
      "WindowCenterWidthExplanation": "Algo1"
    },
    "slices": {}
  },
  "time": {
    "samples": {
      "AcquisitionNumber": [
        1,
        2
      ],
      "AcquisitionTime": [
        "083757.722500",
        "083803.202500"
      ],
      "ContentTime": [
        "083808.927000",
        "083808.932000"
      ],
      "InstanceCreationTime": [
        "083808.927000",
        "083808.932000"
      ],
      "InstanceNumber": [
        1,
        2
      ],
      "LargestImagePixelValue": [
        62754,
        64678
      ],
      "WindowCenter": [
        6491.0,
        6512.0
      ],
      "WindowWidth": [
        14183.0,
        14251.0
      ]
    },
    "slices": {}
  },
  "B0FieldIdentifier": "phasediff_fmap0"
}
{
  "AcquisitionMatrixPE": 82,
  "AcquisitionNumber": 1,
  "AcquisitionTime": "08:38:15.970000",
  "BandwidthPerPixelPhaseEncode": 24.888,
  "BaseResolution": 82,
  "BodyPartExamined": "BRAIN",
  "CoilCombinationMethod": "Sum of Squares",
  "ConsistencyInfo": "N4_VE11E_LATEST_20181129",
  "ConversionSoftware": "dcm2niix",
  "ConversionSoftwareVersion": "v1.0.20220720",
  "DerivedVendorReportedEchoSpacing": 0.00049,
  "DeviceSerialNumber": "66112",
  "DwellTime": 2e-06,
  "EchoTime": 0.073,
  "EchoTrainLength": 82,
  "EffectiveEchoSpacing": 0.00049,
  "FlipAngle": 90,
  "HeudiconvVersion": "0.11.6",
  "ImageOrientationPatientDICOM": [
    0.992507,
    0.0981554,
    -0.0727628,
    -0.10204,
    0.993434,
    -0.0517432
  ],
  "ImageOrientationText": "Tra>Sag(-3.9)>Cor(-3.4)",
  "ImageType": [
    "ORIGINAL",
    "PRIMARY",
    "M",
    "ND",
    "NORM",
    "MOSAIC"
  ],
  "ImagingFrequency": 123.259,
  "InPlanePhaseEncodingDirectionDICOM": "COL",
  "InstitutionAddress": "Maynard 3,Hanover,NH,US,03755",
  "InstitutionName": "Dartmouth College - PBS",
  "InstitutionalDepartmentName": "Department",
  "MRAcquisitionType": "2D",
  "MagneticFieldStrength": 3,
  "Manufacturer": "Siemens",
  "ManufacturersModelName": "Prisma",
  "MatrixCoilMode": "SENSE",
  "Modality": "MR",
  "NonlinearGradientCorrection": false,
  "PartialFourier": 1,
  "PatientPosition": "HFS",
  "PercentPhaseFOV": 100,
  "PercentSampling": 100,
  "PhaseEncodingDirection": "j",
  "PhaseEncodingSteps": 82,
  "PhaseResolution": 1,
  "PixelBandwidth": 3050,
  "ProcedureStepDescription": "Wager_Wager^1091_imensa",
  "ProtocolName": "fmap-epi_dir-pa_acq-mb3_run-01",
  "PulseSequenceDetails": "%CustomerSeq%\\cmrr_mbep2d_se",
  "ReceiveCoilActiveElements": "HEA;HEP",
  "ReceiveCoilName": "Head_32",
  "ReconMatrixPE": 82,
  "RepetitionTime": 5.479,
  "SAR": 0.187257,
  "ScanOptions": "FS",
  "ScanningSequence": "EP",
  "SequenceName": "epse2d1_82",
  "SequenceVariant": "SK",
  "SeriesDescription": "fmap-epi_dir-pa_acq-mb3_run-01",
  "SeriesNumber": 7,
  "ShimSetting": [
    4204,
    -7828,
    -7200,
    305,
    -83,
    -224,
    -55,
    117
  ],
  "SliceThickness": 2.7,
  "SliceTiming": [
    0,
    2.7825,
    0.1075,
    2.89,
    0.2125,
    2.995,
    0.32,
    3.1025,
    0.4275,
    3.21,
    0.535,
    3.3175,
    0.6425,
    3.425,
    0.7475,
    3.5325,
    0.855,
    3.6375,
    0.9625,
    3.745,
    1.07,
    3.8525,
    1.1775,
    3.96,
    1.2825,
    4.0675,
    1.39,
    4.1725,
    1.4975,
    4.28,
    1.605,
    4.3875,
    1.7125,
    4.495,
    1.82,
    4.6025,
    1.925,
    4.7075,
    2.0325,
    4.815,
    2.14,
    4.9225,
    2.2475,
    5.03,
    2.355,
    5.1375,
    2.46,
    5.245,
    2.5675,
    5.35,
    2.675
  ],
  "SoftwareVersions": "syngo MR E11",
  "SpacingBetweenSlices": 2.7,
  "StationName": "AWP66112",
  "TotalReadoutTime": 0.03969,
  "TxRefAmp": 262.73,
  "WipMemBlock": "961be5e3-8129-44be-9ab1-61b5af825e20||Sequence: R016 ve11e/master r/434b28f1; Aug  7 2019 19:20:16 by eja",
  "dcmmeta_affine": [
    [
      -2.662824869155884,
      -0.27376702427864075,
      -0.18145668506622314,
      126.45502471923828
    ],
    [
      -0.263343870639801,
      2.6653099060058594,
      -0.1587066501379013,
      -67.76390838623047
    ],
    [
      -0.19521737098693848,
      0.13882315158843994,
      2.6892166137695312,
      -37.76222610473633
    ],
    [
      0.0,
      0.0,
      0.0,
      1.0
    ]
  ],
  "dcmmeta_reorient_transform": [
    [
      0.0,
      -1.0,
      0.0,
      81.0
    ],
    [
      1.0,
      0.0,
      0.0,
      0.0
    ],
    [
      0.0,
      0.0,
      1.0,
      0.0
    ],
    [
      0.0,
      0.0,
      0.0,
      1.0
    ]
  ],
  "dcmmeta_shape": [
    82,
    82,
    51,
    2
  ],
  "dcmmeta_slice_dim": 2,
  "dcmmeta_version": 0.6,
  "global": {
    "const": {
      "AccessionNumber": "A004395",
      "AcquisitionMatrix": [
        82,
        0,
        0,
        82
      ],
      "AngioFlag": "N",
      "BitsAllocated": 16,
      "BitsStored": 16,
      "BodyPartExamined": "BRAIN",
      "Columns": 656,
      "EchoNumbers": 1,
      "EchoTime": 73.0,
      "EchoTrainLength": 82,
      "FlipAngle": 90.0,
      "HighBit": 15,
      "ImageOrientationPatient": [
        0.99250747057659,
        0.09815543991254,
        -0.0727628371165,
        -0.1020404368621,
        0.99343363805606,
        -0.0517431736917
      ],
      "ImagePositionPatient": [
        -789.93952531164,
        -988.64979739433,
        69.352081063919
      ],
      "ImageType": [
        "ORIGINAL",
        "PRIMARY",
        "M",
        "ND",
        "NORM",
        "MOSAIC"
      ],
      "ImagedNucleus": "1H",
      "ImagingFrequency": 123.259025,
      "InPlanePhaseEncodingDirection": "COL",
      "MRAcquisitionType": "2D",
      "MagneticFieldStrength": 3.0,
      "Manufacturer": "SIEMENS",
      "ManufacturerModelName": "Prisma",
      "Modality": "MR",
      "NumberOfAverages": 1.0,
      "NumberOfPhaseEncodingSteps": 82,
      "PercentPhaseFieldOfView": 100.0,
      "PercentSampling": 100.0,
      "PerformedProcedureStepStartTime": "080205.337000",
      "PhotometricInterpretation": "MONOCHROME2",
      "PixelBandwidth": 3050.0,
      "PixelRepresentation": 0,
      "PixelSpacing": [
        2.6829268932343,
        2.6829268932343
      ],
      "ProtocolName": "fmap-epi_dir-pa_acq-mb3_run-01",
      "RepetitionTime": 5479.0,
      "Rows": 656,
      "SAR": 0.18725727004319,
      "SamplesPerPixel": 1,
      "ScanOptions": "FS",
      "ScanningSequence": "EP",
      "SequenceName": "epse2d1_82",
      "SequenceVariant": "SK",
      "SeriesDescription": "fmap-epi_dir-pa_acq-mb3_run-01",
      "SeriesNumber": 7,
      "SeriesTime": "083827.676000",
      "SliceLocation": -42.126787339591,
      "SliceThickness": 2.7000000476837,
      "SmallestImagePixelValue": 0,
      "SoftwareVersions": "syngo MR E11",
      "SpacingBetweenSlices": 2.7000000585219,
      "SpecificCharacterSet": "ISO_IR 100",
      "StudyID": "1",
      "StudyTime": "080205.134000",
      "TransmitCoilName": "Body",
      "VariableFlipAngleFlag": "N",
      "WindowCenterWidthExplanation": "Algo1"
    },
    "slices": {}
  },
  "time": {
    "samples": {
      "AcquisitionNumber": [
        1,
        2
      ],
      "AcquisitionTime": [
        "083815.970000",
        "083821.447500"
      ],
      "ContentTime": [
        "083827.694000",
        "083827.697000"
      ],
      "InstanceCreationTime": [
        "083827.694000",
        "083827.697000"
      ],
      "InstanceNumber": [
        1,
        2
      ],
      "LargestImagePixelValue": [
        48527,
        48207
      ],
      "WindowCenter": [
        6592.0,
        6598.0
      ],
      "WindowWidth": [
        14220.0,
        14248.0
      ]
    },
    "slices": {}
  },
  "B0FieldIdentifier": "phasediff_fmap0"
}

I think the problem is that you have two files with the same FieldIdentifier.

Shouldn’t the AP/PA have the same B0FieldIdentifier?

I can confirm the AP/PA epi’s having the same B0FieldIdentifier string works with my data.

What happens when you run your data using sdcflows.utils.wrangler.find_estimators?
(docs)

(you can use the package provided in the fmriprep container. can open up a python repl using
singularity exec --cleanenv --bind ${BIDS_DIR},${WORK_DIR},${FREESURFER_DIR} $FMRIPREP_IMG python)

E.g.

>>> from sdcflows.utils.wrangler import find_estimators
>>> fmaps = find_estimators(layout=my_layout, subject="07", sessions=['1'])
>>> fmaps

Thanks, good to know! (I have mainly used IntendedFor so my knowledge is limited). Are you sure that both fmap files are being used in that case, and not just the reverse-phase encoded image part of the fmap?

Yep, they both are used. Both epi maps are used as topup input. No bold images need to be used (unless you only have one epi img).

2 Likes

Hi,

According to this thread (and linked threads), it seems that you just need to link the first echo to the fieldmap files, with either IntendedFor or B0FieldSource/B0FieldIdentifier :

I hope you will quickly find what went wrong for your dataset!

2 Likes

Hi all, thanks for sharing your thoughts. That’s really helpful for troubleshooting.
To sum up my experience,

In version 21.0.1, I included the B0FieldSource into both AP/PA jsons and B0FieldIdentifier into all BOLD jsons as I mentioned above, but didn’t include IntendedFor at all. The SDC worked regardless of the quality.

To test version 23.1.3, I excluded the B0Field from all jsons and included the IntendedFor for AP/PA and all BOLD jsons accordingly. It worked. This also worked with version 21.0.1.

I have decided to use IntendedFor without B0Field from now on.

1 Like