STScI Logo

Space Telescope Imaging Spectrograph
WX2D: A CL Script to Rectify Spectral Images Using Wavelet Interpolation

Rectification of STIS CCD spectral images is problematic because the point spread function (PSF) is undersampled along the slit. The bilinear interpolation employed by CALSTIS and by its constituent IRAF/STSDAS script "x2d" produces artifacts in the rows of spectra in the rectified image when a point source is present. For gratings with spectral traces that drop by several rows as they cross the detector, the artifacts take the form of periodic scallops in the flux. The artifacts can be reduced in rows near the center of the point source by using the wavelet method of interpolation described by Barrett and Dressel (2006, The HST Calibration Workshop: Hubble After the Transition to Two-Gyro Mode, ed. A. M. Koekemoer, P. Goudfrooij, & L. Dressel, p. 260). This method uses average interpolation (instead of point interpolation) and iterative refinement. The pixels in each column are repeatedly subdivided into pairs of subpixels, and the flux is distributed among the subpixels using polynomial fits to the flux distribution.

The task "wx2d" applies wavelet interpolation to the columns of an "flt" or "crj" image. The user can select the polynomial order and the number of subpixels. Convolution with a PSF can be performed; this reduces the magnitude of the artifacts at the expense of resolution along the slit. The task produces a wavelength array and can also produce subpixeled images, with and without convolution. The interpolated image can be processed by "x2d" (which automatically turns off interpolation along columns) to linearize wavelengths and provide flux calibration.

This task is included in STSDAS release v3.6. Details on the use of the new "wx2d" task are provided as part of the STSDAS release in the form of a help file.