The desc_outputs function in aamod_firstlevel_contrasts.m adds both the .img and .hdr files simultaneously, resulting in something like:
spmT_0001.hdr
spmT_0001.img
spmT_0002.img
spmT_0002.hdr
This creates problems down the line in the aamod_secondlevel_model.m, since it selects 1:N (number of contrasts), meaning it considers the same file twice, and mixes up the contrasts, leading to incorrect results.
The desc_outputs function in aamod_firstlevel_contrasts.m adds both the .img and .hdr files simultaneously, resulting in something like:
spmT_0001.hdr
spmT_0001.img
spmT_0002.img
spmT_0002.hdr
This creates problems down the line in the aamod_secondlevel_model.m, since it selects 1:N (number of contrasts), meaning it considers the same file twice, and mixes up the contrasts, leading to incorrect results.