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  

|
June 25, 2014 02:49AM
Hello AFNI gurus,

I have a few datasets that I am doing non-GLM analyses on, which means that I would like to detrend the data, like so:
3dDetrend -prefix ${INPUTFILE}.vr.dt.nii.gz -polort 2 \
     	-vector motparam.${INPUTFILE}.1D ${INPUTFILE}.vr.nii.gz
The detrending works great, but I run into problems with the next step, when I try to scale the data to AFNIPROC-style, to convert values to percent-signal change like so:
3dcopy ${INPUTFILE}${SUFFIX} temp_run+orig
3dTstat -prefix temp_mean+orig temp_run+orig
3dcalc -float -a temp_run+orig -b temp_mean+orig \
     	-expr 'min(200, a/b*100)*step(a)*step(b)' \
     	-prefix ${INPUTFILE}.sc.nii.gz
After the detrending I have negative values in my datasets, which I think is to be expected, but it also means that the scaling code produces a dataset that is nothing but zeros and 200's. What is the appropriate way of scaling a detrended dataset?

I am sure this is pretty simple, but I just want to make sure I am doing things the right way.

Thanks,

Peter
Subject Author Posted

Scaling of detrended data

PeterKohler June 25, 2014 02:49AM

Re: Scaling of detrended data

rick reynolds June 25, 2014 08:46AM

Re: Scaling of detrended data

PeterKohler June 25, 2014 01:30PM

Re: Scaling of detrended data

rick reynolds June 25, 2014 03:47PM

Re: Scaling of detrended data

PeterKohler June 26, 2014 02:49AM