SDC error for fieldmap-based correction

We encounter an error (log below) in phmap2rads that we have associated with a certain type of fieldmap acquisition but don’t know why it fails. Specifically, the when the BOLD scan and the fieldmap scan are both acquired axially there is no error, but when the fieldmap is acquired sagitally the error happens. The error message below is followed by examples of fieldmaps that work and don’t work.


File: /DATA/fmriprep-1.5.5/fmriprep/sub-R/log/20200124-061243_5ea8ae31-a295-496d-a586-748a17830a8f/crash-20200124-062515-fmriprep-phmap2rads-2f64b28a-ad9b-497a-b4a0-1242888fad3c.txt

Working Directory: /DATA/fmriprep-1.5.5/work_sub-R/fmriprep_wf/single_subject_R_wf/func_preproc_ses_05_task_taskmotor_run_01_wf/sdc_estimate_wf/phdiff_wf/phmap2rads

    in_file: ['/DATA/fmriprep-1.5.5/bids/sub-R/ses-05/fmap/sub-R_ses-05_run-01_phasediff.nii.gz']

Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/plugins/", line 336, in _send_procs_to_workers
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/", line 516, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/", line 1373, in _run_interface
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/", line 1295, in _collate_results
    "Subnodes of node: %s failed:\n%s" % (, "\n".join(msg))
Exception: Subnodes of node: phmap2rads failed:
Subnode 0 failed
Error: Traceback (most recent call last):
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/", line 94, in nodelist_runner
    result =
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/", line 516, in run
    result = self._run_interface(execute=True)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/", line 635, in _run_interface
    return self._run_command(execute)
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/pipeline/engine/", line 741, in _run_command
    result =
  File "/usr/local/miniconda/lib/python3.7/site-packages/nipype/interfaces/base/", line 395, in run
    runtime = self._run_interface(runtime)
  File "/usr/local/miniconda/lib/python3.7/site-packages/sdcflows/interfaces/", line 266, in _run_interface
  File "/usr/local/miniconda/lib/python3.7/site-packages/sdcflows/interfaces/", line 673, in au2rads
    data[data < 0] = - np.pi * data[data < 0] / data[data < 0].min()
  File "/usr/local/miniconda/lib/python3.7/site-packages/numpy/core/", line 32, in _amin
    return umr_minimum(a, axis, None, out, keepdims, initial)
ValueError: zero-size array to reduction operation minimum which has no identity

When creating this crashfile, the results file corresponding
to the node could not be found.

A fieldmap acquisition that works has the following output from c3d -info:
Image #1: dim = [144, 144, 59]; bb = {[172.569 172.569 -78.3001], [522.569 522.569 80.9999]}; vox = [2.43056, 2.43056, 2.7]; range = [-250, 249.881]; orient = LPI

A fieldmap acquisition that producess the error above has the following output from c3d -info:
Image #1: dim = [59, 144, 144]; bb = {[78.3001 172.569 -172.569], [237.6 522.569 177.431]}; vox = [2.7, 2.43056, 2.43056]; range = [-250, 249.881]; orient = LPI

Pinging @effigies just in case. We are having the above error with fmriprep 1.5.8. Is this a problem with orientation of fieldmaps or anthing else? And is there anything to make these field maps work with fmriprep.

P.s. Not 100% sure but I think some other researchers have used these field maps in SPM successfully before.

Judging by the error, it would appear the data is all non-negative.

My best suggestion is to open an issue with sdcflows and, if possible, provide example data.

Thanks for responding. This is not the case. The phase difference map looks fine in terms of values, similar to the axially acquired ones within the same session. I have had an issue open in sdcflows since before posting here!

Ah, thanks for pointing that out. I haven’t been very involved in SDCflows and don’t get notifications. Just to link the thread:

As this is an apparent bug, I think the appropriate place to follow up is there.