II-2-B. Generating a Good Ghost for Subsequent Use (For KPNO data only)

We now must do something a little tricky in order to generate a good ghost image. We could run mscpupil (with type=data) on either the original sky flat or dome flat to get a good approximation of the image pupil. However, neither set of data has been flattened, and since we'll be subtracting the ghost image from flattened data this is really not the best thing to do. Instead what we need to do is to flatten the original combined sky flat (prior to ghost removal) using the dome flat that we have run through mscpupil to remove the ghost; i.e.,
mscarith SkyU / DomeUp SkyUflat
Next we run this flattened sky flat through mscpupil with type=data in order to generate a really good ghost for subsequent use:


PACKAGE= mscred
   TASK = mscpupil

input   =             SkyUflat  List of input images
output  =                 pupU  List of output images
(masks  =                  BPM) List of masks
(type   =                 data) Output type
(lmedian=                   no) Subtract line-by-line median?
(xc     =                  27.) Pattern center offset (pixels)
(yc     =                   9.) Pattern center offset (pixels)
(rin    =                 300.) Radius of inner background ring (pixels)
(drin   =                  20.) Width of inner background ring (pixels)
(rout   =                1500.) Radius of outer background ring (pixels)
(drout  =                  20.) Width of outer background ring (pixels)
(funcin =            chebyshev) Inner azimuthal background fitting function
(orderin=                    2) Inner azimuthal background fitting order
(funcout=              spline3) Outer azimuthal background fitting function
(orderou=                    2) Outer azimuthal background fitting order
(rfuncti=              spline3) Radial profile fitting function
(rorder =                   40) Radial profile fitting order
(abin   =                   0.) Azimuthal bin (deg)
(astep  =                   0.) Azimuthal step (deg)
(niterat=                    3) Number of rejection iterations
(lreject=                   3.) Low rejection rms factor
(hreject=                   3.) High rejection rms factor
(datamin=                INDEF) Minimum good data value
(datamax=                INDEF) Maximum good data value
(verbose=                  yes) Print information?
(fd     =                     )
(mode   =                   ql)