- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑
Description:
This routine determines the indices within an axis array for a series of axis values. It
assumes that the array is monotonically increasing or decreasing, and is approximately linear. This
routine may be used for arbitrary 1-d arrays in addition to axes, provided these criteria are
met.
A Newton’
s approximation method is used comparing the actual value with a linear approximation.
The upper and lower bounds used to define the increment are adjusted given the deviation from the
linear axis. Once the value lies between adjacent array elements the nearer (by linear interpolation)
becomes the required index.
Invocation
CALL KPG1_AINBx( LBND, UBND, AXIS, EL, VALUE,
INDEX, STATUS )
Arguments
LBND = INTEGER (Given)
The lower bound of the axis array.
UBND = INTEGER (Given)
The upper bound of the axis array.
AXIS( LBND:UBND ) = ?
(Given)
The axis array.
EL = INTEGER (Given)
The number of values whose indices in
the axis are to be found.
VALUE( EL ) = ? (Given)
The axis-array values.
INDEX(
EL ) = ? (Returned)
The pixel indices of the values in the axis array. Notice that this is
floating as fractional positions may be required. An index is set to the bad value when
its input co-ordinate lies outside the range of co-ordinates in the axis or when the input
co-ordinate is bad.
STATUS = INTEGER (Given and Returned)
The global status.
Notes:
-
There is a routine for the data types real or double precision: replace "
x"
in the routine name by R or
D respectively, as appropriate. The axis array and values, and the returned indices should have this
data type as well.
-
No error report is made and bad status is not set should any input co-ordinate lie outside the range of
co-ordinates of the axis. Processing will continue through the list.
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