History of AFNI updates  

|
Daniel Glen
May 23, 2006 06:20PM
How about using 3dcalc in the way you say to create a copy of the original for all included voxels? Then create a summed image with 3dTstat -sum. Then use 3dcalc to divide by the total 1's in your censor file.

3dcalc -a data+orig -b 'templist.1D' -expr 'a*b' -prefix 'censordata'
3dTstat -sum -prefix testsum censordata+orig
set nvals = `awk 'BEGIN {sum=0}; {sum=sum+$1}; END {print sum};' templist.1D`
3dcalc -a testsum+orig -expr "a/$nvals" -prefix censored_avg
rm testsum+orig.*
rm censordata+orig.*

There's no doubt more than one way to do this, but there you go.
Subject Author Posted

censor files and baselines

Drew May 23, 2006 03:20PM

Re: censor files and baselines

Gang Chen May 23, 2006 04:23PM

Re: censor files and baselines

Daniel Glen May 23, 2006 04:30PM

Re: censor files and baselines

Drew May 23, 2006 04:51PM

Re: censor files and baselines

Daniel Glen May 23, 2006 06:20PM

Re: censor files and baselines

Drew May 24, 2006 10:57AM

Re: censor files and baselines

Daniel Glen May 24, 2006 11:49AM