AFNI Message Board

History of AFNI updates  

November 21, 2002 02:02PM
In a post on the old message board, on the subject of obtaining "baseline" signal values, Mike B. wrote:

"The simplest baseline and hence a good one to use is simply the mean value at each voxel across all time points. This is easily calculated:
3dTstat -prefix baseline EPIallruns+orig
..... The main thing to keep in mind is that you need to calculate a baseline for each voxel separately--i.e. convert to percent change BEFORE you average across voxels or across subjects. "

I am interested in getting this conversion to % change from baseline FIRST, then averaging each voxel's quotient across voxels in a VOI prior to the dump-out. Our rapid, event-related design features contiguous 6 s trials, with three 2 s TRs per trial. Thus, there really is no "event-free" component for our design to use as a baseline, so we are probably left with using the overall session signal mean.

We wish to get a fairly lengthy 9 TR (18 s) dump, so we created three map files per scan session so that the event-related analysis of each trial can incorporate signal obtained during the subsequent two trials.

Assuming I have:

1) consolidated all the time-series functional data into one averaged volume (not a 3d+time dataset) with 3dTstat as above (here dubbed "TimeSerAvg+orig"),

2) used the AFNI plug-in "Reorder" to average/consolidate the raw signal data by event type (n=10) into abbreviated 3d+time datasets (here dubbed "antfbkave0+orig, antfbkave3+orig, and antfbkave6+orig")

3) created an FIM mask to define each of three ROIs (dubbed "adolmask+tlrc"),

4) used a script to write to file tlrc-warped versions of the above,

would the following script portion work to obtain *voxelwise* quotients of (signal at voxel p at TR q/session mean signal for voxel p), called "antfbkdev," to be averaged across the ROI then averaged per trial event?

foreach subject ( cr cw jb jg js ks la mn mrm mw sw tc vw yt )
cd ../${subject}*

3dcalc -a antfbkave0 -b TimeSerAvg -expr "a/b" -prefix antfbkdev0
3dcalc -a antfbkave3 -b TimeSerAvg -expr "a/b" -prefix antfbkdev3
3dcalc -a antfbkave6 -b TimeSerAvg -expr "a/b" -prefix antfbkdev6

# dump out averaged deviation (quotient) values, using mask
mv ../scripts/sfnmask+tlrc* .
3dmaskave -mask adolmask+tlrc \
-quiet -mrange 1 1 -drange -60 60 antfbkdev0+tlrc > ${subject}rnaccant.txt
3dmaskave -mask adolmask+tlrc \
-quiet -mrange 1 1 -drange -60 60 antfbkdev3+tlrc >> ${subject}rnaccant.txt
3dmaskave -mask adolmask+tlrc \
-quiet -mrange 1 1 -drange -60 60 antfbkdev6+tlrc >> ${subject}rnaccant.txt
3dmaskave -mask adolmask+tlrc \
-quiet -mrange 2 2 -drange -60 60 antfbkdev0+tlrc > ${subject}lnaccant.txt
3dmaskave -mask adolmask+tlrc \
-quiet -mrange 2 2 -drange -60 60 antfbkdev3+tlrc >> ${subject}lnaccant.txt
3dmaskave -mask adolmask+tlrc \
-quiet -mrange 2 2 -drange -60 60 antfbkdev6+tlrc >> ${subject}lnaccant.txt
3dmaskave -mask adolmask+tlrc \
-quiet -mrange 3 3 -drange -60 60 antfbkdev0+tlrc > ${subject}mofcfbk.txt
3dmaskave -mask adolmask+tlrc \
-quiet -mrange 3 3 -drange -60 60 antfbkdev3+tlrc >> ${subject}mofcfbk.txt
3dmaskave -mask adolmask+tlrc \
-quiet -mrange 3 3 -drange -60 60 antfbkdev6+tlrc >> ${subject}mofcfbk.txt

# clean up
mv adolmask+tlrc* ../scripts
rm -rf antfbkdev?+tlrc*
cd ../scripts

In other words, would 3dcalc as I propose to use it work? Given that the "antfbkave(0-6)" datasets are 3d+time, but "TimeSerAvg" has no time component. WOuld I need to add some command to artificially make TimeSerAvg a +time dataset by duplicating it for the requisite number of TRs?

Mike implies that there must be a fairly straightforward way to calculate a /baseline quotient value for each voxel at each TR prior to applying mask and dumping. Please advise.
Subject Author Posted

Getting timecourse dumps of voxel-wise deviations from session mean

Jim Bjork November 21, 2002 02:02PM

Re: Getting timecourse dumps of voxel-wise deviations from session mean

bob cox November 25, 2002 11:42AM

Sorry, only registered users may post in this forum.

Click here to login