Before you can make your initially combined (perhaps your final image) image from your individual exposures, you need to prepare your tangent-plane projected images by remov ing any residual large-scale (field wide) gradients in the sky background and by determining the proper relative scaling of the images. These two steps are done using the tasks mscskysub and mscimatch.
Here are the parameters to use with mscskysub.
PACKAGE = mscred TASK = mscskysub input = @toskysubR.in Input images to be fit output = @toskysubR.in Output images xorder = 2 Order of function in x yorder = 2 Order of function in y (type_ou= residual) Type of output (fit,residual,response,clean) (functio= leg) Function to be fit (legendre,chebyshev,spline3) (cross_t= yes) Include cross-terms for polynomials? (xmedian= 100) X length of median box (ymedian= 100) Y length of median box (median_= 50.) Minimum fraction of pixels in median box (lower = 0.) Lower limit for residuals (upper = 0.) Upper limit for residuals (ngrow = 0) Radius of region growing circle (niter = 0) Maximum number of rejection cycles (regions= mask) Good regions (all,rows,columns,border,sections,circle,invcircle,mask) (rows = *) Rows to be fit (columns= *) Columns to be fit (border = 50) Width of border to be fit (section= ) File name for sections list (circle = ) Circle specifications (mask = BPM) Mask (div_min= INDEF) Division minimum for response output (mode = ql)
The proper relative scaling for the images can be determined in several ways. We use the task mscimage. This task uses an input list of regions, specified by RA and DEC, that it should use in comparing all of the images that will be combined to the first image in the input list. Scalings relative to this first image are determined for each of the input images and this information is placed in the image headers to be used later by mscstack. We choose to use regions of the sky with stars in them, rather than the blank sky, as the reference positions. However, we want to avoid saturated stars. One can use a catalogue you generate with FOCAS, SExtractor, or other software packages. We currently just use mscgetcat on a single image from those that will be combined in order to generate the input listing of positions to use in the comparison. We set the magnitude range for in mscgetcat so that saturated stars will not be included, and you should taylor these parameters to match your data. Similarly, you do not want to have the faint limit include regions that are dominated only by sky noise. Here is an example parameter file for using mscgetcat to obtain a list of positions for mscimatch in determining the proper scaling for 20 KPNO 4meter I-band images each with exposure times of 10 minutes.
PACKAGE = mscred TASK = mscgetcatalog input = mos050S.fits List of Mosaic files output = mos050S.usnoA2 Output file of sources (magmin = 17.) Minimum magnitude (magmax = 22.) Maximum magnitude (catalog= NOAO:USNO-A2) Catalog (rmin = 21.) Minimum radius (arcmin) (mode = ql)
We can now use mscimatch to determine the relative scalings of the images. I recommend that this task be run interactively in order to get a feel for whether inappropriate regions have been included in the input position list. I will expand this section of the cook-book in future editions in order to include some example plots.
PACKAGE = mscred TASK = mscimatch input = @infile.list List of images coords = mos050S.usnoA2 File of coordinates (bpm = BPM) List of bad pixel masks (measure= ) Measurment file (scale = yes) Determine scale? (zero = no) Determine zero offset? (box1 = 21) Inner box size for statistics (box2 = 51) Outer box size for statistics (lower = -100.) Lower limit for good data (upper = INDEF) Upper limit for good data (niterat= 3) Number of sigma clipping iterations (sigma = 3.) Sigma clipping factor (interac= no) Interactive? (verbose= yes) Verbose? accept = yes Accept scaling and update images? (mode = ql)
If the data were taken under photometric conditions the relative scales should all be very very close to 1. If there is a severe outlier, investigate that image. It may have a WCS that is not accurate enough and you might have to rerun msccmatch on the pretangent-plane projected image.