Hi, experts,
Summary of what happened:
I’m curious about why the following warning is generated in fmriprep.
KeyError: “‘phasediff_fmap0’ is already in mapping”
Command used (and if a helper script was used, a link to the helper script or the command generated):
fmriprep-docker d:\test6 d:\test6\derivatives
Version:
fMRIPrep-23.2.3Environment (Docker, Singularity / Apptainer, custom installation):
dockerRelevant log outputs (up to 20 lines):
RUNNING: docker run --rm -e DOCKER_VERSION_8395080871=26.1.1 -it -v d:\test6:/data:ro -v d:\test6\derivatives:/out nipreps/fmriprep:23.2.3 /data /out participant
You are using fMRIPrep-23.2.3, and a newer version of fMRIPrep is available: 24.0.1.
Please check out our documentation about how and when to upgrade:
https://fmriprep.readthedocs.io/en/latest/faq.html#upgrading
bids-validator@1.14.6
(node:9) Warning: Closing directory handle on garbage collection
(Use `node --trace-warnings ...` to show where the warning was created)
1: [WARN] The Authors field of dataset_description.json should contain an array of fields - with one author per field. This was triggered based on the presence of only one author field. Please ignore if all contributors are already properly listed. (code: 102 - TOO_FEW_AUTHORS)
Please visit https://neurostars.org/search?q=TOO_FEW_AUTHORS for existing conversations about this issue.
2: [WARN] The Name field of dataset_description.json is present but empty of visible characters. (code: 115 - EMPTY_DATASET_NAME)
Please visit https://neurostars.org/search?q=EMPTY_DATASET_NAME for existing conversations about this issue.
Summary: Available Tasks: Available Modalities:
41 Files, 415.49MB rest MRI
3 - Subjects
1 - Session
If you have any questions, please post on https://neurostars.org/tags/bids.
240818-17:00:06,929 nipype.workflow IMPORTANT:
Running fMRIPrep version 23.2.3
License NOTICE ##################################################
fMRIPrep 23.2.3
Copyright 2023 The NiPreps Developers.
This product includes software developed by
the NiPreps Community (https://nipreps.org/).
Portions of this software were developed at the Department of
Psychology at Stanford University, Stanford, CA, US.
This software is also distributed as a Docker container image.
The bootstrapping file for the image ("Dockerfile") is licensed
under the MIT License.
This software may be distributed through an add-on package called
"Docker Wrapper" that is under the BSD 3-clause License.
#################################################################
240818-17:00:06,951 nipype.workflow IMPORTANT:
Building fMRIPrep's workflow:
* BIDS dataset path: /data.
* Participant list: ['y072', 'y073', 'y074'].
* Run identifier: 20240818-170000_8b308741-cfe1-47b9-8d1f-7649d064186a.
* Output spaces: MNI152NLin2009cAsym:res-native.
* Pre-run FreeSurfer's SUBJECTS_DIR: /out/sourcedata/freesurfer.
240818-17:00:07,306 nipype.workflow INFO:
ANAT Stage 1: Adding template workflow
240818-17:00:07,507 nipype.workflow INFO:
ANAT Stage 2: Preparing brain extraction workflow
240818-17:00:07,549 nipype.workflow INFO:
ANAT Stage 3: Preparing segmentation workflow
240818-17:00:07,552 nipype.workflow INFO:
ANAT Stage 4: Preparing normalization workflow for ['MNI152NLin2009cAsym']
240818-17:00:07,556 nipype.workflow INFO:
ANAT Stage 5: Preparing surface reconstruction workflow
240818-17:00:07,567 nipype.workflow INFO:
ANAT Stage 6: Preparing mask refinement workflow
240818-17:00:07,568 nipype.workflow INFO:
ANAT No T2w images provided - skipping Stage 7
240818-17:00:07,568 nipype.workflow INFO:
ANAT Stage 8: Creating GIFTI surfaces for ['white', 'pial', 'midthickness', 'sphere_reg', 'sphere']
240818-17:00:07,577 nipype.workflow INFO:
ANAT Stage 8: Creating GIFTI metrics for ['thickness', 'sulc']
240818-17:00:07,581 nipype.workflow INFO:
ANAT Stage 8a: Creating cortical ribbon mask
240818-17:00:07,583 nipype.workflow INFO:
ANAT Stage 9: Creating fsLR registration sphere
240818-17:00:07,585 nipype.workflow INFO:
ANAT Stage 10: Creating MSM-Sulc registration sphere
240818-17:00:07,657 nipype.workflow INFO:
B0 field inhomogeneity map will be estimated with the following 1 estimator(s): [<EstimatorType.PHASEDIFF: 3>].
240818-17:00:07,680 nipype.workflow INFO:
Setting-up fieldmap "phasediff_fmap0" (EstimatorType.PHASEDIFF) with <sub-y072_ses-1_magnitude1.nii, sub-y072_ses-1_magnitude2.nii, sub-y072_ses-1_phasediff.nii>
240818-17:00:07,693 nipype.workflow INFO:
No single-band-reference found for sub-y072_ses-1_task-rest_run-01_bold.nii.
240818-17:00:07,707 nipype.workflow INFO:
Stage 1: Adding HMC boldref workflow
240818-17:00:07,710 nipype.workflow INFO:
Stage 2: Adding motion correction workflow
240818-17:00:07,715 nipype.workflow INFO:
Stage 3: Adding coregistration boldref workflow
240818-17:00:07,743 nipype.workflow IMPORTANT:
BOLD series will be slice-timing corrected to an offset of 0.961s.
240818-17:00:07,787 nipype.workflow INFO:
No single-band-reference found for sub-y072_ses-1_task-rest_run-02_bold.nii.
240818-17:00:07,797 nipype.workflow INFO:
Stage 1: Adding HMC boldref workflow
240818-17:00:07,800 nipype.workflow INFO:
Stage 2: Adding motion correction workflow
240818-17:00:07,803 nipype.workflow INFO:
Stage 3: Adding coregistration boldref workflow
240818-17:00:07,829 nipype.workflow IMPORTANT:
BOLD series will be slice-timing corrected to an offset of 0.96s.
240818-17:00:07,928 nipype.workflow INFO:
ANAT Stage 1: Adding template workflow
240818-17:00:08,26 nipype.workflow INFO:
ANAT Stage 2: Preparing brain extraction workflow
240818-17:00:08,61 nipype.workflow INFO:
ANAT Stage 3: Preparing segmentation workflow
240818-17:00:08,64 nipype.workflow INFO:
ANAT Stage 4: Preparing normalization workflow for ['MNI152NLin2009cAsym']
240818-17:00:08,68 nipype.workflow INFO:
ANAT Stage 5: Preparing surface reconstruction workflow
240818-17:00:08,77 nipype.workflow INFO:
ANAT Stage 6: Preparing mask refinement workflow
240818-17:00:08,79 nipype.workflow INFO:
ANAT No T2w images provided - skipping Stage 7
240818-17:00:08,79 nipype.workflow INFO:
ANAT Stage 8: Creating GIFTI surfaces for ['white', 'pial', 'midthickness', 'sphere_reg', 'sphere']
240818-17:00:08,88 nipype.workflow INFO:
ANAT Stage 8: Creating GIFTI metrics for ['thickness', 'sulc']
240818-17:00:08,92 nipype.workflow INFO:
ANAT Stage 8a: Creating cortical ribbon mask
240818-17:00:08,94 nipype.workflow INFO:
ANAT Stage 9: Creating fsLR registration sphere
240818-17:00:08,95 nipype.workflow INFO:
ANAT Stage 10: Creating MSM-Sulc registration sphere
Process Process-2:
Traceback (most recent call last):
File "/opt/conda/envs/fmriprep/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/opt/conda/envs/fmriprep/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/cli/workflow.py", line 115, in build_workflow
retval["workflow"] = init_fmriprep_wf()
File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/workflows/base.py", line 94, in init_fmriprep_wf
single_subject_wf = init_single_subject_wf(subject_id)
File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/workflows/base.py", line 504, in init_single_subject_wf
fmap_estimators, estimator_map = map_fieldmap_estimation(
File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/fmriprep/workflows/base.py", line 745, in map_fieldmap_estimation
fmap_estimators = find_estimators(
File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/sdcflows/utils/wrangler.py", line 340, in find_estimators
e = fm.FieldmapEstimation(
File "<attrs generated init sdcflows.fieldmaps.FieldmapEstimation>", line 7, in __init__
self.__attrs_post_init__()
File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/sdcflows/fieldmaps.py", line 431, in __attrs_post_init__
_estimators[self.bids_id] = self.paths()
File "/opt/conda/envs/fmriprep/lib/python3.10/site-packages/sdcflows/utils/bimap.py", line 144, in __setitem__
raise KeyError(
KeyError: "'phasediff_fmap0' is already in mapping"
Screenshots / relevant information:
I used the dcm2bids v. 3.1.1 for bids format.
Below is the config file that was used.
{
"dcm2niixOptions": "-ba n",
"descriptions": [
{
"datatype": "anat",
"suffix": "T1w",
"criteria": {
"SeriesDescription": "t1*",
"EchoTime": 0.00236,
"RepetitionTime": 2.3
},
"sidecar_changes": {
"ProtocolName": "T1"
}
},
{
"datatype": "anat",
"suffix": "FLAIR",
"criteria": {
"SeriesDescription": "t2*",
"EchoTime": 0.093,
"RepetitionTime": 9
},
"sidecar_changes": {
"ProtocolName": "FLAIR"
}
},
{
"id": "id_task-rest",
"datatype": "func",
"suffix": "bold",
"custom_entities": "task-rest",
"criteria": {
"EchoTime": 0.03,
"RepetitionTime": 2
},
"sidecar_changes": {
"TaskName": "rest",
"B0FieldSource": ["phasediff_fmap0"]
}
},
{
"datatype": "fmap",
"suffix": "magnitude1",
"criteria": {
"ProtocolName": "field_map",
"EchoTime": 0.00492
},
"sidecar_changes": {
"IntendedFor": ["id_task-rest"],
"B0FieldIdentifier": "phasediff_fmap0"
}
},
{
"datatype": "fmap",
"suffix": "magnitude2",
"criteria": {
"ProtocolName": "field_map",
"EchoTime": 0.00738,
"ImageType": ["ORIGINAL", "PRIMARY", "M", "ND"]
},
"sidecar_changes": {
"IntendedFor": "id_task-rest",
"B0FieldIdentifier": "phasediff_fmap0"
}
},
{
"datatype": "fmap",
"suffix": "phasediff",
"criteria": {
"ProtocolName": "field_map",
"EchoTime": 0.00738,
"ImageType": ["ORIGINAL", "PRIMARY", "P", "ND", "PHASE"]
},
"sidecar_changes": {
"IntendedFor": ["id_task-rest"],
"B0FieldIdentifier": "phasediff_fmap0"
}
}
]
}