Issue with EPI to anatomical alignment

AFNI version info (afni -ver): AFNI_24.3.06

Dear AFNI Team,

I ran my first level analysis and for the vast majority of participants I got great Epi to Anat alignment results with sswarper2 and afni_proc.py:

afni_proc.py                                                         \
            -subj_id                  ${subj_id}_${sess}                                \
            -copy_anat                $anat_dir/anatSS.${subj_id}_${sess}.nii        \
            -anat_has_skull           no                                     \
            -anat_follower            anat_w_skull anat $anat_dir/anat_T1+orig      \
            -dsets                    $epi_dir/epi_nback+orig.HEAD                 \
            -blocks                   tshift align tlrc volreg mask blur     \
                                      scale regress                          \
            -radial_correlate_blocks  tcat volreg                            \
            -tcat_remove_first_trs    4                                      \
            -align_unifize_epi        local                                  \
            -align_opts_aea           -cost lpc+ZZ                           \
                                      -giant_move                            \
                                      -check_flip                            \
            -tlrc_base                MNI152_2009_template_SSW.nii.gz        \
            -tlrc_NL_warp                                                    \
            -tlrc_NL_warped_dsets     $anat_dir/anatQQ.${subj_id}_${sess}.nii        \
                                      $anat_dir/anatQQ.${subj_id}_${sess}.aff12.1D   \
                                      $anat_dir/anatQQ.${subj_id}_${sess}_WARP.nii   \
            -volreg_align_to          MIN_OUTLIER                            \
            -volreg_align_e2a                                                \
            -volreg_tlrc_warp                                                \
            -volreg_compute_tsnr      yes                                    \
            -mask_epi_anat            yes                                    \
            -blur_size                6.0                                    \

However, for very few subjects the initial alignment between the Epi and anatomical dataset appears to be quite off and the subsequent alignment doesn't seem to improve it - do you have any suggestions how to improve alignment in that case? I already tried several options like -ginormous_move or alternative cost functions.

Here is an example from the QC:

I appreciate any advice!

Best,
Florian

Hi, Florian-

Hmm, that surprises me. You are already using the cost function -align_opts_aea -cost lpc+ZZ and the local unifizing -align_unifize_epi local features. The initial EPI-anatomical overlap is also quite good---as shown in "Initial overlap, applying obliquity" part of the APQC HTML you have shown.

One minor thing is that the anatomical dataset does have obliquity in it (which we usually recommend removing with adjunct_deob_around_origin prior to any processing (NB: it is generally fine to leave the obliquity in the EPI volumes, and let processing deal with that). But it appears to be an extremely minor amount.

Sooo, I'm puzzled. Are you able to share the data? If so, I would like to take a look locally.

--pt

ps: one thought might be to remove the -giant_move opt, since the initial overlap is so good. However, it is often useful to just leave it in for other cases that don't start off so close, and I'm still curious about why this is going awry.

Dear Paul,

thank you so much for the quick response! It's good to know that the script looks fine and the initial overlap is also quite good. Unfortunately, I am not able to share the data due to policies at my institute. With your assessment in mind I will check again with a local physicist.

Thanks again!

Best,
Florian