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:
- Some resolution lost due to sampling by pixels that are not small compared to the point spread function, or spectral resolution element can be recovered through independent exposures with sub-pixel offsets.
- The effects of bad pixels can be removed, and pixel-to-pixel errors in flat-fielding averaged out, thus allowing a higher signal-to-noise by combining data taken with integer pixel offsets.
In general, dithering incurs the following costs or drawbacks:
- Elimination of cosmic rays may be compromised, especially if using only a few sub-pixel offsets.
- Obtaining the final, combined data product will require special reductions and thus more work on your part.
- Some extra spacecraft overhead time will be incurred, you will need to judge whether this is significant through testing with RPS2.
- If the primary science goal is to measure differential changes over time, as in time-series photometry dithering would increase the resulting noise level.
- Use of dithering will sometimes make it more difficult to obtain parallel science observations. In the case of using the special DITHER options with WFPC2 the implied spatial scans simply preclude other instruments being used in parallel.
- Rapid dithering can impose additional load on the full system both in terms of command volume needed to execute the observations and in the volume of resulting data that must be processed through the pipeline. In extreme cases these extra loads can result in lowered overall efficiency of HST observations.
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: www.stsci.edu/~fruchter/dither/dither.html 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
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:
- Obtain at least six different sub-pixel pointings in all cases.
- If the individual exposures are longer than 1000s and removal of nearly all cosmic-ray-affected pixels is required then take at least 9 to 12 exposures, with the latter being appropriate for individual exposures approaching or exceeding 1800s.
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 http://www.stsci.edu 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:
- Photometric accuracy: the effects of large-scale flat-field variations and of bad-pixels can be controlled via integer-pixel dithering. In addition, for relatively bright objects, dithering can eliminate potential problems of image persistence. Geometric distortion in NICMOS is expected to be minimal, we recommend dither steps of 10 pixels (for point sources). The SPIRAL-DITH pattern can be used to generate dither patterns with 2 positions or more.
- Improve sampling: NIC3 and the shortest wavelengths of NIC1 (below 1.0 microns) and NIC2 (below 1.75 microns) undersample the image. As in the case of WFPC2, the quality of the image can be improved by sub-pixel dithering. Most of the information can be recovered via two dither positions, (0,0) and (m+1/2,n+1/2), where n and m are arbitrary integers. Virtually all the information can be recovered with four dither positions, (0,0), (0,n+1/2), (n+1/2,n+1/2), (n+1/2,0). Since NICMOS is not expected to have geometric distortions, large dither steps, e.g. n=10 pixels, can be used. Telescope pointing errors, which can be of the order of 0".02, may prevent one from obtaining an optimal dither pattern in NIC1 and NIC2, since the uncertainty corresponds to 0.43 NIC1 pixels and 0.27 NIC2 pixels; in this case more than 4 dither positions are advisable. For NIC3, the telescope pointing uncertainty corresponds to 0.1 pixels shift only, and 4 dither positions should still be viable for recovering the information. The pre-defined SPIRAL-DITH pattern can be effectively used for this purpose.
- Background removal in uncrowded fields of compact objects: Observations with the NICMOS long wavelength filters (central wavelength longward of 1.7 microns) are affected by the telescope (variable) thermal emission. To remove this contribution from the images, suitable background observations must be obtained. For compact targets and uncrowded fields, observations of the background can be obtained by dithering the targets across the detector's FOV. The use of the SPIRAL-DITH pattern with 2 or 4 positions, and a dither step of 10 pixels or more (depending on the size of the targets), may be appropriate for many cases, although the parameters may change according to the nature of the observations. The advantage of dithering in such a case (rather than chopping, see NICMOS update) is that the target will remain on the chip for all observations, increasing the efficiency of the observation.
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:
- Cosmic ray removal is not straightforward in pairs of sub-pixel dithered images. If you plan to use sub-pixel dithering to improve the image sampling, then MULTIACCUM mode or 2 ACCUM mode exposures per position should be obtained to help cosmic ray removal BEFORE image reconstruction.
- NICMOS Attached parallels: the three NICMOS cameras, NIC1, NIC2, and NIC3, have different magnification scales; care should be taken in ensuring that, if integer-pixel steps are desired in attached parallel (NIC1+NIC2) observations, the steps are carefully chosen to satisfy the requirement.
- Overheads: The implementation of patterns requires at least 10-12 seconds overhead per dither step. Large numbers of dithers can easily add up to minutes taken out of a visibility period for an entire pattern. The trade-off between the advantages offered by dithering, and the diminished amount of observing time should be considered in deciding whether or not dither.
- Rapid dithering can impose additional load on the full system in terms of command volume needed to execute the observations, overheads for science data buffer dump management and in the volume of data that must be processed through the pipeline. In extreme cases these extra loads can result in lowered overall efficiency of HST observations.
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.
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.
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.