AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
July 29, 2003 12:02PM

Hello Shantanu:

If you want ALL of the area above the baseline (not just the area above
the baseline until the first baseline crossing), you could try the following:

First, perform the deconvolution analysis, with both a bucket dataset output
and the fit time series output:

3dDeconvolve \
-input myData+orig -polort 1 -num_stimts 1 \
-stim_file 1 myStim.1D -stim_label 1 myStim -stim_maxlag 1 10 \
-progress 1000 -fout -bucket myData.bucket \
-fitts myData.fitts

Now, use 3dcalc to subtract the baseline, and set negative values to zero:
3dcalc \
-a myData.fitts+orig -b myData.bucket+orig'[0]' -c myData.bucket+orig'[1]' \
-expr "70*(a-b-c*l)*step(a-b-c*l)" -fscale -prefix myData.detrend

Note that the above expression first multiplies by 70, which is the number of
time points - maxlag. Also, note that "l" in the above expression is NOT a "1".

Next, use 3dTstat to calculate the mean (which, since you have already
multiplied by the number of time points, the "mean" is actually "area"):
3dTstat -prefix myData.area myData.detrend+orig'[10..79]'

The output dataset, myData.area+orig, should contain the area in the fitted
response above the baseline.

Doug Ward
Subject Author Posted

a hard area to calculate!

Shantanu July 28, 2003 09:56AM

Re: a hard area to calculate!

B. Douglas Ward July 29, 2003 12:02PM