POLY: Fit a Polynomial to a Spectrum


\begin{command}
\item[Form:POLY source ORD=n {[SUB]} {[DIV]} {[LOAD]} {[NOZERO]...
...th value= 0 in the fit}
\item[SILENT]{suppresses terminal output}
\end{command}

POLY fits a polynomial to the spectrum in image buffer 'source'. The order of the polynomial is specified by the keyword 'ORD=n', where n=1 is a line, n=2 is a quadratic, and so forth. Here a ``spectrum'' is any 1-D image vector (an ``image'' with 1 row and NC columns).

As in the SPLINE command the keywords SUB and DIV can be used to tell the program to subtract or divide (respectively) the original spectrum by the fit. (Without both of these keywords the spectrum will be replaced by the fit.) As in the SURFACE command the keyword LOAD will load VISTA variables with the computed polynomial coefficients, so that they are accessible by other commands. The names of the variables loaded are COEFF0, COEFF1, ..., COEFFn, where 'n' is again the order of the fit. The formula using these coefficients is

   y = COEFF0 + COEFF1 * x + COEFF2 * x * x + ...
where y is the intensity and x is the pixel number.

Examples:
\begin{example}
\item[POLY 14 ORD=3]{Fits a cubic polynomial to the spectrum in...
..., DCOEFF1, DCOEFF2,
and DCOEFF3 with the fit coefficient errors.}
\end{example}