This HTML automatically generated with rman for NEMO
Table of Contents
tabsmooth - smooth columns of a table (Hanning, Savitzky-Golay)
tabsmooth
[parameter=value]
Quick and dirty program to smooth the column(s)
of a table without paying attention to the X coordinate (meaning: a constant
step size is assumed).
The filter= option is used to select the filter,
for example a Hanning and a Savitzky-Golay filter (and some derivates) can
be selected. A pass-through is also allowed.
The following parameters
are recognized in any order if the keyword is also given:
- in=
- Input file
name [???]
- xcol=
- Column(s) to use. Although multiple columns can be
used, only those columns are output to stdout. [1]
- filter=
- Filter option.
The way the options are set will likely change, this is work in progress.
-1 passthrough, the column is not modified
0 hanning (1,2,1)/4
1 SK2 5pt smooth
2 SK2 1st derivative with h=1
3 SK2 2nd derivative with h=1
4 SK4 7pt smooth
5 SK4 1st derivative
The smoothing versions are normalized to conserve "flux". Default: 0
- smooth=
- Manually set the smoothing array. By default, the filter= is used to set
the smoothing array. Be sure to enter an odd number of array elements,
for example a normalized Hanning would be smooth=0.25,0.5,0.25. Default: not
provided.
- tcol=
- Optional column designating the independant variable. Currently
the actual value is ignored, but this column will be output before the
smoothed column(s). Default: not used.
Here we draw 100000 random
values from a normal distribution (mean 0, dispersion 1) and smooth them
with various filters:
tabgen - 100000 1 2 123| tabsmooth - 1 -1 | tabstat - | grep disp
1.0022
tabgen - 100000 1 2 123| tabsmooth - 1 0 | tabstat - | grep disp
0.6128
tabgen - 100000 1 2 123| tabsmooth - 1 1 | tabstat - | grep disp
0.6973
tabgen - 100000 1 2 123| tabsmooth - 1 4 | tabstat - | grep disp
0.7537
Near the edge the smoothing array is cut off, thus there is some
loss of flux. Otherwise in general the smoothing filter is normalized and
should conserve flux.
tabmath(1NEMO)
, tabtrend(1NEMO)
, tabrows(1NEMO)
,
tabcols(1NEMO)
, table(5NEMO)
Peter Teuben
20-dec-2010 V0.1 Created PJT
13-oct-2014 documented smooth=
28-sep-2023 V0.5 added filter= PJT
29-sep-2023 V0.6 converted to table V2 PJT
29-nov-2023 V0.7 added tcol= PJT
Table of Contents