This HTML automatically generated with rman for NEMO
Table of Contents

Name

tabint - integrate a sorted table, optionally higher order moments

Synopsis

tabint [parameter=value]

Description

tabint integrates a function Y=F(X) that is defined by a set of (X,Y) points obtained via an ASCII table. The function can either be resampled using a spline interpolation, or directly summed.

See also tabhist(1NEMO) with cumul=t for a visual display.

An optional scale factor can be applied, which folds in any X or Y scaling that might want to be applied.

Optionally the 1st or 2nd moment can be computed, though the step=, normalize= and cumulative= are then ignored.

Parameters

The following parameters are recognized in order; they may be given in any order if the keyword is also given. Use --help to confirm this man page is up to date.
in=
Input table file. No default.
xcol=
Column with X coordinate. If the X coordinates are not increasing, the array will be reversed. Default: 1
ycol=
Column with Y coordinate of function [Default: 2]
xmin=
value if data below xmin to be discarded. By default it uses the first datapoint.
xmax=
value if data above xmax to be discarded. By default it uses the last datapoint.
step=
Integration step if resampling used. By default the datapoints themselves are used, but by setting an integration step here, the function is resampled using a spline and numerically integrated that way.
normalize=t|f
Normalize integral. If set, the integral is normalized by the integration interval. Default: f
cumulative=t|f
If set, it will show the invidual cumulative integrations instead. Only implemented for native steps. Default: f
scale=
scale factor to apply to the integral. [Default: 1]
mom=0|1|2
The moment along the profile. mom=0 is the flux, mom=1 the first moment along the X axis, and mom=2 the dispersion. [Default: 0]

Examples


 % nemoinp 0:1:0.1 | tabmath - - ’%1*%1’ | tabint -
 0.335
 % nemoinp 0:1:0.1 | tabmath - - ’%1*%1’ | tabint - step=0.01
 0.33335
Here is an example to compute the line integral of a spectrum where the frequency axis is in GHz, and intensity in Kelvin. We want to get an answer in K.km/s instead. We also know the line is around 110.5 GHz:
 % tabint rsr.33551.driver.sum.txt xmin=110.5-2*0.15 xmax=110.5+2*0.15  scale=c/110.5/1000
 8.05
recalling that c is in m/s and the requested line integral was requested in km/s.

See Also

tabfilter(1NEMO) , tabmath(1NEMO) , tabnllsqfit(1NEMO) ΒΈ tabpeak(1NEMO) , table(5NEMO)

Files

src/kernel/tab

Author

Peter Teuben

Update History


13-May-05    V0.1 Created    PJT
10-sep-2022    V0.5 added cumulative=    PJT
22-feb-2022    V0.6 added xmin=, xmax=, scale=    PJT
31-jul-2023    V0.7 poor man’s implementation of mom=    PJT


Table of Contents