That’s right. Both datasets get shifted and interpolated a similar amount. Even with just 3 sessions, there are still lots of options. Most should work well depending on how much change is expected. Age, surgery, disease, exercise, juggling,… - will have varying effects with time.
Take for example 3 sessions, each with an Anatomical and an EPI scan.
A1,E1 A2,E2, A3,E3
Multi-session data can be handled by aligning everything to any of the anatomical datasets. One could pick the first, middle or last for a desired relative measure.
E1->A1, E2->A1, E3->A1
Or if one were expecting larger physical changes, align everything to each session’s own anatomical and then that anatomical to a reference anatomical scan.
E1->A1, E2->A2->A1, E3->A3->A1
The reference anatomical scan could be an in-between anatomical dataset as in the script you linked instead.
A1 >< A2 → A12
E1->A12, E2->A12, E3->A12
For 3 sessions, you could extend this further with
A1 >< A2 → A12, A2 >< A3 → A23
A12><A23 → A123
E1->A123, E2->A123, E3->A123
or this variant using each session’s own anatomical as an intermediate:
A1 >< A2 → A12, A2 >< A3 → A23
A12><A23 → A123
E1->A1->A123, E2->A2->A123, E3->A3->A123
Or with a more sessions, make a new template out of the whole series of anatomical datasets in the same way we make templates out of multiple subjects:
A1,A2,…An → At
E1->A1->At, E2->A2->At, E3->A3->At
Another option, is to treat every session as a separate run in the same experiment. This requires some better alignment and motion correction across runs because shimming and distortions are likely to be different. These are some recent, useful options in afni_proc.py for dealing with multiple sessions as if they were runs in the same linear model:
-volreg_allin_cost lpa+zz \
-volreg_post_vr_allin yes \
-volreg_pvra_base_index MIN_OUTLIER \
While this is likely a more complicated answer than what you might need, a lot depends on your particular set of experiments and research question.