4.3 PyDrizzle
The PyDrizzle script provides a PyRAF interface to Drizzle, and is specifically designed to automate a number of the user-intensive steps associated with using Drizzle to combine dithered data. In particular, this includes:
- determining image shifts from the headers
- calculating shift and rotation parameters to be passed to Drizzle
- calculating the output image size to contain the dithered exposures
- ability to include multi-extension FITS files
In addition, PyDrizzle translates the IDCTAB geometric distortion files into "coefficient" files that are used by Drizzle. As such, PyDrizzle provides all the machinery necessary to drizzle a single image, two groups of a single exposure, or a series of associated exposures into geometrically corrected output files.
Until September 2004, PyDrizzle was used in the pipeline to produce combined, drizzled image products for ACS data. However, PyDrizzle does not perform any cosmic ray rejection, but instead relies upon previous tasks, in particular ACSREJ which is performed as part of the CALACS processing step for CR-SPLIT data. If the number of CR-SPLITS is greater than about 3 or 4, then this provides enough individual exposures to enable good cosmic ray rejection by ACSREJ. However, very often observers only obtain a single exposure at each of several dither positions. In this case, each pair of exposures contains thousands of pixels that are affected by cosmic rays in both exposures, and when combined by PyDrizzle these cosmic rays propagate through to the final output image.
The solution to this issue is to use all the exposures together to generate cosmic ray masks in a single step. This has required the implementation of a new script, MultiDrizzle, described further in Section 4.4, which makes use of PyDrizzle to perform image registration but includes additional processing to construct clean intermediate images and create cosmic ray masks, before doing the final drizzling.