Calculate dataset variation

Hi,everyone

I want to calculate the variation of dataset. I have used 3dTstat -stdev, but the result doesn’t seem well. So I want to try the latter volume minus the volume, for example,sub-brick#2-#1#3-#2#4-#3…In this case,what program should I use? If no program can do this , can I use 3dTcat to select every 2 sub-brick by using the selection list,like red+orig[0…$(2)] and blue+orig[1…$(2)],then blue-red using 3dcalc?

Thanks a lot

One can use 3dcalc directory to compute such a difference,
using the +l differential subscript feature for the next
time point, as in:

3dcalc -a dset+orig -b a+l -expr b-a -prefix first_diff

Note that by default, “3dTstat -stdev” removes a linear
trend from the data before the computation. If the mean
is already zero and you do not want detrending, use the
NOD version of the option: 3dTstat -stdevNOD

  • rick