Skip to main content


The HST WFC3 instrument, comprised of both a UVIS and an IR channel, was installed on HST in 2009 during SM04, replacing WFPC2 on the HST optical axis. The UVIS channel sensitive to ultraviolet through visible wavelengths covered by 62 filters and 1 grism, contains two 4Kx2K CCD chips with a FOV of 160"x160". The average absolute pixel scale is 0.039"/pixel. A detailed description of the WFC3 instrument is available in the WFC3 Instrument Handbook.

As a result of the WFC3 optical design, WFC3/UVIS and IR images exhibit a significant geometric distortion, 7-11% across the detectors. Accurate knowledge of the distortion is critical to rectify the WFC3 images in order to align images with high precision (<<0.1 pixels) and  then combine multiple exposures of dithered images into one single image with the deepest detection limit and spatial resolution. The sections below provide an overview of the WFC3 geometric distortion (please refer to Appendix B of the WFC3 instrument Handbook for further details).


The UVIS distortion correction, a part of the WCS (World Coordinate System), is used in the HST software DrizzlePac through three reference files 2DIMFILE, IDCTAB, and NPOLFILE. The names of these reference files are populated in the primary image header during the HST pipeline calibration. Each of these files are described in more detail in the following sections.



The Detector To Image File (D2IMFILE) is a 2-dimensional look-up table for each of the WFC3 UVIS CCD chips which provides a correction for the lithographic-mask pattern (Kozhurina-Platais, et al., WFC3-ISR-2013-14). This correction, applied prior to the polynomial coefficients distortion correction, is performed via bi-linear interpolation by the HST software DrizzlePac. The following figure is a visualization of the lithographic mask pattern in the form of 2-D positional residuals map before the correction.


Figure 1:  2D-positional residuals maps after the best polynomial solution for UVIS1 (top) and UVIS2 (bottom) have been applied. These vector diagrams show clear evidence of the WFC3/UVIS lithographic-mask pattern with period of 675 pixels in the X-direction and 911 & 1140 pixels in the Y-direction. The largest vector (max_vector) is defined individually for each UVIS CCD chips, and both are magnified by a factor of 2000. The units are WFC3/UVIS pixels.


The high-order polynomial coefficients for each WFC3 UVIS CCD chip which correct for the geometric distortion (Kozhurina-Platais et al. WFC3-ISR-2009-33) are converted into the HST V2V3 coordinate system by applying the references from the WFC3/UVIS Science Instrument Aperture File (SIAF). The result is converted into FITS format (Instrument Distortion Coefficients Table IDCTAB) for use with the HST software Drizzlepac.  

The UVIS IDCTAB contains coefficients for all wide pass-band UVIS filters, all  medium pass-band filters, and all narrow pass-band filters. The  filters with no distortion calibration, such as F200LP, use the F606W filter polynomial coefficients as that is the best calibrated filter.

The plate scale,  the linear part of the geometric distortion, is filter-dependent (C. Martlin et al., WFC3-ISR-2018-10). The various glass layers of a filter can introduce a positional offset in the measured positions of targets on images  taken with different filters, known as a filter wedge effect (E. Sabbi, et al., WFC3-ISR-2012-01). The figures below show the changes in X-scale and Y-scale for each filter with respect to the base F606W filter scale.  

XscaleY Scale

Figure 2: The UVIS X and Y plate scale plotted for each filter with respect to F606W (C. Martlin et al., WFC3-ISR-2018-10). 

The following figures show the effects of the filter wedges, via measured X and Y-offsets for all calibrated WFC3/UVIS filters with respect to F606W (C. Martlin et al., WFC3-ISR-2018-10).


Figure 3: The X and Y offsets with respect to F606W  (C. Martlin, WFC3-ISR-2018-10).   


The filter-dependent distortion is a fine-scale distortion component which requires the highest-polynomial solution to remove irregularities across each WFC3/UVIS CCD chip  (Kozhurina-Platais, WFC3-ISR-2014-12). The fine-scale structure is due to imperfections in the filter manufacture process. The complicated spatial structure is expressed  in a 2-dimensional, non-polynomial look-up table for each WFC3/UVIS CCD chip for 52 of the WFC3/UVIS filters. These  2-D look-up tables are converted into FITS format and available as the NPOLFILE reference files. They are used by Drizzlepac for pixel-by-pixel correction of fine-scale systematics after the application of the best-fit polynomial solution.

The figures below show the largest filter-dependent systematic in the form of a 2-D residuals map before correction for the geometric distortion and after the NPOLFILE correction  which clearly indicates that such errors can be removed to a significant degree.


Figure 4: Example of the fine-scale distortions of the UVIS filter F775W before NPOLFILE corrections (left) and after NPOLFILE corrections (right) (Kozhurina-Platais, WFC3-ISR-2014-12)


