STScI Logo

Hubble Space Telescope
General Advice on Dithering HST Observations

We provide here a consideration of the benefits and costs associated with acquiring data with dithering for the WFPC2, NICMOS and STIS instruments. A dither is defined here as an offset in either spatial, or in the case of spectroscopic observations dispersion coordinates, usually for the purpose of recovering resolution with sub-pixel offsets, or ameliorating background irregularities with multi-pixel offsets. Dithering of HST observations is hardly new; indeed the primary data acquisition modes of both the GHRS and FOS involved both sub- and multi-pixel (diodes) offsets to obtain well-sampled data without gaps resulting from the presence of a few dead diodes. Dithering of HST observations has been the rule, rather than the exception. For the three primary instruments used in Cycle 7 dithering will often be of considerable benefit to the science program, however there are also drawbacks that need to be understood before designing your observing program for the Phase II submission.

In general, dithering has the following positive benefits:

In general, dithering incurs the following costs or drawbacks:

Although the number of potential drawbacks to dithering is substantial the benefits will often be more important. In general though, if in doubt about whether to dither, we recommend the conservative approach of not doing so.

Dithering WFPC2 Observations:

Although the optics of WFPC2 now provide a superb PSF, the detectors at the focal plane undersample the image. This problem is most severe on the three WF chips, where the width of a pixel equals the FWHM of the optics in the near-infrared, and greatly exceeds it in the blue. While some spatial frequency information in the image is permanently destroyed by smearing with the response of the "fat" pixels, the quality of the image can nevertheless be greatly improved by combining sub-pixel dithered images. In sub-pixel dithering, the pointing of the telescope is moved by small, non-integral pixel amounts between exposures. Each of the pixels from the different exposures can then be thought of as sampling a final, higher-resolution image, which is the ``true image" of the sky convolved with the optical PSF and the pixel-response function of the CCD. As a result, dithering allows one to regain a substantial fraction of the spatial information lost to undersampling in a single image.

In addition to increasing information on the smallest spatial scales, dithering can be used to reduce the effect of flat-field errors in very deep images. Large dithers (of tens of pixels) were used in the HDF for this purpose. Furthermore, dithers greater than one or two pixels can be used effectively to eliminate chip defects such as hot-pixels and bad columns.

A substantial fraction of the spatial information lost to the undersampling of the WFPC2 can be recovered by images taken at two positions, (0,0) and (n + 1/2,m+1/2) where n and m are arbitrary integers. And nearly all of the information recoverable through dithering can be extracted from images taken at the four dithers: (0,0),(1/2,0),(0,1/2), and (1/2,1/2) where, again, arbitrary integers can be added to the offsets. However, due to the presence of geometric distortion the total offsets should be much less than 10 pixels.

Unfortunately, errors in relative offsets of 0."02 (0.2 WF pixels, or 0.4 PC pixels), are not at all uncommon when using HST (the most likely cause of the errors is at present believed to be the variable thermal distortion of the telescope structure). As a result one cannot be assured that one will obtain an optimal dither pattern. In practice, then, the more dither positions, the better to assure that the full set well samples the sub-pixel phase space.

Associated costs of dithering:

Dithering requires a noticeable amount of spacecraft overhead. Even when using the optimized "dither" special requirements for scheduling dithers (these are discussed in more detail in another section), each dither position will typically add a couple of minutes of overhead to the total observing plan. In addition, processing dithered data is substantially more demanding than processing undithered data, both in computer and human resources. This is particularly true if the user attempts to remove cosmic rays from the dithered data as a whole, rather than removing them at each dither position before attempting to combine the dithered data.

Use of the Dither-type optional parameter (see Phase II Proposal Instructions) invokes spatial-scans with HST which precludes use of other instruments in parallel. We request that for individual exposures longer than 1000 seconds for which the extra overhead would be minimal, that POS TARGS be used to generate the dithers; this will allow for better utilization of the full HST resource by enabling parallel science.

Combining dithered data that has been independently cleaned of cosmic rays:

If the dithers are particularly well-placed, one can simply interlace the pixels from the images on a finer grid. In practice, however, imperfect offsets, and the effect of the geometric distortion on offsets as small as one arcsecond, can make interlacing impossible.

Another simple linear technique for combining shifted images, descriptively named "shift-and-add", has been used for many years to combine dithered infrared data on a finer grid. In this method, the data are block replicated onto a finer grid, shifted into place, typically using only integer shifts, and added to the output image. However, it is difficult to use shift-and-add in the presence of missing data (e.g. from cosmic-rays) and geometric distortion. Furthermore, shift-and-add again convolves the image with the "fat" pixel, causing an additional loss of resolution.

