- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑
Description:
This routine writes information describing a two-dimensional polynomial surface to a
standard Starlink POLYNOMIAL structure, as defined in SGP/38. An empty POLYNOMIAL structure
should already have been created. All floating point components within the structure are written as
DOUBLE PRECISION.
It is assumed the calling programme has a one-dimensional array of coefficients, where COEFF( ( IX -
1 ) NYPAR
IY )
contains the coefficient for the (IX,IY)th term (with NYPAR being the total number of Y terms). Such a
one-dimensional array is used by the NAG routines and defined in the NAG manual (see Chapter E02
on "
Curve and Surface fitting"
).
This routine will convert the coefficient array to two-dimensional, flip it around and store it in the
POLYNOMIAL structure so that DATA_ARRAY(IX,IY) contains the coefficient for the (IX,IY)th term
(see SGP/38).
The routine will also load the TMIN and TMAX arrays with XMIN, XMAX, YMIN and
YMAX. Note that these are compulsory when VARNT=’
CHEBYSHEV’
but optional
when VARNT=’
SIMPLE’
. In the latter case the logical parameter LIMITS will be
used to decide whether to write the limits. All the components have type _DOUBLE.
Invocation
CALL KPG1_PL2PU( LOC, VARNT, NXPAR, NYPAR, LIMITS, XMIN, XMAX,
YMIN, YMAX, COEFF, VARIAN, WORK, STATUS )
Arguments
LOC = CHARACTER
(
DAT__SZLOC ) (Given)
Locator to existing but empty POLYNOMIAL structure.
VARNT = CHARACTER
(
) (Given)
Variant of the polynomial (’
CHEBYSHEV’
or ’
SIMPLE’
). (This is written but not checked).
NXPAR = INTEGER (Given)
Number of x parameters (= order of polynomial in x direction
1)
NYPAR = INTEGER (Given)
Number of y parameters (= order of polynomial in y direction
1)
LIMITS = LOGICAL (Given)
When VARNT=’
SIMPLE’
this logical flag may be used to control
whether the TMIN and TMAX limits are written to the polynomial structure (based on the next 4
arguments). Setting LIMITS=.TRUE. will cause the limits to be written. This parameter is ignored
when VARNT=’
CHEBYSHEV’
, as the limits then are compulsory.
XMIN = DOUBLE PRECISION
(Given)
Minimum value along x axis for which polynomial is valid.
XMAX = DOUBLE PRECISION
(Given)
Maximum value along x axis for which polynomial is valid.
YMIN = DOUBLE PRECISION
(Given)
Minimum value along y axis for which polynomial is valid.
YMAX = DOUBLE PRECISION
(Given)
Maximum value along y axis for which polynomial is valid.
COEFF( NXPAR
NYPAR ) =
DOUBLE PRECISION (Given)
Array of polynomial coefficients, in the format used by NAG routines.
VARIAN( NXPAR
NYPAR ) = DOUBLE PRECISION (Given)
Array of variances of polynomial coefficients, in the
format used by NAG routines.
WORK( NXPAR, NYPAR ) = DOUBLE PRECISION (Returned)
Work array used to flip the polynomial coefficients. On exit it will contain the two-dimensional array
of coefficients written to the POLYNOMIAL structure.
STATUS = INTEGER (Given and Returned)
Global status value.
Notes:
- ←Prev
- KAPLIBS – Internal subroutines used within the KAPPA package.
- Next→
- TOC ↑