What happened?
Hello, I am running into a strange issue where I cannot get the pipeline to run SyN-SDC properly in some circumstances. I have tried various combinations of --ignore fieldmaps, --force syn-sdc and --bids-filter-file (either explicitly excluding the fieldmaps or pointing to nonexistent runs).
The daset included a fieldmap with no "IntendedFor" field. The fieldmap is there for other reasons and should not be applied to the data. Moreover, I have two tasks, and I want to process just one (actually the second task is for spinal cord fMRI, so, not relevant to fmriprep)
My command line #1:
docker run --tmpfs /run --tmpfs /tmp -it --rm -v /opt/fmriprep/freesurfer_license.txt:/opt/freesurfer/license.txt:ro -v /opt/paminabids/GIOVE/MULTISPINE:/data:ro -v /opt/paminabids/GIOVE/MULTISPINE/derivatives/fmriprep:/out -v /tmp/tp9c11c4e1_633e_424f_b675_862f2fc66989:/scratch nipreps/fmriprep:25.2.5 /data /out participant --participant-label 00310700 --nprocs 20 --omp-nthreads 4 --md-only-boilerplate --write-graph --clean-workdir --skip_bids_validation -w /scratch --use-syn-sdc --force syn-sdc --output-spaces MNI152NLin2009cAsym:res-2
this one works (syn-sdc performed), but obviously processes also the spinal cord runs
Command line #2
As #1, + --bids-filter-file /data/code/fmriprep-filter-file.json
Filter file is as follows:
{
"t1w": {
"datatype": "anat",
"suffix": "T1w"
},
"fmap": {
"datatype": "fmap"
},
"bold": {
"datatype": "func",
"suffix": "bold",
"task": "rest",
"acquisition": "Brain"
}
}
In this case, the correct data are processed (that is, only "brain" runs), but no sdc is performed, neither syn, nor fieldmap based
Command line #3
As #2, is identical command line, but filter as follows:
{
"t1w": {
"datatype": "anat",
"suffix": "T1w"
},
"fmap": {
"datatype": "fmap",
"run": "9999"
},
"bold": {
"datatype": "func",
"suffix": "bold",
"task": "rest",
"acquisition": "Brain"
}
}
That is, "fmap" points to a non-existant run.
In this case, it is triggered teh error " Fieldmap-less (SyN) estimation was requested, but PhaseEncodingDirection information appears to be absent"
Note that the data are the same, and the PhaseEncodingDirection info is actually present. Command line is also the same, just the filter file changes
While there are ways to circumvent this problem, something strange is happening here
Thank you, Federico
What command did you use?
What version of fMRIPrep are you running?
25.2.4. Same error with 25.1.4
How are you running fMRIPrep?
Docker
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
FreeSurfer
Please copy and paste any relevant log output.
command line #3:
Traceback (most recent call last):
File "/app/.pixi/envs/fmriprep/lib/python3.12/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/app/.pixi/envs/fmriprep/lib/python3.12/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/fmriprep/cli/workflow.py", line 116, in build_workflow
retval['workflow'] = init_fmriprep_wf()
^^^^^^^^^^^^^^^^^^
File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/fmriprep/workflows/base.py", line 108, in init_fmriprep_wf
single_subject_wf = init_single_subject_wf(subject_id, sessions, name=wf_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/fmriprep/workflows/base.py", line 637, in init_single_subject_wf
all_estimators, estimator_map = map_fieldmap_estimation(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/.pixi/envs/fmriprep/lib/python3.12/site-packages/fmriprep/workflows/base.py", line 986, in map_fieldmap_estimation
raise ValueError(message)
ValueError: Fieldmap-less (SyN) estimation was requested, but PhaseEncodingDirection information appears to be absent.
Additional information / screenshots
No response
What happened?
Hello, I am running into a strange issue where I cannot get the pipeline to run SyN-SDC properly in some circumstances. I have tried various combinations of --ignore fieldmaps, --force syn-sdc and --bids-filter-file (either explicitly excluding the fieldmaps or pointing to nonexistent runs).
The daset included a fieldmap with no "IntendedFor" field. The fieldmap is there for other reasons and should not be applied to the data. Moreover, I have two tasks, and I want to process just one (actually the second task is for spinal cord fMRI, so, not relevant to fmriprep)
My command line #1:
docker run --tmpfs /run --tmpfs /tmp -it --rm -v /opt/fmriprep/freesurfer_license.txt:/opt/freesurfer/license.txt:ro -v /opt/paminabids/GIOVE/MULTISPINE:/data:ro -v /opt/paminabids/GIOVE/MULTISPINE/derivatives/fmriprep:/out -v /tmp/tp9c11c4e1_633e_424f_b675_862f2fc66989:/scratch nipreps/fmriprep:25.2.5 /data /out participant --participant-label 00310700 --nprocs 20 --omp-nthreads 4 --md-only-boilerplate --write-graph --clean-workdir --skip_bids_validation -w /scratch --use-syn-sdc --force syn-sdc --output-spaces MNI152NLin2009cAsym:res-2
this one works (syn-sdc performed), but obviously processes also the spinal cord runs
Command line #2
As #1, + --bids-filter-file /data/code/fmriprep-filter-file.json
Filter file is as follows:
{
"t1w": {
"datatype": "anat",
"suffix": "T1w"
},
"fmap": {
"datatype": "fmap"
},
"bold": {
"datatype": "func",
"suffix": "bold",
"task": "rest",
"acquisition": "Brain"
}
}
In this case, the correct data are processed (that is, only "brain" runs), but no sdc is performed, neither syn, nor fieldmap based
Command line #3
As #2, is identical command line, but filter as follows:
{
"t1w": {
"datatype": "anat",
"suffix": "T1w"
},
"fmap": {
"datatype": "fmap",
"run": "9999"
},
"bold": {
"datatype": "func",
"suffix": "bold",
"task": "rest",
"acquisition": "Brain"
}
}
That is, "fmap" points to a non-existant run.
In this case, it is triggered teh error " Fieldmap-less (SyN) estimation was requested, but PhaseEncodingDirection information appears to be absent"
Note that the data are the same, and the PhaseEncodingDirection info is actually present. Command line is also the same, just the filter file changes
While there are ways to circumvent this problem, something strange is happening here
Thank you, Federico
What command did you use?
What version of fMRIPrep are you running?
25.2.4. Same error with 25.1.4
How are you running fMRIPrep?
Docker
Is your data BIDS valid?
Yes
Are you reusing any previously computed results?
FreeSurfer
Please copy and paste any relevant log output.
Additional information / screenshots
No response