Table of Contents

Note that for a gaussian signal, differencing subsequent elements will create a distribution with a noise sqrt(2) larger than the input signal.

The parameter
**delta=** is the distance in rows to compute the trend, which enables one
to compute the phase structure function of the signal (see EXAMPLES below).

**in=**- Input file name. No default.
**xcol=**- Column(s) to use [1]
**cumul=t|f**- Cumulative, instead of differences. Default: false
**delta=N**- How far should the neighbor in the trend analysis be? [1]
**orig=t|f**- Also show the original column (if selected it will be shown
*after*the trend column [f] **first=t|f**- Add the first row? [Default: f]

n=10000 seq $n | tabmath - - ’rang(0,1)’ all seed=-1 | tabhist - # sigma=1 seq $n | tabmath - - ’rang(0,1)’ all seed=-1 | tabsmooth - | tabhist - # sigma=0.612 (sqrt(3/8)?) seq $n | tabmath - - ’rang(0,1)’ all seed=-1 | tabtrend - | tabhist - # sigma=1.414 (sqrt(2)) seq $n | tabmath - - ’rang(0,1)’ all seed=-1 | tabsmooth - | tabtrend - | tabhist - # sigma=0.5 seq $n | tabmath - - ’rang(0,1)’ all seed=-1 | tabtrend - | tabsmooth - | tabhist - # sigma=0.5Note that smoothing and trending are related, so their resulting dispersions in the last two examples do not multiply.

This also means if you don’t know if a signal had been applied a Hanning smoothing, compute the sigma before and after a difference operator. If that ratio is sqrt(2) , it means it was not, it was a pure un-correllated gaussian. However, if the ratio is sqrt(2/3) = 0.816, it was a Hanning smoothed signal to begin with.

By using different
values of the **delta=** parameter, one can study the correlation length of
the noise, .e.g to look at correlations on a scale of up to 64:

rm -f rms.tab seq 10000 | tabmath - - ’rang(0,1),%2+10*sind(%1*2)’ > tab1 for i in $(seq 64); do rms=(tabtrend tab1 delta=$i |tabstat - qac=t | txtpar - p0=QAC,1,4) echo $i $rms >> rms.tab done tabplot rms.tab

26-Nov-2012finally documentedPJT 13-oct-2014better examplesPJT 15-jun-2016added cumul=PJT 26-may-2020added orig=PJT 1-may-2022remove nmax= for table V2PJT 6-jun-2022add delta=PJT