diff options
author | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
---|---|---|
committer | Joe Hunkeler <jhunkeler@gmail.com> | 2015-08-11 16:51:37 -0400 |
commit | 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch) | |
tree | 4464880c571602d54f6ae114729bf62a89518057 /pkg/utilities/nttools/doc/tintegrate.hlp | |
download | iraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz |
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'pkg/utilities/nttools/doc/tintegrate.hlp')
-rw-r--r-- | pkg/utilities/nttools/doc/tintegrate.hlp | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/pkg/utilities/nttools/doc/tintegrate.hlp b/pkg/utilities/nttools/doc/tintegrate.hlp new file mode 100644 index 00000000..9ea9f081 --- /dev/null +++ b/pkg/utilities/nttools/doc/tintegrate.hlp @@ -0,0 +1,97 @@ +.help tintegrate Jan96 tables +.ih +NAME +tintegrate -- Calculate the integral of one table column with +respect to another. +.ih +USAGE +tintegrate table integrand independent +.ih +DESCRIPTION +The program evaluates the integral of the column name passed to +'integrand' with respect to +the column passed to 'independent' using the simple trapezoidal rule. +The column passed to 'independent' must have values +sorted in ascending order. +INDEF values in either column are ignored, and there must be at least +two good points common to both columns. +The result is written to STDOUT and also recorded as a task parameter +'integral'. + +If the 'independent' parameter is null or blank, +the values in the 'integrand' column will simply be added up. +Note that this is not exactly the same as the trapezoidal rule +for integrating over row number. (A row number column +can be created using 'tcalc'.) When integrating over a column +that contains the row numbers, +'tintegrate' adds together all rows except the first and last +with unit weight; +the first and last are included with a weight of one half. +.ih +PARAMETERS +.ls table [file name] +The input table. +.le +.ls integrand [string] +Column name whose contents will be the integrand. +.le +.ls independent [string] +Column name whose contents will be the independent variable; +the values in this column must be increasing with row number. +If 'independent' is null, +then 'tintegrate' will just sum the values in the 'integrand' column. +.le +.ls (integral) [real] +The result returned by the task. +This is an output parameter; it is not directly changed by the user. +.le +.ls (ptsused) [integer] +The number of points used in calculating the integral. +This is also an output parameter and is not specified by the user. +.le +.ih +EXAMPLES +1. Calculate the integral of flux over wavelength, +printing the result to STDOUT +(and also storing it in the 'integral' parameter). + +.nf +tt> tintegrate intab flux lambda + integral= 0.8752311663155779 using 401 points +.fi + +2. Sum the values of flux, rather than integrating over wavelength. + +.nf +tt> tintegrate intab flux "" + integral= 30.32557976245881 using 401 points + +as an alternative: + +tt> tstat intab flux +# civ flux +# nrows mean stddev median min max + 401 0.07562488719 0.171107 -0.0381 -0.72729 0.22527 +tt> =0.07562488719 * 401 +30.32557976319 + +.fi + +3. Integrate the flux over row number. +This is the same as summing the flux except for the first and last rows. + +.nf +tt> tcalc intab row rownum datatype="real" colfmt="%8.1f" +tt> tintegrate intab flux row + integral= 30.34466478228569 using 401 points +.fi +.ih +BUGS +.ih +REFERENCES +This task was written by David Giaretta. +.ih +SEE ALSO +tcalc +tstat +.endhelp |