The WFC3/IR infrared channel, sensitive to near-infrared wavelengths (800-1700 nm (covered by 15 filters and 2 grisms), consists of a 1Kx1K  HgCdTE detector with a FOV of 136"x123".  The average absolute pixel scale is 0.13"/pixel.

The geometric distortion of WFC3/IR is comprised of only high order-polynomial coefficients (Kozhurina-Platais, WFC3-ISR-2009-34). These polynomial coefficients are transformed into the HST V2V3 coordinate system by applying the references from the WFC3/IR Science Instrument Aperture File (SIAF) and is simultaneously converted into FITS format as the reference file Instrument Distortion Coefficients Table (IDCTAB). The IR IDCTAB contains coefficients for all wide pass-band IR filters, and 3 medium pass-band filters (F098M, F139M, F153M). All other filters without a distortion calibration, such as the narrow filters, use the F160W polynomial coefficients as that is the best calibrated filter available.

The IDCTAB name is populated in the primary image header during calibration by the HST pipeline. The IDCTAB correction, applied by the HST software DrizzlePac, becomes part of the image WCS (World Coordinate System).

A significant pixel-phase distortion (pixel shift in the phase direction) is one cause of severe under-sampling of the IR PSF and can resemble a high-frequency distortion. The figures below show that, within the X&Y residuals between two  matching  IR images taken with a large POSTARG (24” vs. 0”), we see a sinusoidal shape, amplitude and the phase caused by the undersampled PSFs. These figures were generated by first centering the X,Y positions with DAOFIND on original FLT images then correcting the X,Y positions for geometric distortion with the IR IDCTAB. A 6-parameter transformation was used to find the offset, rotation and scale with TweakReg. The sinusoidal shape, amplitude and the phase in the residuals is caused by poor centering due to the under-sampled PSF. As it discussed in Anderson & King (2000, PASP 112) an inaccurate modeling of the under-sampled PSF induces systematic biases in the measured positions of PSF


Figure 5: Residuals between the X,Y positions from 2 IR frames obtained from DrizzlePac/TweakReg. The sinusoidal shape, amplitude and the phase in the residuals is due to the poor centering with TweakReg.

WFC3/UVIS and IR Distortion Stability

While the HST Advanced Camera for Surveys Wide Field Camera (ACS/WFC) posses  a time dependence in the linear part of distortion, the WFC3/UVIS and IR  instrument does not see a time dependence. In fact, over the 10 year time period of WFC3 on-orbit operation, the WFC3/UVIS distortion is found to  be time-independent at the level of less than 0.1 pixels or ~ 4 mas (C.Martlin et al., WFC3-ISR-2019-09). The WFC3/IR distortion is seen to be stable with a change of less than 0.1 pixels (~13mas) over 8 years (McKay et al., WFC3-ISR-2018-09). 

Using the Reference Files

All reference files discussed in the sections above are populated in the primary WFC3 image header during the HST pipeline calibration and becomes as part of the World Coordinate System (WCS) of the images are used by the HST software DrizzlePac.

WFC3/UVIS and IR  users are encouraged to improve the alignment with DrizzlePac for their specific scientific goals and can do so with the following steps:

  1. Ensure the data have the most up-to-date D2IMFILE, IDCTAB, NPOLFILE references files using CRDS – described in this notebook.
  2. Check you have the newest DrizzlePac software - this can be accomplished by following the previously included notebook.
  3. Update the global header of your data by setting the global header keywords IDCTAB, NPOLFILE, and D2IMFILE to the path and filenames of the corresponding updated reference files;
  4. Update the WCS by using 'updatewcs' to get the correct keywords;
  5. Run DrizzlePac/TweakReg/Astrodrizzle with the most updated distortion solution to improve alignment and combine WFC3 images.

Further advice on Drizzlepac/Tweakreg can be found in example notebooks here.

The first 4 steps can be run in Python as following:

from import fits
import glob

# First we update the headers to point to the location of the reference files on your machine

image_list = glob.glob('/path/to/your/data/*flc.fits')

for image in image_list:
 with, mode='update') as hdu:
  hdu[0].header['IDCTAB'] = '/path/to/your/IDCTAB_FILE.fits'
  hdu[0].header['NPOLFILE'] = '/path/to/your/NPOL_FILE.fits'
  hdu[0].header['D2IMFILE'] = '/path/to/your/D2IM_FILE.fits'

# Keep in mind that if you update one of the reference files, you should update them all.
# These files are built on one another and mixing reference files will create issues.

# With the headers updated to point to your local copies of the distortion reference files,
# we can now use the stwcs package to update the WCS information to use the new solution.

from stwcs import updatewcs


LAST UPDATED: 01/28/2022

Please Contact the HST Help Desk with any Questions