Ngl.ftcurvpi
Calculates an integral of an interpolatory spline between two specified points.
Prototype
iarray = Ngl.ftcurvpi(xl, xr, p, xi, yi)
Arguments
xlA scalar value containing the lower limit of the integration.
xrA scalar value containing the upper limit of the integration.
pA scalar value specifying the period of the input function; the value must not be less than xi(npts-1) - xi(0).
xiAn array containing the abscissae for the input function, with rightmost dimension npts. If xi is multi-dimensional, it must have the same dimension sizes as yi.
yiAn array of any dimensionality, whose rightmost dimension is npts, containing the functional values of the input function. That is, yi(...,k) is the functional value at xi(...,k) for k=0,npts-1.
Return value
iarrayThe integral of the interpolated function from xl to xr - a scalar if yi is a one-dimensional array, otherwise an array with the same dimensions as all but the last dimension of yi.
Description
This function calculates an integral between two specified points.
The first two arguments specify an interval of interpolation. No order for the two points is required; the integral will be calculated from the first point in the interval to the second. The second argument specifies the period of the function and the final two arguments are multi-dimensional arrays (Python lists, tuples, or NumPy arrays) specifying function values.
See Also
Examples
See ngl07p.py.