QSIprep - fieldmap averaging, multiple directions not recognized

Hi all,

I am currently attempting to use QSIprep to preprocess my DWI data in the HCP style. I do not have multiple phase encoding directions for the DWI data, but I have two phase encoding directions for my fieldmaps (AP and PA directions).

I am receiving the error: “Exception: Unable to merge using strategy ‘average’: exactly two distortion groups must be present in data. Found 1”.

This comes from the --distortion-group-merge flag, where I designate that the different directions should be averaged. I receive a similar error when it is designated as either ‘average’ and ‘concat’ for this flag. I have ensured that there is an “IntendedFor” field inside of the fieldmap JSON files, linking both fieldmaps to the DWI data. I have also confirmed that these fieldmaps are in different directions (indicated by j and -j in the JSON files).

Can someone let me know if there is something about my directory structure or naming convention that is preventing QSIprep from finding both of these fieldmaps and averaging them? I am not sure what else this error could be speaking to. It was my understanding that this flag will concatenate fieldmaps as well as DWI data, but was I wrong in this assumption? Any help would greatly appreciated.

Directory structure:

QSIprep command (run with a singularity image on our computing cluster):

singularity run -B ${SINGULARITYENV_TEMPLATEFLOW_HOME:-$HOME/.cache/templateflow}:/home/tuj96493/work/relationship_knowledge/archive/templateflow \
    --cleanenv /home/tuj96493/work/relationship_knowledge/archive/qsiprep_0.15.2.sif \
    /home/tuj96493/work/relationship_knowledge/ \
    /home/tuj96493/work/relationship_knowledge/derivatives/ \
    participant \
    --output-space T1w \
    --denoise-method none \
    --b0-to-t1w-transform Rigid \
    --prefer_dedicated_fmaps \
    --distortion-group-merge average \
    --hmc_model eddy \
    --output-resolution 1.25 \
    --fs-license-file /home/tuj96493/license.txt \
    -w /home/tuj96493/work/relationship_knowledge/derivatives/ \
    --participant-label 767 \

Best Wishes,

Hi Katie,

The merging requires 2 DWI scans with different PE directions. In your case you should just leave off the --distortion-group-merge argument entirely and it should do what you want.

Thank you for your response! This is what I thought may be the issue.

Does this mean it will not combine the fieldmaps at all, or that function is just automatic when you have multiple fieldmaps?

The fieldmaps will be combined in order to estimate the distortion (using TOPUP), and the correction will be applied to your DWI images by eddy. There will be a little paragraph in the HTML report that explains which images from which files were used for distortion correction.

1 Like