next up previous contents
Next: Handling Larger Images Up: Full Mosaicing Previous: Merging Registration Files Into

Creating the Final Images

Following the construction of the database files containing the offset and transformation information, the final images are created with the task cspmakeit. cspmakeit follows the submitted registration prescription and transforms (geotransform), and spatially shifts (imshift) copies of the input database images and presents these copies to the IRAF imcombine task along with the integer spatial offsets necessary for assembling the final image. In this task all of the transformations are actually applied. For example,

cspmakeit imagemos image

will create an IRAF image image from the imagemos database files.

Whenever you run cspmakeit, it checks to see if there is a common overlap region for the dataset. If there is no overlap region, it issues a warning:

#WARNING: overlap section: [463:253,456:254] is unphysical!

A typical ``epar'' listing for cspmakeit is shown below:

                                   I R A F  
                    Image Reduction and Analysis Facility
PACKAGE = caspir
   TASK = cspmakeit
    
mosfile =             imagemos  Mosaic filename
comfile =                image  Composite image filename
(frame_n=                  all) Frame numbers to include in mosaic

(trimlim=            [2:2,2:2]) Trim limits for input subrasters
(registe=                   no) Maintain input image origin and size
(common =                 none) Pre-combine common offset
(comb_op=              average) Type of combine operation
(reject_=                 none) Type of pixel rejection operation
(lthresh=                -200.) Rejection floor for imcombine and stats
(hthresh=               65000.) Rejection ceiling for imcombine and stats
(blank  =               -1000.) Value if there are no pixels
(setpix =                   no) Run SETPIX on data?
(maskima=     caspirdir$caspir) Bad pixel image mask
(svalue =          -100000000.) Setpix value (<< lthreshold)
(fixpix =                   no) Run FIXPIX on data?
(fixfile=     caspirdir$caspir) Bad pixel file in FIXPIX format

(make_st=                   no) IMSTACK images prior to IMCOMBINE?
(apply_z=                   no) Apply zeropoint prior to IMCOMBINE?
(save_im=                   no) Save images IMCOMBINED via imstack?
(do_comb=                  yes) IMCOMBINE (or overlay) final image?

(size   =                   no) Compute image size?
(shift_i=               linear) IMSHIFT interpolant
(bound_s=              nearest) IMSHIFT boundary
(const_s=                   0.) IMSHIFT constant for boundary extension
(gxshift=                   0.) Global xshift for final image
(gyshift=                   0.) Global yshift for final image
(goverla=                     ) Global overlap section (overrides all else)
(gsize  =                     ) Global image size (overrides all else)
(weight =                 none) Image weights
(mclip  =                   no) Use median, not mean, in clip algorithms
(pclip  =                 -0.5) pclip: Percentile clipping parameter
(nlow   =                    1) minmax: Number of low pixels to reject
(nhigh  =                    1) minmax: Number of high pixels to reject
(lsigma =                   3.) Lower sigma clipping factor
(hsigma =                   3.) Upper sigma clipping factor
(sigscal=                  0.1) Tolerance for sigma clipping scaling correction
(grow   =                    0) Radius (pixels) for 1D neighbor rejection
(expname=                     ) Image header exposure time keyword
(rdnoise=                   0.) ccdclip: CCD readout noise (electrons)
(gain   =                   1.) ccdclip: CCD gain (electrons/DN)

(verbose=                  yes) Verbose output?

answer  =                  yes  Do you want to continue?
compute_=                  yes  Do you want to [re]compute image size?
(list1  =                     )
(list2  =                     )
(mode   =                   ql)

