"Error: unknown total-readout time specification" despite --use-syn-sdc and --ignore fieldmaps

Summary

When running aslprep-0.7.4 with --ignore fieldmaps and --use-syn-sdc the pipeline crashes because total readout time is not specified in the json sidecars.

Additional details

  • ASLPrep version: 0.7.4
  • Apptainer version: 1.2.5

BIDS directory tree

  • bids/sub-1/ses-1/
    • anat/
      • sub-1_ses-1_T1w.nii.gz
      • sub-1_ses-1_T1w.json
    • perf/
      • sub-1_ses-1_asl.json
      • sub-1_ses-1_asl.nii.gz
      • sub-1_ses-1_aslcontext.tsv
      • sub-1_ses-1_m0scan.json
      • sub-1_ses-1_m0scan.nii.gz

What were you trying to do?

Run fieldmap-less susceptibility disortion correction of 3D GRASE pCASL data acquired on a Siemens scanner.

What did you expect to happen?

I did not expect that I need to specify a total-readout time for fieldmap-less SDC.

What actually happened?

241127-10:41:15,307 nipype.workflow INFO:
	 ***********************************
241127-10:41:15,308 nipype.workflow ERROR:
	 could not run node: aslprep_0_7_wf.sub_0a9fe617_wf.asl_preproc_ses_1_wf.asl_fit_wf.unwarp_wf.rotime
241127-10:41:15,309 nipype.workflow INFO:
	 crashfile: /tmp_out/sub-0a9fe617/log/20241127-085737_1f167c2e-3473-439b-9ad1-8b44333e840e/crash-20241127-090038-bao4990-rotime-3fa496a5-1e11-492c-812b-b7dc42a1b07f.txt
241127-10:41:15,310 nipype.workflow INFO:
	 ***********************************
241127-10:41:15,355 nipype.workflow CRITICAL:
	 ASLPrep failed: Traceback (most recent call last):
  File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run
    result = self._run_interface(execute=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface
    return self._run_command(execute)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command
    raise NodeExecutionError(msg)
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node rotime.

Traceback:
	Traceback (most recent call last):
	  File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 397, in run
	    runtime = self._run_interface(runtime)
	              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	  File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/sdcflows/interfaces/epi.py", line 57, in _run_interface
	    self._results["readout_time"] = get_trt(
	                                    ^^^^^^^^
	  File "/opt/conda/envs/aslprep/lib/python3.11/site-packages/sdcflows/utils/epimanip.py", line 228, in get_trt
	    raise ValueError("Unknown total-readout time specification")
	ValueError: Unknown total-readout time specification
>

Command used

   $apptainer_aslprep \
   /tmp_in /tmp_out participant \
   --participant-label $1 \
   --work-dir /tmp \
   --fs-license-file envs/freesurfer_license.txt \
   --skip-bids-validation \
   --nthreads $GNU_CPUS_PER_TASK \
   --omp-nthreads $OMP_NTHREADS \
   --mem_mb $MEM_MB \
   --ignore fieldmaps sbref t2w flair fmap-jacobian \
   --output-spaces $OUTPUT_SPACES \
   --asl2anat-init t1w \
   --asl2anat-dof 6 \
   --force-bbr \
   --use-syn-sdc \
   --force-syn \
   --m0_scale 10 \
   --scorescrub \
   --basil \
   --project-goodvoxels \
   --skull-strip-template OASIS30ANTs \
   --skull-strip-fixed-seed \
   --random-seed 42 \
   --skull-strip-t1w force \
   --notrack \
   --verbose"

Question

Is it possible to run syn-sdc without specifying a total readout-time, and if not where do I need to specify it? In the *asl.json? Can I use an arbitrary number > 0, as I understand from @effigies post TotalReadoutTime - unwarp - fieldmap-less.

ASLPrep just uses SDCFlows in the same way as fMRIPrep, so if you see recommendations for using --use-syn-sdc with BOLD data you should be able to apply it to your ASL data. I don’t typically use --use-syn-sdc so I don’t have any specific advice- I definitely defer to @effigies on this.

Yes, but be aware that any tool that needs it to be correct will have problems. SyN-SDC happens to be a situation where the value is irrelevant. For numerical simplicity, I would use a power of 2, such as 0.03125.

You may want to check your metadata. If dcm2niix has produced EstimatedEchoSpacing or EstimatedTotalReadoutTime, you might want to use those by removing the Estimated, to reduce the chance of false metadata creeping into other uses of your data…

First of all, thanks a lot for you quick replies @effigies and @tsalo !

Unfortunately, dcm2niix doesn’t produce those meta data fields in my case, and other relevant meta data to calculate TotalReadOutTime are missing in the DICOM headers as well. Therefore I will opt for your suggestion.