Omni-synth: advice on how to feed outputs to fMRIPrep

I ended up using omni to create SDC’ed “raw” bold scans, which were then used as fMRIprep input.

As part of its intermediate processing, omni will generate a warpfield that is used to unwarp a distorted BOLD image. Since omni normally outputs corrected data in template space, you can apply the warpfield to the raw data yourself.

<omni output folder>/
    sub-abcd/
        ses-abcd/
            func/
                sub-1_ses-1_task-mytask_bold/
                    ...
                    epi_proc_1_distortion_correction/
                        final_epi_to_synth_warp.nii.gz
                        ...
                   ...
                   func_proc_0_deoblique_func/
                       sub-abcd_ses-1_task-mytask_bold_deobliqued.nii.gz
                       ...
                   ...
                ...

For my project, I am using “deobliqued” intermediate data omni generates. However, with the exception of FOV, I have not seen appreciable visual changes when applying the warpfield to raw and “omni deobliqued” data. (using deobliqued anyway out of an “abundance of caution”)
The warpfield is applied using 3dNwarpApply. (recommended to copy raw data to a new “fakebids” directory and save unwarped BOLD to that, to leave raw data untouched)

OUTOMNI=""
FAKEBIDS=""
subid=""
sesid=""
taskname=""

funclab="sub-${subid}_ses-${sesid}_task-${taskname}_bold"
funcbase="$OUTOMNI/sub-${subid}/ses-${sesid}/func/$funclab/"
towarp="$funcbase/func_proc_0_deoblique_func/${funclab}_deobliqued.nii.gz"
outwarp="$FAKEBIDS/sub-${subid}/ses-${sesid}/func/${funclab}.nii.gz"
warpfield="$funcbase/epi_proc_1_distortion_correction/final_epi_to_synth_warp.nii.gz"

3dNwarpApply \
    -verbose \
    -overwrite \
    -source $towarp \
    -master $towarp \
    -prefix $outwarp \
    -nwarp $warpfield