The FITCOORDS fits are stored in text files in the subdirectory given by
the "database" parameter. The name of the file is fc<fitname> where
<fitname> is the specified fit name. The database text file contains
blocks of lines beginning with a time stamp followed by line with the
"begin" keyword. The value following "begin" is the fit name, which is
often the name of the image used for the fit. If there is more than one
block with the same fit name then the last one is used.
The "task" keyword will has the value "fitcoords" and the "axis" keyword
identifies the axis to which the surface fit applies. An axis of 1 refers
to the first or x axis (the first dimension of the image) and 2 refers to
the second or y axis.
The "surface" keyword specifies the number of coefficients for the surface
fit given in the following lines . The surface fit is produced by an IRAF
math package called "gsurfit". The coefficients recorded in the database
are intented to be internal to that package. However the following
describes how to interpret the coefficients.
The first 8 lines specify:
function - Function type (1=chebyshev, 2=legendre)
xorder - X "order" (highest power of x)
yorder - Y "order" (highest power of y)
xterms - Cross-term type (always 1 for FITCOORDS)
xmin - Minimum x over which the fit is defined
xmax - Maximum x over which the fit is defined
ymin - Minimum y over which the fit is defined
ymax - Maximum y over which the fit is defined
The polynomial coefficients follow in array order with the x index
varying fastest:
Notice that the x and y values are first normalized to the interval -1 to 1
over the range of the surface as given by the xmin, xmax, ymin, and ymax
elements of the database description.