Table of Contents

See also *tabhist(1NEMO)*
with **cumul=t** for a visual display, though the cumulative option here can
also produce a table for display to check the convergence of the integral.

An optional scale factor can be applied, which folds in any X or Y scaling
that might want to be applied. This is particularly useful if you integrate
the points themselves (i.e. without giving a **step=**) but still want to scale
the X coordinate.

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

**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=**- if given, value below which data to be discarded

By default it uses the smallest datapoint from the table. **xmax=**- if given,
value above which data to be discarded

By default it uses the largest datapoint from the table. **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. See also**scale=**. **normalize=t|f**- Normalize integral. If set, the integral
is normalized by the integration interval. An output table contains the
cumulative function.

[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. This is also
to use a different step size if integrating the individual points.

[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]

% 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 know the line is (redshifted) around 110.5 GHz, and we take a window of 0.3 GHz around the line:

% tabint rsr.33551.driver.sum.txt
xmin=110.5-0.3 xmax=110.5+0.3 scale=c/110.5/1000

8.05

% tabint rsr.33551.driver.sum.txt xmin=110.5-0.3 xmax=110.5+0.3 scale=c/110.5/1000
|\

tabplot - 1 2 line=1,1 point=2,0.1 ycoord=0

recalling that **c** is in m/s and the requested line integral was requested
in km/s.

% sort -n +2 my.tab | tabint - 3 6

perhaps easier

% tabcols my.tab 3,6 | sort -n | tabint -

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