In the presence of small shifts, where geometric distortion is not significant, one can use Richardson-Lucy Bayesian image restoration, which is incorporated in STSDAS through the task acoadd, written by Richard Hook and Leon Lucy. This non-linear image restoration method may already be familiar to observers, as it was a popular means of image restoration used in reducing WFPC1 images.

However, in addition to being unable to handle large dithers, the present implementation of this technique is limited by typical computing capabilities to combining either small regions of many images, or the entire image of only a few dithers. Furthermore, the present task cannot accommodate the changing shape of the PSF across the WFPC field of view, and Richardson-Lucy deconvolution, like all non-linear techniques, produces final images whose noise properties are difficult to quantify. In particular, this method of image restoration has a strong tendency to "clump" noise into the shape of the input PSF.

For purposes of combining the dithered images of the Hubble Deep Field, Andy Fruchter and Richard Hook developed a new technique for the linear combination of images known formally as variable-pixel linear reconstruction and informally as drizzling. Drizzling can be thought of as a continuous set of linear functions that vary smoothly from the optimum linear combination technique -- interlacing -- to the old-standby, shift-and-add. The degree to which one must depart from interlacing and move towards shift-and-add is determined by the nature of the input data. Drizzling naturally handles both missing data and geometric distortion, and can largely remove the effect on photometry produced by the geometric distortion of the WFPC camera. The code is now available directly from a site on the Web: and is incorporated into a new STSDAS package, "dither", which is under development at STScI. The dither package also contains tasks for accurately determining the shifts (and rotations) between images. The development version of the dither package is presently only available on computers at STScI, but it is expected that a distributed version will be released in the first half of 1997.

The Drizzle task has now been used by a number of observers to reduce data other than the HDF, and these users have found it to be a relatively simple and powerful means of combining dithered WFPC images. It should arguably be used by any observers who are considering either interlacing or shift-and-add, as both these techniques are easily implemented by the drizzle software. A "poster paper" which describes the drizzling algorithm and its effects on WFPC2 data can be found at:

Removal of pixel defects and cosmic rays from dithered data:

By far the simplest way to remove cosmic rays from dithered data is to obtain several exposures of similar length at each of the dither pointings and remove the cosmic rays from these pointings separately using standard cosmic ray removal techniques, such as the WFPC task CRREJ. However, such a procedure requires a larger number of exposures than is practical for many observing programs.

While in theory there is sufficient information in a set of well-dithered WFPC2 images without repeated exposures at each pointing to both remove cosmic rays and reconstruct the image, at present there is no supported software to accomplish this task. However, significant progress has been made in adapting drizzling to this need. An example of a deep high latitude field from which cosmic rays have been "dynamically" eliminated using drizzling can be found on the above mentioned poster paper web page. Observers are cautioned, however, that studies of the effect of this procedure on stellar photometry are only just beginning. Therefore, the WFPC2 group cannot at this time guarantee the availability of software appropriate for the removal of cosmic rays from dithered data without duplicate pointings. Nonetheless, users wishing to undertake such observations should follow these minimum guidelines:

Users should also be aware that the software under development for the removal of cosmic rays in multiply dithered data is CPU and disk intensive. In addition, an inexperienced user should expect to spend several more days reducing a field that has been dithered without repeated pointings compared to an equal amount of data that has not been dithered.

Finding further information:

The HST Data Handbook (v. 2) provides a good basic introduction to dithering. However the article was written while drizzling was still in the earliest stages of development and is therefore only briefly described. Answers to many common questions about dithering can be found on the WFPC FAQ page by navigating from to the instruments then WFPC2 page.

Useful information on the theory behind dithering and on dithering strategies can be found in articles written by Hans-Martin Adorf and Richard Hook for the ST-ECF newsletter. These may be found at the ECF page:

Dithering NICMOS Observations:

A set of pre-defined patterns has been created for NICMOS to allow an easy implementation of both integer-pixel and sub-pixel dithering. The advantages offered by dithering are the following:

Dithering offers many potential advantages as described above. However, there are a number of disadvantages linked to dithering that an observer should consider before choosing to dither:

Dithering STIS Observations:

The concept of dithering as applied to STIS observations is multifaceted, since STIS can obtain either images or spectra, and since the best method for dithering depends upon the science goals for the observing program. The goal may either be to increase the spatial resolution or to ameliorate uncertainties of pixel-to-pixel sensitivity with respect to the reference flat fields.

