1.3 DrizzlePac Code
Code Improvements
DrizzlePac maintained much of the same Drizzle algorithm since the beginning, but over time, this code has undergone a number of substantial internal changes. Core routines have been re-coded in C and Python, written in a modular fashion for easier maintenance and updates.
All user interaction is performed using Python with the command line and/or using the TEAL (Task Editor and Launcher) Graphical User Interface (GUI), although the latter is no longer supported due to compatibility issues with some operating systems. While TEAL is referenced at times in this text, a command line alternative is always provided.
A full list of changes can be found in the DrizzlePac release notes.
WFPC2 and NICMOS images, processed with MultiDrizzle, are in a static archive and will not undergo further pipeline processing.
Geometric Distortion Corrections
One of the main functions of AstroDrizzle is correcting geometric distortion due to the optical distortion and various manufacturing processes. DrizzlePac incorporates the distortion corrections directly into the WCS in flt.fits headers, using the Simple Image Polynomial (SIP) convention (Shupe et. al, 2005) as well as non-polynomial distortion look-up tables. This convention has been used for describing the geometry of Spitzer Space Telescope images. Representing image distortion corrections using the SIP convention improves the handling of image combination and WCS astrometric information.
These corrections are unique for different HST instruments and stored in these reference files:
- Geometric distortion due to the optical distortion is expressed as a set of high-order polynomial coefficients stored in a reference file called the IDCTAB (Instrument Distortion Coefficients TABLE);
- ACS/WFC requires correction for the pixel-grid irregularities due to the manufacturing process. It is a 2-D look up table which corrects X,Y raw positions before the geometric distortion correction. This look-up table is a reference file which is called D2IMFILE;
- WFC3/UVIS requires correction for the lithographic-mask pattern correction due to the manufacturing process. It is a 2-D look-up table which corrects X,Y raw positions before the geometric distortion. This look-up table is also a reference file called D2IMFILE;
- In addition to the pixel-grid irregularities, the filter-dependent component of the total distortion model is also described using 2-D look-up tables. These tables are unique for each set of ACS/WFC and/or WFC3/UVIS filters and are provided by the NPOLFILEs reference files. These filter-dependent distortions correct X,Y positions after correction for D2IMFILE and simultaneously with IDCTAB corrections.
The D2IMFILE and NPOLFILE reference files are images with 4 extensions and 32 × 64 images, in each X and Y direction for each ACS/WFC or WFC3/UVIS chip, interpolating a set of 32 × 64-entry tables representing residual distortion corrections into a full-size image. The non-polynomial distortion corrections, in tabular form, are inserted directly in the header of flt.fits or flc.fits files as FITS extensions. As a result, ACS/WFC and WFC3/UVIS data have several FITS extensions containing information on the geometry of the detector not described by the image SIP coefficients, the D2IMARR and WCSDVARR FITS extensions.
flt.fits or flc.fits images with this format cannot be run with old software as Multidrizzle still requires the IDCTAB and DGEOFILE reference files. Likewise, older flt.fits or flc.fits images will not be compatible with the current DrizzlePac until the WCS in the headers are updated with this format.
A Fundamentally Different Approach to Handling Astrometry
As of December 3, 2019, flt.fits or flc.fits images have new absolute astrometric solutions. These improvements mainly reduce the pointing errors (generally a few tenths of an arcsecond), but do NOT affect the distortion solution. The solutions are derived in a number of ways, but fall into two different categories. The first is an "a Priori" solution, which is derived using Gaia Data Release 1 (DR1) coordinates for the guide stars used in the observation, as the Gaia positions for these stars are much more accurate than the previous Guide Star Catalog positions. The other type of solution is an "a Posteriori" solution derived via matching sources detected in an image to an external catalog and correcting the image for the offsets between matches. If one of these solutions exists, the external catalog will either be the Hubble Source Catalog Version 3, Gaia DR1, or Gaia DR2 (the final choice depends on the quality of solution each catalog was able to generate for any given dataset). Other catalogs may be added in the future.
If a new solution is available for a dataset, products retrieved from the MAST archive will have the best solution applied by default. In this case, the application of the solution changes the World Coordinate System (WCS) in the headers of the flt.fits or flc.fits files, but does NOT affect the pixel values for these data (though the values in drz.fits or drc.fits images will likely be affected). This is because the WCS defines transformations from pixel to sky coordinates for an image. When a new WCS is applied, this is reflected in the WCSNAME header keyword in the science extensions of the flt.fits or flc.fits files. Several solutions are available for a given dataset, and are contained in extra "headerlet" extensions appended to the end of flt.fits or flc.fits files. A detailed explanation of this approach can be found in Chapter 4: Astrometric Information in the Header, or at the Hubble Advanced Products astrometry webpage.
In general, the absolute astrometry of the data products should be significantly improved when new solutions are present (especially with the a Posteriori solutions), i.e. the WCS of the updated images should be very close, if not matching the Gaia frame. However, as with the drizzle products from the archive, a broad set of parameters were used in the derivation of the a Posteriori solutions. Rarely, this may cause a degradation in both the absolute and relative astrometry, especially in sparse/small fields with very few Gaia sources. If the relative astrometry between input images of a drizzled image is compromised, then the resulting drizzled image may have spurious rejection of sources as cosmic rays. Furthermore, since the derivation of the a Posteriori solutions is done on an individual dataset basis, it is possible that images taken in the same visit, but part of different associations (such as those taken in different filters) may not be aligned to each other. Thus, it is strongly recommended to assess datasets visually to verify alignment, e.g. by opening up images in SAOImage DS9, matching the WCS's of the images and blinking them. As always, drizzled images directly from the archive should be treated as quick look/preview images only and should not be assumed to be science-ready.