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  

|
October 04, 2016 08:30AM
Hi, I have a question about the option -tdiff in 3dTstat. According the instruction message,

-tdiff: Means to take the first difference of each time
series before further processing.

It is not clear what kind of further processing? I checked the relevant source code, it looks like this:

/* RWC: first difference here [25 May 2011] */

if( do_tdiff ){
float tsm , tss ;
ts_dif = (float*)calloc(npts, sizeof(float)) ;
for( ii=1 ; ii < npts ; ii++ )
ts_dif[ii-1] = ts[ii] - ts[ii-1] ;
get_linear_trend( npts-1 , ts_dif , &tsm , &tss ) ;
ts_mean = (double)tsm ;
ts_slope = (double)tss ;
npts-- ;
ts = ts_dif ;
}

It looks like the outputs are ts_mean and ts_slope. But I only get one output (the mean?). If I have time series of sin(t), would I get mean=0 and slope=0? Such results would not provide any information of the changes of the time series. Could any one please tell me a mathematical expression of the -tdiff output?

Thank you.
Subject Author Posted

3dTstat

kstqli@gmail.com October 04, 2016 08:30AM

Re: 3dTstat

rick reynolds October 04, 2016 01:37PM