SKYFIT
Name
skyfit
Purpose (one Line Only)
Determine a 2-d polynomial fit to sky background in an image.
Description
Category
CCD data processing
Calling Sequence
skyfit,image,skyimage
Inputs
image - Array which is the image to be analyzed
Optional Input Parameters
Keyword Input Parameters
DISPLAY - Flag, if set will generate lots of plotting output.
MASK - Optional mask image, if set, the pixel in the input image should
not be used.
XORDER - order of fit to X direction (default=0, constant)
YORDER - order of fit to Y direction (default=0, constant)
LOWCLIP - fraction of random sample to clip at the low end of the signal.
If lowclip=.1 and npts=100, then the 10 lowest values in the
random sample are excluded BEFORE the robust mean is computed
for the stretch range. This option will probably be just a bit
slower if invoked. This option will likely be more robust
against extreme values in the image. Default=0.0 (no clipping)
HICLIP - fraction of random sample to clip at the high end of the signal.
If hiclip=.9 and npts=100, then the 10 highest values in the
random sample are excluded BEFORE the robust mean is computed
for the stretch range. This option will probably be just a bit
slower if invoked. This option will likely be more robust
against extreme values in the image. Default=1.0 (no clipping)
NPTS - Number of pixels to use in fit (default=601)
SILENT - Flag, if set will suppress information output to screen.
Outputs
skyimage - Smooth image of sky in image.
Keyword Output Parameters
COEFF - Coefficients of fit
ERROR - Flag, set if there was a failure in the fitting process
SKYSIG - Estimate of the sky noise, same units as input image
Common Blocks
Side Effects
Restrictions
Procedure
Modification History
Written by Marc W. Buie, Lowell Observatory, 2004/07/02
2005/06/22, MWB, Added error traps
2016/04/01, MWB, added (better) plot titles
2016/04/12, MWB, added MASK keyword