4.2 Distortion Table (IDCTAB)
The Science Instrument Aperture File (SIAF) contains position and scale information for every aperture of each of HST's science instruments. Thus, it supports accurate target acquisitions, image processing, and photometry. The conversion between distorted and undistorted positions in the SIAF is controlled by a polynomial expansion which is derived by the individual instrument teams. A simple, common reference file can therefore be created for each instrument which describes the geometric distortion of each detector. In this section, we describe the format of this common reference file. The format has been developed to be as general as possible so that it can be used for many different instruments or detectors.
For ACS, the coefficients to the polynomial fit are found in the Geometric Distortion reference file (IDCTAB). The IDCTAB processing is not a part of CALACS. Instead, a separate task, PyDrizzle (see section 4.3), applies the distortion model from the IDCTAB to produce geometrically corrected images. The initial distortion tables derived from ground-testing calibrations are given in Appendix A.
4.2.1 Distortion Model
General Form
A single model is used for characterizing geometric distortion in the SIAF for WFPC2, STIS and ACS. This model defines the reference pixel position and accounts for the geometric distortion. The X and Y pixel coordinates for the reference pixel in this model are recorded in the science headers as CRPIX1 and CRPIX2.
The translation from detector pixel coordinates to sky position includes the distortion correction and the plate scales. This translation is relative to the reference position where the detector and sky Y axes are assumed to be exactly parallel. The relationship between these systems is defined for the SIAF as:
where (x, y) is the image pixel position, (xr, yr) is the reference pixel position, (xc, yc) is the corrected position in arcseconds, and k is the polynomial order of the fit.
For the SIAF, the orientation of the (xc, yc) system is chosen so that the corrected yc axis is parallel to the input y axis. For displaying the ACS images, we choose the xc and yc axes where:
- xc is parallel to V2 and yc anti-parallel to V3 for the WFC, and
- xc is anti-parallel to V2 and yc is parallel to V3 for the HRC and SBC.
In this way, we do not explicitly involve the exact detector orientations which are different for each of the WFC chips. These polynomials can be expanded to the forms:
where
and
. The values of
and
will always be zero, since xc=0 and yc=0 at the reference position
.
A similar form is used for the inverse relation using coefficients c and d for the x and y fits respectively:
This inverse relation provides the conversion from units of arcseconds to distorted input pixels. Although this description appears asymmetric, the origin of each set of coefficients is the same point.
Multi-Chip Correction
The general distortion model applies to the entire detector's field of view. The WFC has two chips, however, requiring an additional correction. The individual fits for each chip are combined to create a global fit with the same common point. This common point is defined as the average of the V2 and V3 reference point positions in arcseconds, converted to pixel positions using the plate scale. The distance in arcseconds for each reference point from the common point
provides the offset required to combine two chips into a single image.
For the purpose of mosaicing the WFC chips, a display coordinate system (xu, yu) is defined. Combining both chips' data into a single image requires the transformation:
Application of the Model
The basic steps performed in the application of the IDCTAB for drizzle operation can be summarized in the following steps.
- First, the change in position of each pixel relative to the reference position (xr, yr) is computed. This gives
and
, where x and y are original (distorted) detector pixel positions.
- These deltas,
, are used to compute the undistorted positions (xc, yc) in arcseconds with the coefficients of the polynomial fit given in the IDCTAB reference file
- The undistorted positions are divided by the desired output plate scale. The default value is taken from the SCALE column in the ICDTAB unless specified by the user.
- Finally, both chips (WFC only) are combined into a single image by adding the offset
to each pixel to get the final position (xu, yu).
The fit for each chip ensures that the distorted and corrected Y axes for a chip remain at the same angle with respect to the telescope V3 axis. This allows each chip to have a different rotation relative to the other, though this effect will be less than a degree.
4.2.2 Format of the IDCTAB file
The IDCTAB is stored as a FITS file, and the primary header contains keywords listed in table 4.2. The INSTRUME and DETECTOR keywords define the distortion model appropriate to a specific instrument and detector. The NORDER keyword provides the order of the polynomial stored in the table. The PARITY keyword describes the relationship between pixel coordinates (x, y) and (V2, V3), and has a value of either 1 or -1. This value exists primarily for documentation, and does not directly affect the application of the model.
Table 4.2: IDCTAB Header Keywords
| Keyword |
Description |
|
|
|
Name of the detector used |
|
Order of the polynomial fit used for the distortion |
|
Parity value for conversion from (x,y) to (V2,V3) |
The first extension of the FITS file contains the geometric distortion table, with the columns given in table 4.3. The table contains one row for each region of the detector with its own distortion correction. For example, the ACS WFC table will contain one row for each chip, with each row possessing a different DETCHIP value. Additional rows for each chip may be included for an inverse fit. These would be flagged with a DIRECTION value of `INVERSE', rather than `FORWARD'. Naturally, instruments with a single detector (such as the ACS HRC) will have one row for the forward fit and an optional row for the inverse fit. Separate sets of rows for different central wavelengths may also exist, as determined by the optical elements used for the observation, with each set having its own WAVELENGTH value. The SCALE keyword gives the default pixel scale of the drizzled image.
Reference Position Columns
The primary challenge of working with data from multiple chips is assembling them into a single image. The distortion coefficients provide a correction for each pixel relative to the chip/detector reference point (xr, yr) specified in the XREF and YREF columns. The relationship between each chip/detector in the entire observation must be factored in separately.
HST relies on a V2/V3 coordinate system to define each detector's position (in arcseconds) relative to the center of HST's field of view. The V2REF and V3REF columns contain the reference position of each detector in the V2/V3 system. The absolute position is secondary to the relative position of this reference point. This is because only the offset between V2REF/V3REF positions are used for combining multiple chips into a single output image. Ultimately, the nomenclature attempts to make it clear that both the XREF/YREF and V2REF/V3REF positions represent the same point in the images in different coordinate systems, allowing the data to be combined into a single image. THETA provides the angle between the telescope's V3 axis counterclockwise to the image's Y axis.
Table 4.3: Columns in the IDCTAB
| Column |
Precision |
Description |
|
|
ID of chip/detector used for observation |
|
|
Application direction of coefficients (FORWARD,INVERSE) |
|
|
Central wavelength of fit |
|
|
Raw image size in X direction (pixels) |
|
|
Raw image size in Y direction (pixels) |
|
|
X position of reference pixel |
|
|
Y position of reference pixel |
|
|
V2 position of reference point (arcsec) |
|
|
V3 position of reference point (arcsec) |
|
|
Angle from V3-axis anti-clockwise to Y-axis (degrees) |
|
|
Scale of square corrected pixel (arcsec/pix) |
|
|
Distortion Coefficients for X position |
|
|
Distortion Coefficients for Y position |
Distortion Coefficient Columns
The columns CXnn and CYnn contain the coefficients of the polynomial fit for each chip which convert an input pixel position to an undistorted position. If the DIRECTION column is `INVERSE' rather than `FORWARD', the coefficients specify the conversion from undistorted to distorted pixel positions. The column names contain the indices for the coefficients from the polynomial fit, where CX11 and CY11 correspond to the a11 and b11 coefficients for the forward fit and to the c11 and d11 coefficients for the inverse fit. These columns can then be read into a polynomial of order NORDER (specified for the fit in the table header). For subarray data, the input pixel position must be corrected for the subarray offset to put it into the coordinate frame of the full chip.
The initial distortion correction tables are presented in ACS Table A.1: for the FORWARD direction and in ACS Table A.2: for the INVERSE direction.