Hi Sharon,
Sure, you can get a new time series like that in 2 steps.
1. Use 3dmaskave to get the mean and std. dev.
3dmaskave -mask mask+orig -sigma -quiet epi+orig > ave_sd.1D
2. Use 3dcalc to make your new timeseries.
3dcalc -a epi+orig -b ave_sd.1D'[0]' -c ave_sd.1D'[1]' \
-expr 'step(c)*(a-b)/c' -prefix epi_norm
So column 0 of ave_sd.1D is the mean, and that gets assigned
to the variable 'b' (and varies over time, only), and column 1 is
the stddev, and gets assigned to 'c' (and again, varies only over
time). The 'step(c)' is there just to make sure you don't divide
by zero.
Is this what you are looking for?
- rick