% @(#)fit_back.hlq 17.1.1.1 (ESO-IPG) 01/25/02 17:18:47 \se SECTION./BACKGROUND \es\co FIT/BACKGROUND 08-MAY-1990 RHW \oc\su FIT/BACKGROUND outframe = inframe(s) [deg,it] [clp1,clpn] [skew] [outbck] FIT/BACKGROUND outframe = inframe(s) [coef] [outbck] FIT/BACKGROUND inframe(s) [deg,it] [clp1,clpn] [skew] [outbck] FIT/BACKGROUND inframe(s) [coef] [outbck] compute 2-dim. polynomial fit of the background \us\pu Purpose: Compute coefficient of a 2-dim polynomial fit of the sky background. Optional create frames with the background and/or the background subtracted input frame. \up\sy Syntax: FIT/BACKGROUND outframe = inframe(s) [deg,it] [clp1,clpn] [skew] [outbck]\\ FIT/BACKGROUND outframe = inframe(s) [coef] [outbck]\\ FIT/BACKGROUND inframe(s) [deg,it] [clp1,clpn] [skew] [outbck]\\ FIT/BACKGROUND inframe(s) [coef] [outbck] \ys\pa outfram = output frame, i.e. the background subtracted input frame; no default allowed. \ap\pa inframe(s) = input frame and, if desired, the input mask and to be specified as {\tt inframe,inmask}. No default for the input frame and no masking wanted. \ap\pa outbck = name of the output background frame. By default no background frame is generated. \ap\pa deg,it = degree of the polynomial to fit and the maximum number of iterations. Default values are 3,10. \ap\pa clp1,clpn = clipping parameter for thr first and clipping parameter for the following iterations. Default is 1.0,2.5. \ap\pa up_skew = upper limit for the acceptable skewness. Default is 0.05. \ap\no Note: The coefficients are calculated by an iterative least-squares fitting of the pixels in a rebinned input frame. If a predefined `masking frame' is given, only not masked pixels are taken into account. \on\exs Examples: \ex FIT/BACKGROUND ccdbck = ccd Compute the background in the frame ccd and store the background corrected frame in ccdback. Use all default values. \xe\ex FIT/BACKGROUND ccd,ccdmsk 2,20 2,4 ? ccdbck Compute the background in the frame ccd and store the background corrected frame in ccdback. Use the frame ccdmsk to get the pixels which should not be taken into account for the background determination. The fit should be of the order of 2 with 20 iterations at maximum. Clip values should be 2 for the first and 4 for the following iterations. Use the default skewness value. \xe\sxe