4.8 Creating Custom Association Tables
Association tables for dithered, REPEAT-OBS, or CR-SPLIT observations are generated by the CALACS pipeline. These tables keep track of the input exposure filenames and the output product filenames. Some types of observations, however, will not have association tables. Others will have multiple tables from different visits which need to be combined into one. In the following discussion, we present the methodology for creating custom association tables, either by merging association tables or creating them from scratch. Users also have the capability to manually edit association tables to include any known image offsets. This can be done using the TTOOLS task tedit in IRAF, where the user adds the columns XOFFSET, YOFFSET and/or ROTATION to the association table. Alternately, an ascii file with the known image offsets may be specified and the association automatically updated.
Merging Association Tables
Observing programs which cover a large portion of the sky will generally be made up of multiple pointings. Each of these pointings may be dithered or split for cosmic-ray rejection and will possess their own association table. In order for PyDrizzle to produce a single mosaic product, a composite association table must be built from the separate association tables. Users can easily create this composite by merging the individual tables using the TTOOLS task tmerge with "option = append".
The default product rootname will be taken from the first listed DTH-PROD in the composite association table. This rootname can be modified by the user (with tedit) to suit the desired naming convention. Generally, this rootname should match the rootname of the composite association table. A detailed example of merging association tables is given in step 1 of Example 4 from Section 3.5.2.
Creating Association Tables from Scratch
In some cases, observations of the same target will not have accompanying association tables, for example observations taken in different visits or dithered observations taken using POS-TARG offsets. The Python task buildasn has been developed for the DITHER package to create association tables which may be used for reprocessing with PyDrizzle or MulitDrizzle.
The following illustrates how to use buildasn to create an association table from all calibrated files with the FLT suffix in a single directory.
|
pyraf> from pydrizzle import buildasn
pyraf> buildasn.help()
|
The following illustrates how to use buildAsn to create an association table from all calibrated input files with the FLT suffix found in a single directory. Within PyRAF and using the IRAF syntax, we type:
|
pyraf> buildasn mymosaic suffix='flt'
|
Alternately, the same result may be obtained using the Python syntax:
|
pyraf> buildasn.buildAsnTable('mymosaic',suffix='flt')
|
The association table will have the name 'mymosaic_asn.fits', the product name will be 'mymosaic_drz.fits', and all files with the FLT suffix found in the working directory will be included in the association. To specify a subset of images within a given directory, the user may specify the 'suffix' parameter to be a filelist ('@filename'), a wild-card list ('*8cd*flt*'), or any portion of the filename ('crj' or 'f555w').
If user determined offsets are available, buildAsn has the capability of incorporating them into the association table. These offsets (XOFFSET, YOFFSET, and/or ROTATION) are specified by the file listed in the 'shiftfile' parameter. MultiDrizzle utilizes the buildasn task and creates association tables automatically when a file suffix (i.e. 'flt.fits') or a file list and/or a shift file is specified in the input parameters.
|
pyraf> buildasn mymosaic suffix='flt' shiftfile='shift.txt'
|
This option allows users to fine-tune the final image combination by providing corrections to the header WCS information, if required.