Process the Calibration Frames

Bias Frame Generation

[Bias Generation]
[Dome Flat Generation]

The bias frame (or zero frame) simply has the DC offset so that no pixels return negative data in the CCD during a pointing. This is not signal and must be subtracted out. To handle this one generally takes 5-7 bias frames (zero second exposures read out) at the beginning of the night. This number may seem small, but with the read-out time for MOSAIC, it is as many as is practical.

First, the individual zero frames must be corrected and this is done with the IRAF task ccdproc. Below is an sample listing of the parameters for ccdproc.


        PACKAGE = mscred
        TASK = ccdproc

        images  =          @zero.list2  List of Mosaic CCD images to process
        (output =                     ) List of output processed images
        (bpmasks=                     ) List of output bad pixel masks
        (ccdtype=                 zero) CCD image type to process
        (noproc =                   no) List processing steps only?

        (xtalkco=                  yes) Apply crosstalk correction?
        (oversca=                  yes) Apply overscan strip correction?
        (trim   =                  yes) Trim the image?
        (fixpix =                  yes) Apply bad pixel mask correction?
(zerocor= no) Apply zero level correction? (darkcor= no) Apply dark count correction? (flatcor= no) Apply flat field correction? (sflatco= no) Apply sky flat field correction? (merge = no) Merge amplifiers from same CCD? (saturat= INDEF) Saturation (+val=e-, -val=ADU) (xtalkfi= mscdb$noao/CCDMosaThin1/xtalk.dat) Crosstalk file (biassec= !biassec) Overscan strip image section (trimsec= !trimsec) Trim data section (fixfile= BPM) List of bad pixel masks (zero = Zero) List of zero level calibration images (dark = Dark) List of dark count calibration images (flat = Flat*) List of flat field images (sflat = Sflat*) List of secondary flat field images (minrepl= 1.) Minimum flat field value (interac= no) Fit overscan interactively? (functio= legendre) Fitting function (order = 1) Number of polynomial terms or spline pieces (sample = *) Sample points to fit (naverag= 1) Number of sample points to combine (niterat= 1) Number of rejection iterations (low_rej= 3.) Low sigma rejection factor (high_re= 3.) High sigma rejection factor (grow = 0.) Rejection growing radius (fd = ) (fd2 = ) (mode = ql)

Secondly, once this process is complete, the images must be combined into a single bias frame to subtract from the other images. This is done with the IRAF task zerocombine. Below is an example parameter file for zerocombine.


        PACKAGE = mscred
        TASK = zerocombine

        input   =          @zero.list1  List of zero level images to combine
        (output =           Zero990327) Output zero level name
        (combine=              average) Type of combine operation
        (reject =             crreject) Type of rejection
        (ccdtype=                 zero) CCD image type to combine
        (process=                  yes) Process images before combining?
        (delete =                   no) Delete input images after combining?
        (scale  =                 none) 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=              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  =                   0.) Value if there are no pixels
        (mode   =                   ql)

This completes the generation of the bias frame. You should have a file with which to use in further passes of ccdproc on calibration frames and object frames.

Dome Flat Generation

[Top of Page]
[Bias Generation]

While the MOSAIC CCDs are highly sensitive and responsive, their quantum efficiencies are not uniform across the 8K by 8K unit. Therefore it is necessary to find out the percentage change in efficiency across the chips and divide that out. This can be done by illuminating the chips from a white source and then dividing the resulting responses out of the chip. This frame is called a dome flat. Typically 9-11 dome flats are taken in each band for a given observing run. Like the bias frames this number is low due to the long read-out time for the CCDs.

First the dome flat frames must be processed like the zeroframes. Only this time we set zerocoor to yes, and zero to the name of the Bias frame generated in step 1. Use ccdproc for this and below is an example list of parameters.


        PACKAGE = mscred
           TASK = ccdproc

        images  =        @dflatI.list1  List of Mosaic CCD images to process
        (output =                     ) List of output processed images
        (bpmasks=                     ) List of output bad pixel masks
        (ccdtype=                 flat) CCD image type to process
        (noproc =                   no) List processing steps only?

        (xtalkco=                  yes) Apply crosstalk correction?
        (oversca=                  yes) Apply overscan strip correction?
        (trim   =                  yes) Trim the image?
        (fixpix =                  yes) Apply bad pixel mask correction?
        (zerocor=                  yes) Apply zero level correction?
        (darkcor=                   no) Apply dark count correction?
        (flatcor=                   no) Apply flat field correction?
        (sflatco=                   no) Apply sky flat field correction?
        (merge  =                   no) Merge amplifiers from same CCD?

        (saturat=                INDEF) Saturation (+val=e-, -val=ADU)
        (xtalkfi= mscdb$noao/CCDMosaThin1/xtalk.dat) Crosstalk file
        (biassec=             !biassec) Overscan strip image section
        (trimsec=             !trimsec) Trim data section
        (fixfile=                  BPM) List of bad pixel masks
        (zero   =      Zero990327.fits) List of zero level calibration images
        (dark   =                 Dark) List of dark count calibration images
        (flat   =                Flat*) List of flat field images
        (sflat  =               Sflat*) List of secondary flat field images
        (minrepl=                   1.) Minimum flat field value

        (interac=                   no) Fit overscan interactively?
        (functio=             legendre) Fitting function
        (order  =                    1) Number of polynomial terms or spline pieces
        (sample =                    *) Sample points to fit
        (naverag=                    1) Number of sample points to combine
        (niterat=                    1) Number of rejection iterations
        (low_rej=                   3.) Low sigma rejection factor
        (high_re=                   3.) High sigma rejection factor
        (grow   =                   0.) Rejection growing radius
        (fd     =                     )
        (fd2    =                     )
        (mode   =                   ql)

Now the processed images must be combined into a single domeflat image. This is done with flatcombine. Below is a sample parameter file.


        PACKAGE = mscred
           TASK = flatcombine

        input   =        @dflatI.list1  List of flat field images to combine
        (output =         Dflat990327I) Output flat field root name
        (combine=              average) Type of combine operation
        (reject =              ccdclip) 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  =                   no) Use median in sigma clipping algorithms?
        (lsigma =                   3.) 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
        (mode   =                   ql)

(The following is for bands with pupil images only): The corrector is not as efficient in the I-band, and requires certain corrections to be made before the flat can be used to process object frames. Namely, there will be a reflection off the secondary that looks like a giant pupil. This can be removed with mscpupil. Below is a sample parameter file for mscpupil.


        PACKAGE = mscred
           TASK = mscpupil

        input   =   Dflat990327II.fits  List of input images
        output  = Dflat990327Iwop.fits  List of output images
        (masks  =                  BPM) List of masks
        (type   =                ratio) Output type
        (lmedian=                  yes) 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=                    5) Outer azimuthal background fitting order
        (rfuncti=              spline3) Radial profile fitting function
        (rorder =                    5) Radial profile fitting order
        (abin   =                  45.) Azimuthal bin (deg)
        (astep  =                  10.) 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)
Note for example in this case, Dflat990327Iwop.fits would be the image to use for ccdproc on object images.

Now you are ready to do the initial processing on the actual object frames.