STIS Imaging:

Observers can ameliorate the effect of flat-field uncertainties (particularly for the MAMA detectors) by using a small step pattern with integral pixel shifts. This stepping, or dithering, effectively smoothes the detector response over the number of steps, achieving a reduction of pixel-to-pixel non-uniformity by the square root of the number of steps, assuming the pixel-to-pixel deviations are uncorrelated on the scale of the steps. This approach will require sufficient signal-to-noise to allow image registration.

Alternatively, one may improve the spatial resolution somewhat with a dither pattern that includes sub-pixel shifts. Images obtained with the STIS CCD have nearly the same spatial scale as the WFPC-2 PC camera, so that the gain in spatial resolution would be similar. The spatial scale of MAMA images is half that of the CCDs (although the central wavelength of the bandpass is also shorter), so the gain in spatial resolution from dithering MAMA images will be more modest, and probably unnecessary. It is important to realize that the focus varies across the field of view for STIS imaging modes, with the optical performance degrading by $\sim$30\% at the edges of the field of view. Thus, the achievable spatial resolution will be compromised in those regions.

Whether or not the dither pattern includes sub-pixel shifts, the effects on CCDs of bad columns, hot pixels, etc., can be reduced or eliminated if the dither pattern is greater than a few pixels. While it is possible to detect and reject cosmic rays when combining individually dithered CCD images, this is not the best strategy for STIS. The STIS CCDs have lower read noise and readout time overheads than those in WFPC-2, so the best and most reliable cosmic ray rejection strategy is to obtain multiple CRSPLIT images at each dither position. This approach will simplify the data reduction.

See the WFPC2 section above for discussion of data analysis and available software for handling dithered data.

STIS Spectroscopy:

Dither patterns can be used with STIS spectroscopic modes for three purposes: to average over pixel-to-pixel flat-field uncertainties, to map out a two-dimensional region of the sky by stepping perpendicular to the spatial axis of the slit, and to subsample the line spread function by stepping a fraction of a pixel perpendicular to the spatial axis of the slit (i.e., along the dispersion direction).

In first order modes, improved S/N ratios can be achieved by stepping the target along the slit, taking separate exposures at each location. These separate exposures will subsequently be shifted and added in post-observation data processing. This stepping, or dithering, effectively smoothes the detector response over the number of steps, in a manner analogous to that for imaging. For echelle modes, stepping is only possible using the long echelle slit (6x0.2 arcseconds). Note that in the high dispersion echelle modes the Doppler shifting due to spacecraft motion will effectively cause the counts from any output pixel to have been sampled at many independent detector pixels (for exposures comparable to an orbit visibility period and targets well away from the orbital pole of HST).

In slit-less or wide-slit mode, stepping along the dispersion would allow independent solutions for spectrum and flat-field, but at a cost of lower spectral resolution. This technique is not likely to be useful unless the constituent spectra have a good S/N ratio (perhaps 10 or better), so that the shifts between spectra can be accurately determined. A variation on this technique involves using one of the available-but-unsupported contingent of "fpsplit" slits. These slits are designed to allow the wavelength projection of the spectrum on the detector to be shifted such that the fixed-pattern noise in the flat-field and the spectral flux distribution of the target can be computed simultaneously using techniques that have been successfully applied to data taken with GHRS. Note that this approach, too, is likely to work well only if the constituent spectra have a good S/N ratio. The performance of the "fpsplit" slits, the techniques for using them, and the ability to execute a shift in wavelength only, have yet to be evaluated. In the echelle modes Doppler smoothing will generally provide for increased S/N, thus lowering the need for fpsplits.

In many configurations the current predicted spectral line FWHM is less than two detector pixels. The realized in-flight line spread functions will depend on the thermal properties of STIS, which have yet to be evaluated, and the final in-orbit alignment. If the realized LSFs are found to be under-sampled, a special program in Cycle 7 will be initiated to determine the optimal observing strategy for those programs which require critical sampling. Possible solutions include stepping the target in the dispersion in a wide slit or slit-less aperture to subsample the LSF by displacing the spectrum. This technique can also be used to increase the S/N ratio. Note that in employing this strategy one will have to trade off the benefits of the sampling with the negative impact of increased wings in the LSF when using a wide slit, particularly for MAMA observations. Note that the use of ``high-res" (default) for MAMA observations may provide 15-30\% better sampling, but flat-field variability may make it difficult to realize the benefit, particularly if high S/N ratio spectra are needed.