Possible bug in AFNI_20.0.09 auto_warp.py

Hello AFNI Experts,
I think I have come across a bug in auto_warp.py on the latest release related to the skip_affine flag. I ran the following:

auto_warp.py -base MNI.nii -input T1.nii -warp_dxyz 1 -skip_affine no

I received the following error:
else: endif not found.
ls: cannot access anat_XYZ_OYmeqfZ3JqF7n9LNC7gDAA_shft.1D: No such file or directory
** ERROR: mri_matrix_evalrpn('&read4x4Xform() &write(stdout:) ') at ‘&read4x4Xform()’: can’t read file ‘’
mv: missing destination file operand after ‘anat_XYZ_OYmeqfZ3JqF7n9LNC7gDAA_44.1D’

If I change the auto_warpy.py command to have -skip_affine yes, then the command works. This error is consistent across a few different datasets, so it seems isolated to the function. I tried using AFNI_19.2.26 and there were no errors so it seems that there may be a missing endif based on the error above.


Hi, Ajay-

Thanks for pointing that out. I think it is related to this error in that version of AFNI:
which was solved in an ensuing build.

If you update your AFNI version, does that error go away?


Thanks for the info. I updated it and the new version (20.0.18) and it is now working.