@@ -615,15 +615,26 @@ def init_single_subject_wf(subject_id: str):
615
615
from sdcflows .workflows .base import init_fmap_preproc_wf
616
616
617
617
fallback_trt = config .workflow .fallback_total_readout_time
618
- fmap_wf = init_fmap_preproc_wf (
619
- use_metadata_estimates = fallback_trt == 'estimated' ,
620
- fallback_total_readout_time = fallback_trt if isinstance (fallback_trt , float ) else None ,
621
- debug = 'fieldmaps' in config .execution .debug ,
622
- estimators = fmap_estimators ,
623
- omp_nthreads = omp_nthreads ,
624
- output_dir = fmriprep_dir ,
625
- subject = subject_id ,
626
- )
618
+ try :
619
+ fmap_wf = init_fmap_preproc_wf (
620
+ use_metadata_estimates = fallback_trt == 'estimated' ,
621
+ fallback_total_readout_time = fallback_trt
622
+ if isinstance (fallback_trt , float )
623
+ else None ,
624
+ debug = 'fieldmaps' in config .execution .debug ,
625
+ estimators = fmap_estimators ,
626
+ omp_nthreads = omp_nthreads ,
627
+ output_dir = fmriprep_dir ,
628
+ subject = subject_id ,
629
+ )
630
+ except RuntimeError :
631
+ message = (
632
+ 'Missing readout time information. '
633
+ 'See documentation for `--fallback-total-readout-time`.'
634
+ )
635
+ config .loggers .workflow .critical (message , exc_info = True )
636
+ sys .exit (os .EX_DATAERR )
637
+
627
638
fmap_wf .__desc__ = f"""
628
639
629
640
Preprocessing of B<sub>0</sub> inhomogeneity mappings
0 commit comments