- Form: SURFACE source [BOX=n] [PLANE] [SUB]
[LOAD]
-
- [DIV] [MASK] [NOZERO] [PIX=N] (redirection)
- source
- is the image to which the surface is being fit,
- BOX=n
- tells VISTA to do the fit only in box 'n',
- PLANE
- fits a plane, rather than a second order surface,
- SUB
- has the program subtract the best-fit surface
from the original image,
- DIV
- replaces the original image with itself divided by the
best-fit surface,
- MASK
- tells VISTA to ignore masked pixels, and
- NOZERO
- suppresses rejection of pixels with zero value.
- PIX=n
- uses every n'th pixel for speed
- LOAD
- load variables with the surface fit
SURFACE fits a second-order polynomial surface to the specified image, or
to the subset of that image designated by the BOX keyword. It fits to all
pixels in the image or box, except those that have the value zero, or those
masked with the MASK command. These two features allow you to mark out
sections of an image that you do not want included in the fit. Use the
command CLIP to set pixels to zero.
For speed, you can have the program find the best-fitting surface using
every n-th pixel. Use the PIX keyword for this. For example, if you say
PIX=3, the surface is fit to the pixels in columns 0, 3, 6, 9, ... in rows
0, 3, 6, 9...
A polynomial expression for the fit is printed on the output device. These
coefficients may be loaded into variables with the LOAD keyword.
The MASK keyword tells SURFACE to ignore masked pixels. Otherwise, all
pixels except those that have value zero are included in the FIT.
The NOZERO keyword will force SURFACE to fit all pixels, including
those that have value zero. (This word is short for ``NO ZERO
CHECKING'').
To fit a planar (instead of a second-order) surface, include the PLANE
keyword.
In its normal operation, the program replaces the image with the
best-fitting surface. To subtract the surface from the image, use the word
SUB. To divide the image by the surface, use the word DIV. The best-fit
surface is applied in the manner you specify to EVERY pixel, regardless
what the PIX word says.
Examples:
- SURFACE 1
- replaces image 1 by the best-fitting
polynomial. Pixels with value zero are not included in the fit.
- SURFACE 1 NOZERO
- does the same as example 1, but this
time ALL pixels are included in the fit.
- SURFACE 1 BOX=2
- does the fit only in BOX 2.
- SURFACE 1 MASK
- fits the best second-order surface, ignoring
masked pixels.
- SURFACE 1 SUB
- subtracts the best fitting surface from image 1.
- SURFACE 1 PIX=5
- does the fit using every 25th pixel.
- SURFACE 1 PIX=5 LOAD
- does the same as example 6, loading the
coefficients of the fit into variables.
The LOAD keywords load the variables COEFF0, COEFFR, COEFFC, COEFFR2,
COEFFC2, COEFFRC, MIDR, MIDC, where the surface that is fit satisfies the
equation:
SURFACE = COEFF0 + (ROW - MIDR) * COEFFR
+ (COL - MIDC) * COEFFC
+ (ROW - MIDR)^2 * COEFFR2
+ (COL - MIDC)^2 * COEFFC2
+ (ROW - MIDR) * (COL - MIDC) * COEFFRC
The LOAD keyword is useful for locating the peak of cross-correlations.
See the section CROSS for information.