Hi, Ilaria-
So, while the reference template is used as a base for registration of the anatomical/EPI data, we generally tend not to recommend upsampling the EPI data all the way to that voxelsize. It doesn't create more information, and creates muuuuuch larger data sets. So, typically the voxelsize of the final EPI/errts/epits/stats dsets *do* have a different voxelsize/grid from the reference template.
While resampling the anatomical could be one way to make a mask, there are also masks that are created during processing that are probably even more appropriate, because they take into account the extent of your actual EPI data. For example, do you have a dset: mask_epi_anat*HEAD in your output? That might be the best option to use for each individual subject.
Perhaps *even better* for your group analysis with 3dttest++ would be to use gen_group_command as in the s.nimh_group_level_02_mema.tcsh script provided here:
[
afni.nimh.nih.gov]
in the section "Voxelwise modeling" (it's a 3dMEMA example, but you can do the same kind of command for 3dttest++), followed by making a group appropriate mask as in "Make group mask", just below that.
Note that you should also check out some of the comments in the related bioRxiv draft associated with that script, as there are some very relevant sections about masking/accounting for zeros in the extents of dsets here:
[
www.biorxiv.org]
-pt