STScI

Part II: ACS Data Handbook

TOC PREV NEXT INDEX PDF

4.3 PyDrizzle


4.3.1 Application by the Pipeline

The ACS calibration pipeline currently consists of 2 processing stages, CALACS and PyDrizzle, which are run one after the other. Standard CALACS processing includes bias and dark subtraction, removal of the overscan regions, and flat fielding. It will produce, among other products, a calibrated image with the FLT suffix for each input file. The CALACS portion of the pipeline will calibrate and combine CR-SPLIT images. It will not, however, correct for geometric distortion or combine images from multiple dither positions.

Geometric distortion is removed for all images (dithered or not) in the second stage of processing via PyDrizzle. This software understands the ACS association tables, allowing the pipeline to combine associated dithered observations into a single image. These images will still contain cosmic-rays unless CR-SPLIT observations were specified within the dither pattern. For WFC observations, both chips are combined into a single extension. Finally, PyDrizzle converts the data to units of count rate (electrons/sec).

The IRAF dither package has provided users the basic tools for linear image combination via the task drizzle. This task can produce mosaics, correct for geometric distortion, and even remove cosmic rays, creating a single, undistorted output image with uniform photometric and astrometric properties. A significant amount of work, however, is required to determine the necessary input parameters, causing drizzle to be fairly user-intensive. These steps include:

These requirements made it impossible to use drizzle in a pipeline environment to automatically process images.

PyDrizzle was written to automate the use of drizzle in the pipeline environment. It can also simplify using drizzle for manual image reprocessing. Pipeline use relies on default parameter values which are taken from the IDCTAB reference file and include the default plate scale and the distortion model. This file provides information about the position of each ACS detector on the sky, allowing PyDrizzle to combine images from multiple detectors at once. PyDrizzle, like drizzle, works with count rates, allowing images with differing exposure times to be combined easily. Regardless of whether observations were taken as a single image or a set of dithered exposures, PyDrizzle produces images which are both astrometrically and photometrically accurate.

Processing comments are recorded in the trailer file for the DRZ image, including which version of drizzle was used, what parameters were used, and which images were combined (if dithered). The same default parameters are used for all observations in the pipeline. These parameters were chosen to avoid introducing any scale changes, shifts, or rotations relative to the original pointing, aside from those corrections incorporated in the distortion model itself. While the pipeline products will be properly corrected for distortion, the combination of dithered observations may not be ideal, and small pointing errors or defects, such as hot pixels or cosmic-rays, may still be present.

4.3.2 Association Tables

Before the drizzle task could be used in an automated manner, two obstacles had to be overcome: calculating the required input parameters and working with a wide range of input image formats. PyDrizzle relies on several features to address these problems:

The calibration pipeline uses association tables to define how multiple images, taken at different pointings, relate to a single output image. PyDrizzle relies on these association tables to automatically combine and correct ACS dithered observations or any other related set of observations.

Each input/output exposure within PyDrizzle knows about:

The PyDrizzle design provides the flexibility to support multiple instruments simultaneously, and to combine observations from several instruments into a single output field with arbitrary specification. The virtual output image is built using the World Coordinate System (WCS) information from each input image and the distortion model. This provides all the information necessary to calculate the input parameters for drizzle. These parameters are then passed to drizzle which actually performs the image combination.

4.3.3 PyDrizzle Data Products

The output from PyDrizzle is a single multi-extension FITS file with the suffix '_drz.fits'. The first extension contains the science (SCI) image which is corrected for distortion and which is dither-combined (or mosaiced), if applicable. The drizzled SCI image is in units of electrons per second. All pixels have equal area on the sky and equal photometric normalization across the field of view, giving an image which is both photometrically and astrometrically accurate for both point and extended sources. The dimensions of the output image will be computed on-the-fly by PyDrizzle and the default output plate scale will be read from the IDCTAB. These parameters, however, may be chosen by the user during reprocessing to best suit the actual data.

The second extension of the output image contains the weight (WHT) image. It gives the relative weight of the output pixels and can be considered an effective exposure time map. The data quality map created by CALACS is used by PyDrizzle in creating the weight image.

The third extension of the PyDrizzle output image contains the so-called context (CTX) image which encodes information about which input image contributes to a specific output pixel. This is done using a bitmask for each output pixel, where 'bit set' means that the image, in the order it was combined, contributed with non-zero weight to that output pixel. The context image starts as a single 32-bit integer image but is extended as a cube with additional 32-bit deep planes as required to handle all the input images.


TOC PREV NEXT INDEX PDF
Space Telescope Science Institute
http://www.stsci.edu
Voice: (410) 338-1082
help@stsci.edu