FMRIPREP: Pepolar fieldmap (error with opposite and matching phase encoding direction)

Dear All,

I ran into a problem with my fieldmaps: I have one ‘_epi’ file with opposite phase encoding direction to the target file and another ‘_epi’ file with a matching phase encoding direction to the target. When I try to run fmriprep, I receive the following error message:
“None of the discovered fieldmaps has the right phase encoding direction. Possibly a problem with metadata. If not, rerun with ‘–ignore fieldmaps’ to skip distortion correction step.”

However, when I remove the file with the same encoding direction as the target from the directory it seems to work fine (SDC: fieldmap estimation of type “epi” intended for /om/group/saxelab/SISO_pilot/data/BIDS/sub-SAXpSISOp07/func/sub-SAXpSISOp07_task-CIC_run-001_bold.nii.gz found.)

I am confused because if I understand the section “Phase Encoding POLARity ( PEPOLAR ) techniques” from https://fmriprep.readthedocs.io/en/latest/api/index.html#sdc-pepolar correctly, either way should work.

Thanks a lot in advance!

Livia

Hi. It’s hard to tell what could be causing problems at this point. Could you run the following script and report its output?

SUBDIR=/om/group/saxelab/SISO_pilot/data/BIDS/sub-SAXpSISOp07/
tree $SUBDIR
for FMAP in $SUBDIR/fmap/*_epi.nii*; do
    echo $FMAP
    cat $FMAP
    echo
done

Thanks for the quick reply! Below is the output from your script, but I replaced _epi.nii with _epi.json since I think this is what you meant? (but let me know if not!)

/om/group/saxelab/SISO_pilot/data/BIDS/sub-SAXpSISOp07/
├── anat
│ ├── sub-SAXpSISOp07_T1w.json
│ ├── sub-SAXpSISOp07_T1w.nii.gz
│ ├── sub-SAXpSISOp07_T2w.json
│ └── sub-SAXpSISOp07_T2w.nii.gz
├── fmap
│ ├── sub-SAXpSISOp07_topup_PA_run-001_epi.json
│ ├── sub-SAXpSISOp07_topup_PA_run-001_epi.nii.gz
│ ├── sub-SAXpSISOp07_topup_PA_run-002_epi.json
│ └── sub-SAXpSISOp07_topup_PA_run-002_epi.nii.gz
├── func
│ ├── sub-SAXpSISOp07_task-CIC_run-001_bold.json
│ ├── sub-SAXpSISOp07_task-CIC_run-001_bold.nii.gz
│ ├── sub-SAXpSISOp07_task-CIC_run-001_events.tsv
│ ├── sub-SAXpSISOp07_task-CIC_run-002_bold.json
│ ├── sub-SAXpSISOp07_task-CIC_run-002_bold.nii.gz
│ ├── sub-SAXpSISOp07_task-CIC_run-002_events.tsv
│ ├── sub-SAXpSISOp07_task-CIC_run-003_bold.json
│ ├── sub-SAXpSISOp07_task-CIC_run-003_bold.nii.gz
│ ├── sub-SAXpSISOp07_task-CIC_run-003_events.tsv
│ ├── sub-SAXpSISOp07_task-CIC_run-004_bold.json
│ ├── sub-SAXpSISOp07_task-CIC_run-004_bold.nii.gz
│ ├── sub-SAXpSISOp07_task-CIC_run-004_events.tsv
│ ├── sub-SAXpSISOp07_task-CIC_run-005_bold.json
│ ├── sub-SAXpSISOp07_task-CIC_run-005_bold.nii.gz
│ ├── sub-SAXpSISOp07_task-CIC_run-005_events.tsv
│ ├── sub-SAXpSISOp07_task-CIC_run-006_bold.json
│ ├── sub-SAXpSISOp07_task-CIC_run-006_bold.nii.gz
│ ├── sub-SAXpSISOp07_task-CIC_run-006_events.tsv
│ ├── sub-SAXpSISOp07_task-midloc_bold.json
│ ├── sub-SAXpSISOp07_task-midloc_bold.nii.gz
│ └── sub-SAXpSISOp07_task-midloc_events.tsv
└── sub-SAXpSISOp07_scans.tsv

3 directories, 30 files
/om/group/saxelab/SISO_pilot/data/BIDS/sub-SAXpSISOp07//fmap/sub-SAXpSISOp07_topup_PA_run-001_epi.json
{
“AcquisitionMatrixPE”: 70,
“AcquisitionNumber”: 1,
“AcquisitionTime”: “18:50:41.515000”,
“BandwidthPerPixelPhaseEncode”: 28.571,
“BaseResolution”: 70,
“BodyPartExamined”: “BRAIN”,
“ConsistencyInfo”: “N4_VE11C_LATEST_20160120”,
“ConversionSoftware”: “dcm2niix”,
“ConversionSoftwareVersion”: “v1.0.20180622 GCC6.3.0”,
“DerivedVendorReportedEchoSpacing”: 0.000500008,
“DeviceSerialNumber”: “167012”,
“DwellTime”: 2.6e-06,
“EchoTime”: 0.04,
“EchoTrainLength”: 70,
“EffectiveEchoSpacing”: 0.000500007,
“FlipAngle”: 90,
“ImageOrientationPatientDICOM”: [0.995039, -0.0137687, -0.0985296, -0.0307488, 0.899323, -0.436202],
“ImageType”: [
“ORIGINAL”,
“PRIMARY”,
“M”,
“ND”,
“MOSAIC”
],
“InPlanePhaseEncodingDirectionDICOM”: “COL”,
“InstitutionAddress”: “Vassar_Street_43_Cambridge_Boston_US_02139”,
“InstitutionName”: “MIT”,
“InstitutionalDepartmentName”: “Department”,
“IntendedFor”: [“func/sub-SAXpSISOp07_task-CIC_run-001_bold.nii.gz”,
“func/sub-SAXpSISOp07_task-CIC_run-002_bold.nii.gz”,
“func/sub-SAXpSISOp07_task-CIC_run-003_bold.nii.gz”,
“func/sub-SAXpSISOp07_task-CIC_run-004_bold.nii.gz”,
“func/sub-SAXpSISOp07_task-CIC_run-005_bold.nii.gz”,
“func/sub-SAXpSISOp07_task-CIC_run-006_bold.nii.gz”],
“MRAcquisitionType”: “2D”,
“MagneticFieldStrength”: 3,
“Manufacturer”: “Siemens”,
“ManufacturersModelName”: “Prisma_fit”,
“Modality”: “MR”,
“PartialFourier”: 1,
“PatientPosition”: “HFS”,
“PercentPhaseFOV”: 100,
“PhaseEncodingDirection”: “j”,
“PhaseEncodingSteps”: 70,
“PhaseResolution”: 1,
“PixelBandwidth”: 2745,
“ProcedureStepDescription”: “Saxe_SISO”,
“ProtocolName”: “SpinEcho_TopUp_3mm_PA”,
“PulseSequenceDetails”: “%CustomerSeq%_cmrr_mbep2d_se”,
“ReceiveCoilActiveElements”: “HEA;HEP”,
“ReceiveCoilName”: “Head_32”,
“ReconMatrixPE”: 70,
“RepetitionTime”: 8,
“SAR”: 0.121208,
“ScanOptions”: “FS”,
“ScanningSequence”: “EP”,
“SequenceName”: “epse2d1_70”,
“SequenceVariant”: “SK”,
“SeriesDescription”: “SpinEcho_TopUp_3mm_PA”,
“SeriesNumber”: 16,
“ShimSetting”: [-5653, -1474, 3105, 214, -37, 9, -27, 123],
“SliceThickness”: 3,
“SliceTiming”: [3.99, 0, 4.1275, 0.1375, 4.265, 0.275, 4.4025, 0.4125, 4.54, 0.55, 4.6775, 0.6875, 4.815, 0.825, 4.9525, 0.9625, 5.09, 1.1, 5.2275, 1.2375, 5.365, 1.375, 5.5025, 1.5125, 5.64, 1.65, 5.7775, 1.7875, 5.915, 1.925, 6.0525, 2.0625, 6.19, 2.2, 6.3275, 2.3375, 6.465, 2.475, 6.6025, 2.6125, 6.74, 2.75, 6.8775, 2.8875, 7.015, 3.025, 7.1525, 3.1625, 7.29, 3.3, 7.4275, 3.4375, 7.565, 3.575, 7.7025, 3.715, 7.84, 3.8525],
“SoftwareVersions”: “syngo_MR_E11”,
“SpacingBetweenSlices”: 3.3,
“StationName”: “MRC35115”,
“TotalReadoutTime”: 0.0345005,
“TxRefAmp”: 231.2,
“VendorReportedEchoSpacing”: 0.0005}

/om/group/saxelab/SISO_pilot/data/BIDS/sub-SAXpSISOp07//fmap/sub-SAXpSISOp07_topup_PA_run-002_epi.json
{
“AcquisitionMatrixPE”: 70,
“AcquisitionNumber”: 1,
“AcquisitionTime”: “19:27:37.510000”,
“BandwidthPerPixelPhaseEncode”: 28.571,
“BaseResolution”: 70,
“BodyPartExamined”: “BRAIN”,
“ConsistencyInfo”: “N4_VE11C_LATEST_20160120”,
“ConversionSoftware”: “dcm2niix”,
“ConversionSoftwareVersion”: “v1.0.20180622 GCC6.3.0”,
“DerivedVendorReportedEchoSpacing”: 0.000500008,
“DeviceSerialNumber”: “167012”,
“DwellTime”: 2.6e-06,
“EchoTime”: 0.04,
“EchoTrainLength”: 70,
“EffectiveEchoSpacing”: 0.000500007,
“FlipAngle”: 90,
“ImageOrientationPatientDICOM”: [0.995039, -0.0137687, -0.0985296, -0.0307488, 0.899323, -0.436202],
“ImageType”: [
“ORIGINAL”,
“PRIMARY”,
“M”,
“ND”,
“MOSAIC”
],
“InPlanePhaseEncodingDirectionDICOM”: “COL”,
“InstitutionAddress”: “Vassar_Street_43_Cambridge_Boston_US_02139”,
“InstitutionName”: “MIT”,
“InstitutionalDepartmentName”: “Department”,
“IntendedFor”: “func/sub-SAXpSISOp07_task-midloc_bold.nii.gz”,
“MRAcquisitionType”: “2D”,
“MagneticFieldStrength”: 3,
“Manufacturer”: “Siemens”,
“ManufacturersModelName”: “Prisma_fit”,
“Modality”: “MR”,
“PartialFourier”: 1,
“PatientPosition”: “HFS”,
“PercentPhaseFOV”: 100,
“PhaseEncodingDirection”: “j”,
“PhaseEncodingSteps”: 70,
“PhaseResolution”: 1,
“PixelBandwidth”: 2745,
“ProcedureStepDescription”: “Saxe_SISO”,
“ProtocolName”: “SpinEcho_TopUp_3mm_PA”,
“PulseSequenceDetails”: “%CustomerSeq%_cmrr_mbep2d_se”,
“ReceiveCoilActiveElements”: “HEA;HEP”,
“ReceiveCoilName”: “Head_32”,
“ReconMatrixPE”: 70,
“RepetitionTime”: 8,
“SAR”: 0.121208,
“ScanOptions”: “FS”,
“ScanningSequence”: “EP”,
“SequenceName”: “epse2d1_70”,
“SequenceVariant”: “SK”,
“SeriesDescription”: “SpinEcho_TopUp_3mm_PA”,
“SeriesNumber”: 26,
“ShimSetting”: [-5653, -1474, 3105, 214, -37, 9, -27, 123],
“SliceThickness”: 3,
“SliceTiming”: [3.99, 0, 4.1275, 0.14, 4.265, 0.2775, 4.4025, 0.415, 4.5425, 0.5525, 4.68, 0.69, 4.8175, 0.8275, 4.955, 0.965, 5.0925, 1.1025, 5.23, 1.24, 5.3675, 1.3775, 5.505, 1.515, 5.6425, 1.6525, 5.78, 1.79, 5.9175, 1.9275, 6.055, 2.065, 6.1925, 2.2025, 6.33, 2.34, 6.4675, 2.4775, 6.605, 2.615, 6.7425, 2.7525, 6.88, 2.89, 7.0175, 3.0275, 7.155, 3.165, 7.2925, 3.3025, 7.43, 3.44, 7.5675, 3.5775, 7.705, 3.715, 7.8425, 3.8525],
“SoftwareVersions”: “syngo_MR_E11”,
“SpacingBetweenSlices”: 3.3,
“StationName”: “MRC35115”,
“TotalReadoutTime”: 0.0345005,
“TxRefAmp”: 231.2,
“VendorReportedEchoSpacing”: 0.0005}

This does not look like a valida BIDS name. Did you run the validator on this dataset?

Does this mean PhaseEncodingDirection is set to j for sub-SAXpSISOp07_task-midloc_bold? You need to have opposite phase encoding direction (between bold and epi) for this technique to work.

Hi,

the phase encoding direction for sub-SAXpSISOp07_task-midloc_bold is j- and the encoding direction in the _epi is j and this is the same for my other task (CIC).

But in any case, I validated the dataset with a different fieldmap (phasediff) before and I now checked it again and did get an error message. I checked the BIDS specifications again and found my error, the correct BIDS name is
sub-SAXpSISOp07_dir-PA_run-001_epi.json (and sub-SAXpSISOp07_dir-AP_run-001_epi.json respectively). I now restarted fmriprep with the _epi files in both encoding directions and I get the message "SDC: fieldmap estimation of type “epi” intended for /om/group/saxelab/SISO_pilot/data/BIDS/sub-SAXpSISOp07/func/sub-SAXpSISOp07_task-CIC_run-001_bold.nii.gz found ". It’s still running so I can’t check the output yet, but it looks like this is working now.

Thanks for the quick help!!

Livia

2 Likes