3dTstat

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.

Further processing just means other computatios that
you might be asking it to do (like max, mean, whatever).
That block of code replaces the time series with that of
the first difference.

What is it you want to do?

  • rick