II-2. Flats

We usually take both twilight sky flats and dome flats; our experience is that sky flats do a better job of flattening the data, but we need both types of data if we are to construct a good pupil ghost for the Kitt Peak data.

The first step is to simply combine the data by filter to generate a master dome flat and master sky flat; we use flatcombine and sflatcombine. Note that flatcombine will automatically process the dome flats through ccdproc to make the cross-talk correction, overscan correction, and so on, but for some reason sflatcombine is not that smart. So, first process your sky flats through basic ccdreductions as follows:
ccdproc sflat* xtalkcor+ fixpix+ overscan+ trim+ zerocor+
using the cross-talk and bias image you specified when you did setinstrument




PACKAGE = mscred
   TASK = flatcombine

input   =               dflat*  List of flat field images to combine
(output =                 Flat) Output flat field root name
(combine=              average) Type of combine operation
(reject =             crreject) Type of rejection
(ccdtype=                 flat) CCD image type to combine
(process=                  yes) Process images before combining?
(subsets=                  yes) Combine images by subset parameter?
(delete =                   no) Delete input images after combining?
(scale  =                 mode) Image scaling
(statsec=                     ) Image section for computing statistics
(nlow   =                    1) minmax: Number of low pixels to reject
(nhigh  =                    1) minmax: Number of high pixels to reject
(nkeep  =                    1) Minimum to keep (pos) or maximum to reject (neg)
(mclip  =                  yes) Use median in sigma clipping algorithms?
(lsigma =                   3.) Lower sigma clipping factor
(hsigma =                   3.) Upper sigma clipping factor
(rdnoise=                   20) ccdclip: CCD readout noise (electrons)
(gain   =                  2.8) ccdclip: CCD gain (electrons/DN)
(snoise =                   0.) ccdclip: Sensitivity noise (fraction)
(pclip  =                 -0.5) pclip: Percentile clipping parameter
(blank  =                   1.) Value if there are no pixels
(mode   =                   ql)

PACKAGE = mscred
   TASK = sflatcombine
    
input   =           @allskies2  List of images to combine
(output =                Sflat) Output sky flat field root name
(combine=              average) Type of combine operation
(reject =             crreject) Type of rejection
(ccdtype=                     ) CCD image type to combine
(subsets=                  yes) Combine images by subset parameter?
(scale  =                 mode) Image scaling
(statsec=                     ) Image section for computing statistics
(nkeep  =                    1) Minimum to keep (pos) or maximum to reject (neg)
(nlow   =                    1) minmax: Number of low pixels to reject
(nhigh  =                    1) minmax: Number of high pixels to reject
(mclip  =                  yes) Use median in sigma clipping algorithms?
(lsigma =                   6.) Lower sigma clipping factor
(hsigma =                   3.) Upper sigma clipping factor
(rdnoise=              rdnoise) ccdclip: CCD readout noise (electrons)
(gain   =                 gain) ccdclip: CCD gain (electrons/DN)
(snoise =                   0.) ccdclip: Sensitivity noise (fraction)
(pclip  =                 -0.5) pclip: Percentile clipping parameter
(blank  =                   1.) Value if there are no pixels
(grow   =                   3.) Radius (pixels) for neighbor rejection
(fd     =                     )
(mode   =                   ql)