[Creating Improved Bad-pixel Masks (mkbleed,xzap)] [Using Bad-pixel masks (fixpix)] [Tangent-Plane Projection (mscimage)] [mscskysub] [mscimatch] [mscstack]
If you obtain more than one exposure of a field in a given filter (say as part of a mosdither command with MOSAIC), you are likely to desire to optimally combine the multiple exposures into a single, deep, image free of some of the defects of the individual images (cosmic-ray hits, gaps between chips, etc.). This section of the notes is still less complete than the earlier sections, but here are some details of how we combine images for the NDWFS MOSAIC images. The initial steps are done to remove defective pixels from the individual image that would be propogated into other pixels by the sinc function interpolation we use (to preserve the noise properties of the images) when we tangent-plane project our images prior to combining them.
So, in brief, we go through the following steps:
1.) Create bad-pixel masks that identify cosmic rays, saturated pixels (this could now be done early in the reduction process, but we have not yet taken advantage of this capability of ccdproc), and other defects. This is done using the mkbleed4 script, the xzap task, and the combinemask script. If necessary use imreplace to add additional regions to the bad-pixel masks.
2.) Use ccdproc FIXPIX option to replace the bad pixels with interpolated value from adjacent pixels. Note that we never use these pixels in our final stacked image, but replacing their value with adjacent pixels helps avoid the ringing that would otherwise result during the tangent-plane projection.
3.) Generate the tangent-plane projection using mscimage.
4.) Make final preparations for combining of the indivdual tangent-plane projected images. This includes removing any large-scale gradients in the sky background (using mscskysub) and determining the proper relative scaling between the images (using mscimatch).
5.) Generate an initial stacked image with mscstack. In some cases this might be your final stacked image. To obtain an optimally combined image it is advantageous to improve the bad-pixel masks to remove satellite trails, remaining cosmic rays, asteroids, etc., from the individual images. We are currently still using software that is still in development to perform this last task, but in the next version of these notes I will try to describe the basic proceedure in more detail.
Saturated pixels in general, and the charge bleed trails from saturated stars in particular, contain no useful information and also are discontinuities in the measured flux that produce ringing noise or errors in the image when we generate our tangent-plane projected images using a sinc interpolator. Therefore we must add such pixels to our bad-pixels masks. The same is true for cosmic rays. We use the scripts mkbleed4 and xzap to do accomplish this goal. Each of these scripts produces new bad-pixels masks that indicate the locations of respectively charge bleed trails and cosmic rays. We use the script combinemasks to combine these new masks along with the default masks (indicated in the header, or generated earlier from dome-flat exposures) to produce one improved set of masks for each image and update the header of the images.
After the new bad-pixel mask has been generated, we
run fixpix to interpolate over the bad
regions. This step requires the IRAF task crutil to be have been
loaded. mkbleed4, xzap, and combinemasks are
scripts and must be defined by the user, either through a
loginuser.cl file that is processed when you start
IRAF or through the command:
msc> task mkbleed4='/any/path/to/the/scriptfile/mkbleed4.cl'
The source for these files are available here:
mkbleed4.cl, written by Chris Greer
mkbleed4 calls fileroot.cl by Marc Dickinson
xzap.cl, written by Marc Dickinson
combinemasks.cl, written by Chris Greer
combinemasks_old.cl, for use on Mosaic 1 data taken with the Engineering grade CCDs.
The scripts mkbleed4 and/or xzap require the scripts iterstat.cl, fileroot.cl, minv.cl, and makemask.cl.
For each of these the tasks above, other IRAF tasks, or your own scripts might work as well or better. For example, although those of us involved in the NDWFS have not tested it yet, the task crreject should perform the same task as xzap, and is expected to be a bit faster. Similarly, the current version of combinemasks was written by REU summer student Chris Greer to work on files with exactly our default nomenclature. In otherwords, these scripts are not general tasks yet, but we hope to produce more general versions in the months ahead.
Before mkbleed4 is run, you need to determine the saturation
levels for each CCD and the level of the charge bleed trails. If
saturated pixels were flagged initially (which is now possible with
ccdproc, then the saturation values included in the images
headers could be used, but since we are flagging these pixels after
flatfields have been applied, these values have been rescaled and if
you are doing things according to this cook-book you should use
implot to investigate the images and determine the saturation
values for each chip. These values will be different from chip to
chip. We have also found that for some of the CCDs, the ADU level
recorded for the charge that bleeds from the saturated stars, while at
discrete, quantized, values, are not at the saturation level. We still
want to flag these pixels as bad. To do this requires a second
threshold value to be set and to look for contiguous pixels along
columns that are above this value. In mkbleed4 there are two
threshold values per chip. Threshold 1 is the value above which
pixels are in bleed trails, while threshold 2 is the value above which
pixels are saturated. Note that the parameter shift
determines how many pixels along a column need to be above the first
threshold in order for that group of pixels to be flagged. You might
need to adjust this parameter to match the properties of your images.
Note that the current version of the task insists on an input file
containing the list of rootnames for the files. For example, the
first three lines of the input file might be:
obj111pf
obj112pf
obj113pf
Here is an example parameter file:
PACKAGE = user TASK = mkbleed4 inlist = @file.list MEF image(s) for cosmic ray cleaning thrc1t1 = 37500. Value above which pixels are in bleeds for chip 1. thrc2t1 = 20500. Value above which pixels are in bleeds for chip 2. thrc3t1 = 33000. Value above which pixels are in bleeds for chip 3. thrc4t1 = 19000. Value above which pixels are in bleeds for chip 4. thrc5t1 = 6000. Value above which pixels are in bleeds for chip 5. thrc6t1 = 23000. Value above which pixels are in bleeds for chip 6. thrc7t1 = 27000. Value above which pixels are in bleeds for chip 7. thrc8t1 = 21500. Value above which pixels are in bleeds for chip 8. (thrc1t2= 39000.) Value above which pixels are saturated for chip 1. (thrc2t2= 22500.) Value above which pixels are saturated for chip 2. (thrc3t2= 36000.) Value above which pixels are saturated for chip 3. (thrc4t2= 22000.) Value above which pixels are saturated for chip 4. (thrc5t2= 27000.) Value above which pixels are saturated for chip 5. (thrc6t2= 27000.) Value above which pixels are saturated for chip 6. (thrc7t2= 30000.) Value above which pixels are saturated for chip 7. (thrc8t2= 23500.) Value above which pixels are saturated for chip 8. (radius = 1.) Grow radius (uses crgrow). (shift = 10.) Shift to be applied. (verbose= yes) Verbose. (inimgli= ) (mode = ql)
The next step is to split the object files with mscsplit in preparation for using xzap to identify the positions of pixels that have been hit by cosmic rays. Note that the filenames used in the input list for mscsplit and mscjoin should be the root names, and not include the ".fits" suffix. Example parameter file:
PACKAGE = mscred TASK = mscsplit input = @objectfiles.list List of input MEF files (output = @objectfiles.list) List of output root names (mefext = .fits) MEF filename extension (delete = yes) Delete MEF file after splitting? (verbose= yes) Verbose? (fd1 = ) (fd2 = ) (mode = ql)
The task xzap is a script that through several iterations on an individual frame identifies the location of cosmic rays. It needs to be run on each individual extension and can not yet deal with multi-extension fits files. The output here must be very specific if combinemasks is to work. The xzap output file names must have a 'z' appended to it. Here is an example. obj039pfs_1.fits ---xzap---> obj039pfsz_1.fits Here is a parameter listing.
PACKAGE = user TASK = xzap inlist = @inxzap.list Image(s) for cosmic ray cleaning outlist = @outxzap.list Output image(s) (zboxsz = 5) Box size for zapping (nsigma = 5.) Number of sky sigma for zapping threshold (nnegsig= 10.) Number of sky sigma for negative zapping (nrings = 1) Number of pixels to flag as buffer around CRs (nobjsig= 2.) Number of sky sigma for object identification (skyfilt= 15) Median filter size for local sky evaluation (skysubs= 1) Block averaging factor before median filtering (ngrowob= 0) Number of pixels to flag as buffer around objects (statsec= [550:1500,600:1500]) Image section to use for computing sky sigma (deletem= no) Delete CR mask after execution? (cleanpl= yes) Delete other working .pl masks after execution? (cleanim= yes) Delete working .imh images after execution? (verbose= yes) Verbose output? (checkli= yes) Check min and max pix values before filtering? (zmin = -32768.) Minimum data value for fmedian (zmax = 32767.) Minimum data value for fmedian (inimgli= ) (outimgl= ) (statlis= ) (mode = ql)
Where the input list would contain a list of images with names like
obj025pf_1.fits
obj025pf_2.fits
...
And the output list would contain a list of images with names like
obj025pfz_1.fits
obj025pfz_2.fits
...
After xzap has completed, you can rejoin the individual files into MEF format images. This is done with mscjoin using a parameter file like this:
PACKAGE = mscred TASK = mscjoin input = obj039pfsz List of input root names (output = obj039pfsz) List of output MEF names (delete = yes) Delete input images after joining? (verbose= yes) Verbose? (fd1 = ) (fd2 = ) (mode = ql)
You can now run combinemasks to join all the bad-pixel mask
files together and update the headers of the MEF files. The input is
very specific. Use the root names of the
same input extensions that went into xzap.
That is, without the 'z' appended. Here is an example:
obj039pfs
obj040pfs
Here is an example parameter listing. Note that there will be eight
bad-pixel mask files (.pl format) for each MEF file. They will have
names that start with crmask3_. This is a naming convention that we
use, and you are free to change it by modifying the script.
PACKAGE = user TASK = combinemasks inlist = @inxzap.list Images for wich to generate new BPMs (Assumes CCDMosaThin1) (imglist= ) (mode = ql)
The next step is to replace the flux values for the bad pixels in each of the individaul images with a value interpolated from surrounding pixels. This is easily done by using fixpix on each individual extension of the image. It is convienent to have all the obj???pfsz.fits files in a file and then run fixpix with the following parameters.
PACKAGE = proto TASK = fixpix images = @infixpix.list//[1] List of images to be fixed masks = BPM List of bad pixel masks (linterp= INDEF) Mask values for line interpolation (cinterp= INDEF) Mask values for column interpolation (verbose= yes) Verbose output? (pixels = no) List pixels? (mode = ql)This example will run fixpix on the first CCD of each image. Repeat for chips 2 through 8. Again, we anticipate making this step more streamlined, but we have not modernized it yet.
It is important at this point to inspect each MEF image for any bleed trails that may have been missed. If there are any, replace the area in the bad-pixel mask associated with the image using imreplace. Here is an example of parameter file necessary to replace a section of the bad-pixel mask for CCD6 of image obj056pfs.fits with a value indicating "bad" data.
PACKAGE = imutil TASK = imreplace images = crmask3_obj056pfs_6.pl[1800:1820,2748:3112] Images to be edited value = 1. Replacement pixel value (imagina= 0.) Imaginary component for complex (lower = INDEF) Lower limit of replacement window (upper = INDEF) Upper limit of replacement window (radius = 0.) Replacement radius (mode = ql)If you have to add regions to your masks, remember to rerun fixpix. After each image is checked and is free from bleed trails and saturated pixels it is time to generate your tangent-plane projected images.
We use the task mscimage to generate a tangent-plane projected image from each of our object frames. Each of the resulting images (which we name with a "mos" prefix), ultimately destined to be combined into a single, stacked, image; will have a the same uniform (linear arcsecond per pixel scale) scale and will have been projected relative to the same position. The reference position is taken from the header of either one of the images that will be combined (and should therefore be specified as the reference image for all of the the images processed with mscimage), or can be from a reference image constructed in some other manner. We construct a reference image with a specific scale, orientation, and tangent-plane reference position to be used for all images in a given survey sub-field using a development task wcsref in the xdwred package. I will detail this further in the next version of the notes, but in brief we have been choosing to produce our output images with a fixed scale of 0.258 arcseconds per pixel, North to the left, East down.
With version 4.1 of mscred, mscimage is now more sophisticated at handling the gaps and boundaries of the "obj" images and the impact that these can have when sinc17 is used for the interpolation. This is such a new (and welcome) upgrade that we have no experience yet in using the new version. We handled the problem of the edges of the individual chips by specifying a "blank" value to be used by the software when the input image had no value. The value for the "blank" parameter was chosen using iterstat on the central four CCDs of each image. So, first setup the basic parameters for mscimage. Note that you could use linear for the value of interpo, but we feel that this compromises the data quality for our applications. Using a sinc-function (specified by interpo=sinc17) preserves essentially all spatial frequencies and is the only mathematically correct interpolation method for well-sampled data. Bilinear interpolation, by contrast, smooths the data with a variable kernal, depending on where the iterpolated pixel falls with respect to the original image. The result is degraded data, and atrifact-like patterns of coherent noise. Note that while a sinc function is used for the data, a linear interpolation must be used for the projection of the bad-pixel masks.
Below is an example parameter file for mscimage. Note that "constant" would be set to an appropriate value, i.e. one that matches the sky value. The task would be run for an individual command something like:
mscimage ("obj156pfsz","mos156",reference="pointingscalerefimage.fits",
boundary="constant",constan=6255.)
PACKAGE = mscred
TASK = mscimage
input = List of input mosaic exposures
output = List of output images
(referen= ) Reference image
(pixmask= yes) Create pixel mask?
(verbose= yes) Verbose output?
# Resampling parmeters
(blank = 0.) Blank value
(interpolant= sinc17) Interpolant for data
(minterpolant= linear) Interpolant for mask
(boundary= constant) Boundary extension
(constant= 0.) Constant boundary extension value
(fluxcon= no) Preserve flux per unit area?
(ntrim = 7) Edge trim in each extension
(nxblock= 2048) X dimension of working block size in pixels
(nyblock= 1024) Y dimension of working block size in pixels
# Geometric mapping parameters
(interac= no) Fit mapping interactively?
(nx = 10) Number of x grid points
(ny = 20) Number of y grid points
(fitgeom= general) Fitting geometry
(xxorder= 4) Order of x fit in x
(xyorder= 4) Order of x fit in y
(xxterms= half) X fit cross terms type
(yxorder= 4) Order of y fit in x
(yyorder= 4) Order of y fit in y
(yxterms= half) Y fit cross terms type
(fd_in = )
(fd_out = )
(fd_ext = )
(fd_coor= )
(mode = ql)
After setting up the basic parameters, we run iterstat on a section of each image and find the mean somewhere close to the middle of the image. This will be used to set the blank value for each input object frame. We then run mscimage on each of our object frames, usually using an input asci file at the command line prompt of IRAF. msc> cl < inmscimage.cl Here are a few example lines from such a file as "inmscimage.cl". Remember that most of the parameters have already been set using epar mscimage, or we would have to specify them explicitly in this intput file. Note we have chosen to retain the index number from orginal file, but have changed the prefix from "obj" to "mos".
mscimage ("obj039pfsz","mos039",reference="bootescenter.fits",blank=10840.)
mscimage ("obj040pfsz","mos040",reference="bootescenter.fits",blank=10480.)
mscimage ("obj041pfsz","mos041",reference="bootescenter.fits",blank=9630.)
mscimage ("obj042pfsz","mos042",reference="bootescenter.fits",blank=9180.)
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 removing 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.
We use the task mscstack to combine the images for a field into one deep exposure. Note that at the present time we do not make any effort to match the DIQ of the input images, although some groups using MOSAIC have successfully done this. We do, however, take some pains to enable the deepest possible final image, free of defects like faint residual images from satellite trails in an individual image. This can be accomplished if all such defects are masked out of the individual input images. In order to include as many defects in the input masks as possible, we use software written by Frank Valdes, which is still in active development, to compare each of the individual images to an initial average image that is created using a harsh rejection criteria. The software used to make the comparison, part of the ACE package Frank Valdes is writing, also produces a new bad-pixel mask that can be used in our "final" stacking of the images.
To make the "first pass" combined image that will be used to identify defects in the individual exposures, we use mscstack with a low threshold for rejection.
PACKAGE = mscred TASK = mscstack input = @infile.list List of images to combine output = Stackharsh.fits Output image (plfile = Stackharsh.pl) List of output pixel list files (optional) (combine= average) Type of combine operation (median|average) (reject = ccdclip) Type of rejection (masktyp= goodvalue) Mask type (maskval= 0.) Mask value (blank = 50000.) Value if there are no pixels (scale = !mscscale) Image scaling (zero = !msczero) Image zero point offset (weight = none) Image weights (statsec= ) Image section for computing statistics (lthresh= 1.) Lower threshold (hthresh= INDEF) Upper threshold (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 = 5.) Lower sigma clipping factor (hsigma = 2.9) Upper sigma clipping factor (rdnoise= rdnoise) ccdclip: CCD readout noise (electrons) (gain = gain) ccdclip: CCD gain (electrons/DN) (snoise = 0.) ccdclip: Sensitivity noise (fraction) (sigscal= 0.1) Tolerance for sigma clipping scaling corrections (pclip = -0.5) pclip: Percentile clipping parameter (grow = 0.) Radius (pixels) for neighbor rejection (mode =
Before diffdetect, part of ACE is run to identify differences between one of the individual exposures and the average or stacked image, mask output by mscstack must be modified. The mask that was created by mscstack is just a record of the number of input exposures that did not contribute to each pixel in the output image. The value for each pixel in the mask is an integer from 0, if that given pixel was contributed to by every input frame, to n, where n is the number of images in the stack whose data were excluded from the being used in the determination of the average. The task diffdetect needs to know which pixels have little or no information (like the positions of saturated stars, which in general will have been saturated in all of the input images). These positions should not be flagged further. For this to work, it is necessary to modify the bpm using imexpr. Here is the command.
PACKAGE = imutil TASK = imexpr expr = (a != 20 ? 0 : a) expression output = junkmask.pl output image (dims = auto) output image dimensions (intype = auto) minimum type for input operands (outtype= auto) output image pixel datatype (refim = auto) reference image for wcs etc (bwidth = 0) boundary extension width (btype = nearest) boundary extension type (bpixval= 0.) boundary pixel value (rangech= yes) perform range checking (verbose= yes) print informative messages (exprdb = none) expression database (lastout= _blmask0_obj169s_8) last output image a = Stackharsh.pl operand a z = operand z (mode = ql)Note in this case, 20 images were combined to make the final stack.
We next run diffdetect on each individual image with this new mask. diffdetect compares each image with the stack and notices what is different taking into account the noise properties of both the single exposure and the combined stack. An example parameter file.
PACKAGE = ace
TASK = diffdetect
images = mos068S List of images
(masks = BPM) List of bad pixel masks
(skys = SKYFIT) List of skys
(sigmas = SKYSIG) List of sky sigmas
(scales = !mscscale) List of image intensity scale factors
# Reference Image(s)
(rimages= Stackharsh.fits) List of reference images
(rmasks = junkmask4.pl) List of reference bad pixel masks
(rskys = SKYFIT) List of reference skys
(rsigmas= SKYSIG) List of reference sky sigmas
(rscales= 1.) List of reference intensity scale factors
# Output
objmasks= diff068S List of output object masks
catalogs= diff068S List of output catalogs
(logfile= STDOUT) List of log files
# Sky
(newsky = yes) Determine new sky fit if one already exists?
(nskylin= 100) Number of sky sample lines
(skyblk1= 10) Sky block size for 1D sky estimation
(skyhcli= 3.) High sky clipping during 1D sky estimation
(skylcli= 3.) Low sky clippling during 1D sky estimation
(skyxord= 4) Sky fitting x order
(skyyord= 4) Sky fitting y order
(skyxter= half) Sky fitting y order
# Detection
(convolv= block 3 3) Convolution kernel
(hsigma = 3.) Sigma threshold above sky
(lsigma = 10.) Sigma threshold below sky
(minpix = 10) Minimum number of pixels in detected objects
(sigavg = 6.) Sigma of mean flux cutoff
(sigmax = 6.) Sigma of maximum pixel
(rfrac = 0.5) Minimum fraction of reference flux
(bpval = 1) Output bad pixel value
# Growing
(ngrow = 2) Number of grow rings
(mode = ql)
This will generate two files, a list of objects in a STScI
tables format, and a bad pixel mask.
We use acedisplay and reviewproto to examine the image
and make sure that 1) no good areas of the image are included in the
new mask by some error, and 2) that everything we want in the mask has
been caught. First look at the stack and make sure there are no
surviving satallite trails or scattered light. If there are, you might
have to go through the individual images and mask these out by hand in
the new ace-generated bad pixel mask using satzap for satallite
trails and blkzap for bad areas in general (and tasks to "undo"
corrections, unsatzap and unblkzap. The source for
these scripts is available at these links: satzap.cl by James Rhoads and Arjun Dey
blkzap.cl by Arjun Dey, based on script by James
Rhoads
and (unblkzap.cl and (unsatzap.cl).
Here are parameter files for acedisplay and reviewproto.
PACKAGE = ace TASK = acedisplay image = mos068S image to be displayed frame = 3 frame to be written into (bpmask = BPM) bad pixel mask (bpdispl= none) bad pixel display (none|overlay|interpolate) (bpcolor= red) bad pixel colors (overlay= !objmask) overlay mask (ocolors= 1=red,+203) overlay colors (erase = yes) erase frame (border_= no) erase unfilled area of window (select_= yes) display frame being loaded (repeat = no) repeat previous display parameters (fill = yes) scale image to fit display window (zscale = yes) display range of greylevels near median (contras= 0.25) contrast adjustment for zscale algorithm (zrange = yes) display full image intensity range (zmask = ) sample mask (nsample= 1000) maximum number of sample pixels to use (xcenter= 0.5) display window horizontal center (ycenter= 0.5) display window vertical center (xsize = 1.) display window horizontal size (ysize = 1.) display window vertical size (xmag = 1.) display window horizontal magnification (ymag = 1.) display window vertical magnification (order = 0) spatial interpolator order (0=replicate, 1=linear) (z1 = ) minimum greylevel to be displayed (z2 = ) maximum greylevel to be displayed (ztrans = linear) greylevel transformation (linear|log|none|user) (lutfile= ) file containing user defined look up table (mode = ql) PACKAGE = ace TASK = reviewproto catalog = diff051S.tab Catalog (nooverl= yes) Display image without overlays (overlay= yes) Display image with overlays (compari= yes) Display comparison image (compima= 11q1I-bandV7.fits) Comparison image (box = 200) Box size (pixels) (ocolors= 204) Object mask color (lcolor = 205) Label color (fd = ) (mode = ql) PACKAGE = user TASK = blkzap object = mos065S Input image x1 = 1247. lower left corner: location 1 - X y1 = 3705. lower left corner: location 1 - Y x2 = 1851. upper right corner: location 2 - X y2 = 3787. upper right corner: location 2 - Y (mode = al) PACKAGE = user TASK = satzap object = mos061S Input image x1 = 1151. Satellite trail: location 1 - X y1 = 3968. Satellite trail: location 1 - Y x2 = 1596. Satellite trail: location 2 - X y2 = 4011. Satellite trail: location 2 - Y (hwidth = 10.) half-width of flagged track? (mode = al)
Now the final stack can be made! This is done using mscstack again, but with a much less harsh rejection setting, counting on our improved bad-pixel masks to reject the contribution of unwanted pixels.
PACKAGE = mscred TASK = mscstack input = @infile.list List of images to combine output = 11q1I-band Output image (plfile = 11q1I-band_bpm.pl) List of output pixel list files (optional) (combine= average) Type of combine operation (median|average) (reject = ccdclip) Type of rejection (masktyp= goodvalue) Mask type (maskval= 0.) Mask value (blank = 50000.) Value if there are no pixels (scale = !mscscale) Image scaling (zero = !msczero) Image zero point offset (weight = none) Image weights (statsec= ) Image section for computing statistics (lthresh= 1.) Lower threshold (hthresh= INDEF) Upper threshold (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 = 5.) Lower sigma clipping factor (hsigma = 5.) Upper sigma clipping factor (rdnoise= rdnoise) ccdclip: CCD readout noise (electrons) (gain = gain) ccdclip: CCD gain (electrons/DN) (snoise = 0.) ccdclip: Sensitivity noise (fraction) (sigscal= 0.1) Tolerance for sigma clipping scaling corrections (pclip = -0.5) pclip: Percentile clipping parameter (grow = 0.) Radius (pixels) for neighbor rejection (mode = ql)
Thus ends the "basic" reduction of the images. Next it is time to do the photometric calibrations and generate catalogues from these images.