Hi Matt,
Did something happen to give you the impression that 3dcopy would
not copy the sform? It should work fine. That means you plan to
replace to3d with 3dcopy, is that right?
It is good to give align_epi_anat.py datasets in AFNI format, but
you seem to be doing that already.
It is not clear what is really going wrong with your script. Maybe
there is something about the output from the other programs that
makes alignment more difficult. If it fails, that "square a circle"
is one of the errors that could come up.
If the actual alignment step keeps failing, feel free to upload the
datasets needed just for that align_epi_anat.py command (along with
your script and script output).
Note that the 'empty' block runs a useless 3dTcat command. That
command can be deleted and replaced with whatever you want to do.
The point is that the -prefix option from that 3dTcat command shows
you what is recommended as the output dataset names from your own
processing.
- rick and daniel