11.3 Patterns and Dithering
A pattern refers to a series of exposures of a single target taken at slightly different telescope pointings, with the same set of guide stars. For STIS, patterns are commonly used to:
- Dither to decrease the effects of small-scale detector nonuniformity, eliminate hot pixels, and/or increase the spatial resolution (the latter requires sub-pixel stepping) by offsetting the target along a long slit in the spatial direction for spectroscopic observations or by performing a small stepping pattern for imaging or slitless spectroscopic observations (see Section 11.3.5).
- Spectroscopically map out a two-dimensional region of the sky by stepping the slit across the object of interest.
- Spectroscopically subsample the line spread function by stepping a fraction of a pixel along the dispersion direction—see Section 12.6.
In Cycles 9 through 11, patterns were defined and then added to exposures as special requirements. In the APT Orbit Planner, this approach was replaced by the use of pattern containers. The observer selects a pattern (or constructs a composite pattern) from a list of generic and instrument-specific patterns and then defines one or more pattern containers which use this selected pattern. The exposures to be dithered are then put into these containers.
The pre-defined STIS patterns have a number of adjustable parameters. All patterns allow the Point_Spacing
, which is given in units of arcseconds, as well as the Pattern_Orient
, given in units of degrees, to be adjusted by the observer. Specifying Center_Pattern
=
YES
, will cause the pattern as a whole to be centered at the specified coordinates; otherwise, the given coordinates will apply to the first point in the pattern.
A full description of all patterns, including illustrations and a list of all adjustable parameters and default values for each pattern type, are given in the HST Phase II
Proposal Instructions. Additional examples and advice are given in the Dither Handbook, the online drizzlepac documentation, The DrizzlePac Handbook (Hoffmann et al. 2021), and the other references listed at the end of this section.
11.3.1 STIS Imaging Patterns
STIS-SPIRAL-DITH
can be used to make a mosaic of images. It performs a spiral dither pattern, starting at the center and moving outward counterclockwise. For this pattern, both the Number_of_Points
and the Point_Spacing
(in arcseconds) must be specified by the observer.
STIS-CCD-BOX
and STIS-MAMA-BOX
are parallelograms based on the BOX patterns used with WFPC2 and STIS in Cycle 8 to dither images. The default parameters for these two patterns give offsets in integer numbers of pixels along the X-axis and Y-axis, which can be used, for example, to dither hot pixels. By dividing the default point spacing by 2, one can achieve half-pixel shifts in each coordinate to improve spatial sampling.
11.3.2 STIS Spectroscopic Patterns
STIS-ALONG-SLIT
, which steps the target along the slit, can be used to dither hot pixels (integer pixel steps) or to improve spatial sampling (fractional pixel steps) in spectroscopic images (see Figure 11.7).
STIS-PERP-TO-SLIT
can be used to step the slit across an extended source to map the spectral characteristics of the source (see Figure 11.8). It can also be used to subsample the line spread function by moving a target by fractions of a pixel.
For both of these patterns, the Point_Spacing
(in arcseconds) and the Number_of_Points
must be specified by the observer.
11.3.3 Generic Patterns
Generic patterns, available for all instruments, have been added for flexibility in pattern design. The generic LINE
pattern allows for movement along a line at an arbitrary angle. The generic SPIRAL
pattern is essentially the same as the STIS-SPIRAL-DITH
.
11.3.4 Combining Patterns
In Cycle 9, the ability to combine two patterns was introduced. After selecting a pattern and defining its parameters, one can choose to add a secondary pattern, which is then executed at each point in the primary pattern. The secondary pattern can either be centered on the primary points or it can use the primary points as its initial points. For example, instead of just stepping a slit across an extended target at five points with STIS-PERP-TO-SLIT
, you can add STIS-ALONG-SLIT
with two points to make a 5 × 2 grid of observations. If Center_Pattern=yes
for both patterns, the grid will be centered on the target position. To check that you have specified a pattern correctly, you can display it using the APT.
11.3.5 Dither Strategies
There is no single observing strategy that is entirely satisfactory in all circumstances for STIS. One must consider cosmic rays, hot pixels (pixels with high, time-variable dark current), and spatial undersampling of the image. One strategy that can be used to minimize the effects of undersampling and to reduce the effects of hot pixels is to dither, that is, to offset the telescope between exposures by either integer or sub-pixel steps. The best choice for the number and size of the dithers depends on the amount of time available and the goals of the project. In the following we will address a few issues related to dithering:
- Undersampling of images: Individual images taken with sub-pixel offsets can be combined to form an image with higher spatial resolution than that of the original images. A single dither from the original pixel position, call it (0,0), to one offset by half a pixel in both x and y (0.5,0.5) will produce a gain in spatial information. On the other hand, very little extra information is gained from obtaining more than four positions. Therefore the recommended number of sub-pixel dither positions is between 2 and 4.
- Undersampling of spectral images: The spatial undersampling of compact sources in spectral images becomes apparent after the images are rectified. Interpolation during the rectification process spreads flux from the local peak row of the spectrum into adjacent rows. The result is undulation of the flux level in the individual spectral rows of the rectified image. If the spectrum is nearly horizontal on the detector (which is the case for gratings
G140L
,G230LB
,G230MB
,G430L
, andG750L
), the resulting undulation pattern is broad and irregular. On the other hand, if the spectrum has an appreciable tilt across the detector (as for gratingsG140M
,G230M
,G230L
,G430M
, andG750M
; see e.g., STIS ISR 1998-19), the undulation is quasi-periodic. Two representative cases are shown in Figure 11.9, which displays the flux in the peak row in the rectified image normalized by the total flux for stellar observations taken withG430L
(top) andG750M
(bottom). Note that this effect is inconsequential in most cases: if the source is unresolved, several rows of the spectrum will be extracted to make a single spectrum, eliminating the effect; if the source is sufficiently extended to be well sampled, the undulations will not occur. A problematic situation is encountered when row-by-row spectral analyses are needed of an extended component which is affected by the undulations produced by a compact component (e.g., near the center of a galaxy containing an active nucleus). For example, kinematic measurements of spatially extended emission or absorption lines can be affected in cases where a compact continuum component produces a baseline that fluctuates rapidly across the spectral lines of interest. The amplitude of the fluctuations can be reduced by using the Python tool wx2d instead of x2d. (See STIS ISR 2007-04, but note that this references the PYRAF version of the tool.) To obtain substantially greater improvement, one must combine data dithered by a non-integer number of pixels along the slit, (e.g., N+0.5 pixels), but be aware that spectroscopic data are not supported by AstroDrizzle.
- Hot Pixels in CCD Data: There are three ways to deal with hot pixels: (1) Correct them using superdarks constructed from darks taken on the day of the observation. These can be created using stistools weekdark (similar to the previously recommended task daydark in STSDAS). (2) Dither by an integer number of pixels. Dithered images can be combined with AstroDrizzle; dithered spectral images can be aligned with the Python tool sshift before being combined with ocrreject. If three or more exposures are obtained, cold pixels that produce low fluxes can be rejected (e.g., with mscombine, which allows rejection of low fluxes as well as high fluxes). Alternatively, anomalously low fluxes can be set to very high values (e.g., as previously done with imrepl); they can then be rejected by ocrreject like hot pixels or cosmic rays. (3) Use a task such as STSDAS warmpix (no longer supported) to filter out the known hot pixels. Hot pixels are flagged in the data quality array during dark subtraction and propagate through to the output images.
- Hot Pixels in MAMA data: The MAMA detectors show few hot pixels and they appear to evolve slowly, thus they are usually not an issue. Nevertheless, dithering is an easy way to avoid them, and there is no read noise or cosmic-ray removal penalty for doing so.
- Cosmic Rays: Cosmic rays in the raw CCD images are most easily removed by running ocrreject on
CR-SPLIT
exposures. At least two exposures are needed, but more are recommended, especially for longer exposures where the possibility of cosmic ray coincidence in two exposures is greater. For spectroscopic observations, integer pixel dithers along the slit are recommended to aid in the rejection of hot and cold pixels along with cosmic rays, as discussed above. For imaging observations, dithered exposures are recommended for the same reasons, but will have to be combined with a task like AstroDrizzle, a more resource-intensive and time-consuming process. - Dithering Spectroscopic Observations: In the case of spectroscopic observations, extra care should be taken in choosing the optimum dither strategy, which depends on the spatial extent of the extractions and the nature of the science target. However, beware that dithering spectroscopic observations will only be useful if your exposure times are long enough, especially for CCD spectra that can become severely read noise limited (see Section 7.3.4).
- Spectra of Point Sources: 1-D first-order spectra of point sources are usually extracted over 7 spatial pixels for the CCD, 11 spatial pixels for the MAMAs (during STIS pipeline processing). Hence, the effect of hot pixels is exacerbated compared to the case of imaging observations. The best practice is to dither the target by an offset large enough to avoid having the same hot pixels fall in the individual extracted spectra. This means that you should move the spectrum by more than 0.35 arcseconds (for a 7 pixel CCD extraction) along the slit between dither positions. Exposures with integer pixel shifts can be aligned with sshift. A pair of dithered exposures is preferable to a
CR-SPLIT=2
exposure, but more exposures (e.g.,CR-SPLIT
dithered exposures) will provide better cosmic ray rejection, especially for long exposure times. - Spectra of Extended Sources: For extended sources, one should consider the spatial size of the extractions to be made during post-observation analysis, or whether rectified spectral images will be analyzed instead of extracted spectra. To enable a proper rejection of hot pixels within broad extractions, the telescope move between dithers should be larger than the spatial size of the extractions made. If a spectral image is to be analyzed, and the region of interest is at or near a sharp peak in the surface brightness distribution, one should consider dithering by a non-integer number of pixels to deal with the undulation issue due to undersampling (see above).
- Dithering of Echelle Observations: Because most echelle observations are done using small apertures, many of the dithering strategies recommended for 1st order spectra are not applicable to the echelle modes. However, there are still a number of ways to shift the spectrum on the detector to work around hot pixels or flat-fielding artifacts. For many observers, the simplest way to dither echelle data will be to observe using two or more different CENWAVE settings that each cover the wavelengths of interest; however, wavelengths near the ends of the wavelength ranges will then not be covered by all of the exposures. Another way is the use of
FP-SPLIT
apertures (see Section FP-SPLIT Slits for Echelle Observations), which are displaced along the dispersion direction. And observers using the echelle with a long slit can also dither up and down the length of the aperture. Observers should also remember that there is some overlap between many adjacent echelle orders, so some wavelengths will appear at two different locations in the same spectral image.
- Spectra of Point Sources: 1-D first-order spectra of point sources are usually extracted over 7 spatial pixels for the CCD, 11 spatial pixels for the MAMAs (during STIS pipeline processing). Hence, the effect of hot pixels is exacerbated compared to the case of imaging observations. The best practice is to dither the target by an offset large enough to avoid having the same hot pixels fall in the individual extracted spectra. This means that you should move the spectrum by more than 0.35 arcseconds (for a 7 pixel CCD extraction) along the slit between dither positions. Exposures with integer pixel shifts can be aligned with sshift. A pair of dithered exposures is preferable to a
- Accuracy of Dithering: During the Hubble Deep Field campaign, nearly all dithers were placed to within 10 milliarcsec (mas) (during 1.3 arcsecond offsets and returns separated by multiple days), although in a few cases the dither was off by more than 25 mas, and on one occasion (out of 107 reacquisitions) the telescope locked on a secondary FGS peak – causing the pointing to be off by approximately 1 arcsecond and a field rotation of about 4 arcminutes. The software which was developed for the Hubble Deep Field was able to reconstruct images even for those non-optimal dithers, and still yielded gains in resolution over non-dithered data. Those capabilities are now available in drizzlepac (current successor to the STSDAS dither package), which is based on the variable-pixel linear-reconstruction technique developed by Fruchter and Hook (known as drizzling). STIS imaging data can be drizzled together provided several preparatory steps are taken: updating the WCS with the stwcs.updatewcs routine and accurately aligning the images to sub-pixel accuracy with the drizzlepac.tweakreg routine. For help with combining STIS images, contact the Help Desk.
- Flat-Field Accuracy: For the MAMAs, dithering on scales of several pixels can help to smooth out pixel-to-pixel variations in detector sensitivity. For this purpose it is best to use dither steps that are not integral multiples of half a pixel (the intrinsic high-resolution format of the MAMAs); integral pixel steps should be used instead.
Note that dark and flat-field reference files need to be applied before any shift-and-add procedures. This may require running the usual pipeline calibration in pieces with the combination of the different dither positions inserted in the middle. Once dark subtraction has been done, hot pixels are about as likely to be over-subtracted as under-subtracted in the image. In this case, those pixels should be treated as "cold" pixels (see section on Hot Pixels in CCD Data above).
Be sure to use the correct plate scales when calculating the along-the-slit pixel offsets a given dither size will produce. See Table 14.38 for the pixel scales for each detector and Section 13.2.4 for more information on the header PLATESC
plate scales.
The simplest way to schedule dithers with STIS is to use the patterns STIS-CCD-BOX
or STIS-MAMA-BOX
(four-point parallelogram dithers, centering on fractional pixels to gain spatial resolution) or, for spectroscopic observations that use a long slit, the pattern STIS-ALONG-SLIT
(for linear dithers in the AXIS2
direction, with user-specified offsets). An alternate approach is to use POS-TARG
s.
Note that large dithers will incur small errors due to the camera geometric distortion, which increases toward the CCD corners and alters the image scale by about 1% at the corners. For instance, a 20 pixel offset at the field center will suffer a 0.2 pixel error at the CCD corners. Large dithers may also occasionally require a different set of guide stars for each pointing, thus increasing the overhead for the observations and reducing the expected pointing accuracy.
For related articles on dither strategies, see the following papers (all available through the STScI webpages): A Package for the Reduction of Dithered Undersampled Images (Fruchter et al., in the 1997 HST Calibration Workshop Proceedings), the WFPC2 ISR 98-04, Drizzle: A Method for the Linear Reconstruction of Undersampled Images (Fruchter & Hook 2002, PASP, 114, 144), the Dither Handbook (Koekemoer et al.), the online drizzlepac documentation, and The DrizzlePac Handbook (Hoffmann et al. 2021).
A STIS DrizzlePac Tutorial Jupyter Notebook is now available from the STIS-Notebooks GitHub repository or the STIS Data Analysis & Software Tools webpage. The Notebook includes examples of aligning and combining images from all three STIS detectors using tools from DrizzlePac, as well as an example of using the pixel-based CTI correction code stis_cti on STIS CCD images (see Section 7.3.9). Further details regarding the Notebook can be found in the STIS April 2022 STAN.
-
STIS Instrument Handbook
- • Acknowledgments
- Chapter 1: Introduction
-
Chapter 2: Special Considerations for Cycle 32
- • 2.1 STIS Repair and Return to Operations
- • 2.2 Summary of STIS Performance Changes Since 2004
- • 2.3 New Capabilities for Cycle 32
- • 2.4 Use of Available-but-Unsupported Capabilities
- • 2.5 Choosing Between COS and STIS
- • 2.6 Scheduling Efficiency and Visit Orbit Limits
- • 2.7 MAMA Scheduling Policies
- • 2.8 Prime and Parallel Observing: MAMA Bright-Object Constraints
- • 2.9 STIS Snapshot Program Policies
- Chapter 3: STIS Capabilities, Design, Operations, and Observations
- Chapter 4: Spectroscopy
- Chapter 5: Imaging
- Chapter 6: Exposure Time Calculations
- Chapter 7: Feasibility and Detector Performance
-
Chapter 8: Target Acquisition
- • 8.1 Introduction
- • 8.2 STIS Onboard CCD Target Acquisitions - ACQ
- • 8.3 Onboard Target Acquisition Peakups - ACQ PEAK
- • 8.4 Determining Coordinates in the International Celestial Reference System (ICRS) Reference Frame
- • 8.5 Acquisition Examples
- • 8.6 STIS Post-Observation Target Acquisition Analysis
- Chapter 9: Overheads and Orbit-Time Determination
- Chapter 10: Summary and Checklist
- Chapter 11: Data Taking
-
Chapter 12: Special Uses of STIS
- • 12.1 Slitless First-Order Spectroscopy
- • 12.2 Long-Slit Echelle Spectroscopy
- • 12.3 Time-Resolved Observations
- • 12.4 Observing Too-Bright Objects with STIS
- • 12.5 High Signal-to-Noise Ratio Observations
- • 12.6 Improving the Sampling of the Line Spread Function
- • 12.7 Considerations for Observing Planetary Targets
- • 12.8 Special Considerations for Extended Targets
- • 12.9 Parallel Observing with STIS
- • 12.10 Coronagraphic Spectroscopy
- • 12.11 Coronagraphic Imaging - 50CORON
- • 12.12 Spatial Scans with the STIS CCD
-
Chapter 13: Spectroscopic Reference Material
- • 13.1 Introduction
- • 13.2 Using the Information in this Chapter
-
13.3 Gratings
- • First-Order Grating G750L
- • First-Order Grating G750M
- • First-Order Grating G430L
- • First-Order Grating G430M
- • First-Order Grating G230LB
- • Comparison of G230LB and G230L
- • First-Order Grating G230MB
- • Comparison of G230MB and G230M
- • First-Order Grating G230L
- • First-Order Grating G230M
- • First-Order Grating G140L
- • First-Order Grating G140M
- • Echelle Grating E230M
- • Echelle Grating E230H
- • Echelle Grating E140M
- • Echelle Grating E140H
- • PRISM
- • PRISM Wavelength Relationship
-
13.4 Apertures
- • 52X0.05 Aperture
- • 52X0.05E1 and 52X0.05D1 Pseudo-Apertures
- • 52X0.1 Aperture
- • 52X0.1E1 and 52X0.1D1 Pseudo-Apertures
- • 52X0.2 Aperture
- • 52X0.2E1, 52X0.2E2, and 52X0.2D1 Pseudo-Apertures
- • 52X0.5 Aperture
- • 52X0.5E1, 52X0.5E2, and 52X0.5D1 Pseudo-Apertures
- • 52X2 Aperture
- • 52X2E1, 52X2E2, and 52X2D1 Pseudo-Apertures
- • 52X0.2F1 Aperture
- • 0.2X0.06 Aperture
- • 0.2X0.2 Aperture
- • 0.2X0.09 Aperture
- • 6X0.2 Aperture
- • 0.1X0.03 Aperture
- • FP-SPLIT Slits 0.2X0.06FP(A-E) Apertures
- • FP-SPLIT Slits 0.2X0.2FP(A-E) Apertures
- • 31X0.05ND(A-C) Apertures
- • 0.2X0.05ND Aperture
- • 0.3X0.05ND Aperture
- • F25NDQ Aperture
- 13.5 Spatial Profiles
- 13.6 Line Spread Functions
- • 13.7 Spectral Purity, Order Confusion, and Peculiarities
- • 13.8 MAMA Spectroscopic Bright Object Limits
-
Chapter 14: Imaging Reference Material
- • 14.1 Introduction
- • 14.2 Using the Information in this Chapter
- 14.3 CCD
- 14.4 NUV-MAMA
-
14.5 FUV-MAMA
- • 25MAMA - FUV-MAMA, Clear
- • 25MAMAD1 - FUV-MAMA Pseudo-Aperture
- • F25ND3 - FUV-MAMA
- • F25ND5 - FUV-MAMA
- • F25NDQ - FUV-MAMA
- • F25QTZ - FUV-MAMA, Longpass
- • F25QTZD1 - FUV-MAMA, Longpass Pseudo-Aperture
- • F25SRF2 - FUV-MAMA, Longpass
- • F25SRF2D1 - FUV-MAMA, Longpass Pseudo-Aperture
- • F25LYA - FUV-MAMA, Lyman-alpha
- • 14.6 Image Mode Geometric Distortion
- • 14.7 Spatial Dependence of the STIS PSF
- • 14.8 MAMA Imaging Bright Object Limits
- Chapter 15: Overview of Pipeline Calibration
- Chapter 16: Accuracies
-
Chapter 17: Calibration Status and Plans
- • 17.1 Introduction
- • 17.2 Ground Testing and Calibration
- • 17.3 STIS Installation and Verification (SMOV2)
- • 17.4 Cycle 7 Calibration
- • 17.5 Cycle 8 Calibration
- • 17.6 Cycle 9 Calibration
- • 17.7 Cycle 10 Calibration
- • 17.8 Cycle 11 Calibration
- • 17.9 Cycle 12 Calibration
- • 17.10 SM4 and SMOV4 Calibration
- • 17.11 Cycle 17 Calibration Plan
- • 17.12 Cycle 18 Calibration Plan
- • 17.13 Cycle 19 Calibration Plan
- • 17.14 Cycle 20 Calibration Plan
- • 17.15 Cycle 21 Calibration Plan
- • 17.16 Cycle 22 Calibration Plan
- • 17.17 Cycle 23 Calibration Plan
- • 17.18 Cycle 24 Calibration Plan
- • 17.19 Cycle 25 Calibration Plan
- • 17.20 Cycle 26 Calibration Plan
- • 17.21 Cycle 27 Calibration Plan
- • 17.22 Cycle 28 Calibration Plan
- • 17.23 Cycle 29 Calibration Plan
- • 17.24 Cycle 30 Calibration Plan
- • 17.25 Cycle 31 Calibration Plan
- Appendix A: Available-But-Unsupported Spectroscopic Capabilities
- • Glossary