mosfile is the composite database file corresponding to the image you wish to assemble. The database files output by cspmate, cspmatch, or cspmerge are acceptable. Remember that you can edit COM-line prescriptions contained in these files when necessary to get your desired result. comfile is the name of the output image file. trimlimits specifies in section notation the number of columns or rows to trim off each edge of each input subraster before inserting it in the output image. The default is to trim 2 columns or lines at each edge. This compensates for the 2 pixel border trashed (i.e., made up) by the imshift operations. The input images are not touched; rather the database is marked to exclude these edge regions from the final image. However, the images the trimmed portions of the image will be excluded during the image overlap statistics. Normally, trimlimits are cumulative in the database. This trimlimits is not. It just communicates to the task generating the overlap regions the message that the edges are flawed so do not count them as useful during the overlap computations. The imcombine task trims the edges of the output image at the top and right to the miminal size required. Consequently final image size can vary. Setting register=yes restores images to the full size requested in mosfile. Setting register=no leaves the output image of imcombine alone.

If your dataset contains images which share a common overlap region, you can use common to select the statistic you want to use to determine the z offsets between images. It can be either mean, median, or mode. This feeds the zero parameter in imcombine. comb_opt specifies the type of combining operation performed on the final set of pixels (after offsetting, thresholding, and rejection). The choices are average and median. The median uses the average of the two central values when the number of pixels is even. reject_opt specifies the type of rejection operation performed on the pixels remaining after offsetting, masking and thresholding. The rejection choices are:

none      - No rejection
minmax    - Reject the nlow and nhigh pixels
ccdclip   - Reject pixels using CCD noise parameters
crreject  - Reject only positive pixels using CCD noise parameters
sigclip   - Reject pixels using a sigma clipping algorithm
avsigclip - Reject pixels using an averaged sigma clipping algorithm
pclip     - Reject pixels using sigma based on percentiles

minmax is a conservative choice. See the help page for imcombine for discussion of the alternatives. Depending on the choice of reject_opt, the parameters from weight through gain listed above may be better served by choices other than those shown.

lthreshold is the lower limit for inclusion in imstats during intensity offset operations and for inclusion in the final image in imcombine during threshold operations. When using setpix=yes you must be sure to exclude the mask regions, which will be set to svalue, from the statistics. You might consider choosing a higher value to improve image statistics by restricting the range. However, be sure to keep this limit safely below the loweset real data in your image! hthreshold is the upper limit for inclusion in imstats during intensity offset operations and for inclusion in the final image in imcombine during threshold operations. You might consider choosing a lower value to limit the effects of bright stars and improve image statistics by restricting the range. imcombine thresholds its input pixels prior to any scaling, rejection, and combining; if either lthreshold=INDEF or hthreshold=INDEF the thresholds are not used.

blank is the value given to output pixel locations where no input pixels have survived the threshold and rejection algorithms. Since the over-lap region includes the edges of the frame, it is best to mask the images when computing intensity offsets and combining the images into a composite image. setpix=yes will mask the images using the mask maskimage before calculating overlap statistics. cspmakeit works on image copies, so the original images remain untouched. svalue is the value given to masked pixels. The large negative number shown assures that any output pixel which is generated through subsequent image shift and geotransformed from masked input pixels stays recognizably negative compared to good pixels so that such pixels can be thresholded from the final image. When using such a svalue, you must remember to exclude this value by choice of lowerlimit from statistics.

By default, do_combine=yes and the images are combined into a single composite image using all the available pixels. If you would rather emulate the tiling operations of the iralign/irmatch1(2)d tasks and have each succesive image cover up the overlap regions with prior images in the prescription, set do_combine=no. shift_interp, bound_shift, and const_shift are used internally by imshift and should remain at their indicated default values.

The query parameter compute_size should be set to no. The trimlimits should be [2:2,2:2] to exclude the edges which will have been affected by the transformation.

The parameters lthreshold and hthreshold should be set to include the range of all good pixels in all images. For example, the range -100 to 20000 would certainly be safe for images which have been optimally sky-subtracted. Setting these to closer tolerences may improve the precision of the common median determination. The parameters lthreshold and hthreshold also limit the range of pixels values which will be included in assembly of the final image. The limits should certainly be set to exclude pixels flagged as bad (i.e., svalue after masking) and pixels with unreasonable values.


next up previous contents
Next: Handling Larger Images Up: Full Mosaicing Previous: Merging Registration Files Into

Kabal
Thu Jun 5 16:44:21 EST 1997