NIRSpec Dithering Recommended Strategies

Dithering is the practice of varying the target position within the science aperture, by small-angle maneuvers of the telescope.  It is used to mitigate detector effects, and to improve spatial and/or spectral resolution of the science data.  The strategies to implement dithering in NIRSpec IFU and FS modes are discussed in detail. 

On this page

See also: On NIRSpec dithering options is NIRSpec Dithers and Nods

Dithering is generally used to mitigate detector effects, and to improve spatial and/or spectral resolution of the science data. This is especially important for the NIRSpec IFU observing mode, which produces an undersampled point spread function: the spatial IFU element scale is 0.1′′ while the PSF FWHM is ~0.03"0.16".  Dithering NIRSpec IFU observations is also beneficial for minimizing the influence of open MSA shutters, and the overall leakage signal through the MSA. Dithering in the MOS and FS modes can help remove local background flux and also even out pixel-to-pixel variations.

Naming conventions

There are different offset options offered in the Astronomer's Proposal Tool (APT). The 3 main categories are nods, dithers, and mosaics/target groups.  Examples for each category and their purpose are illustrated in Figure 1. Note that while the different offset options are shown separately in the figure, an observer will often use a combination of 2 or more of them to obtain the best result for their observation. The following cases shown in Figure 1 are available for the IFU mode. Dithering and nod options are available for the FS and the MOS modes as described below. The examples in the figure for the IFU serve as examples for the different dither naming conventions. 

Figure 1. Types of NIRSpec offsets for the IFU

The naming convention for different kinds of offsets, and their main purpose. In general, observations will most likely use a combination of several options. The fixed slits follow a similar convention, where the in-scene nods and dithers are referred to as "Primary Nods/Dithers" and "Subpixel Dithers".

IFU Mode

Nods to enable pixel-level background subtraction 

Observers may need to obtain a background measurement on a blank area of sky to subtract from their target observation. The main sky background contamination at NIRSpec wavelengths is caused by zodical emission. Zodiacal light is variable only as a function of position on the sky (with the highest emission along the ecliptic and the lowest at the poles), but it is stable over time. Both zodiacal and thermal emission are low at wavelengths below 5 μm. The article NIRSpec Background Recommended Strategies may help the user decide if background subtraction is needed. If dedicated measurements of the sky background are needed, they will most likely be taken directly before or after the science observations to save on overheads and slew time. 

In IFU mode, there are 3 ways of performing sky background observations/subtraction: 

  1. The in-scene nod: subtracting both exposures from each other and combining them so that the target (compact or point-source) will have improved S/N and very low background
  2. The off-scene nod: obtaining a second pointing at an empty part of the sky to subtract from the science observation. 
  3. The subtraction of local sky background derived from an "empty" spatial region in the target exposure, or in a set of dithered target exposures.

Words in bold are GUI menus/
panels or data software packages; 
bold italics are buttons in GUI
tools or package parameters.

In the NIRSpec IFU template in APT, the first option can be found in the dither menu, where the observer can choose between a 2-POINT-NOD and a 4-POINT-NOD (see Figure 2). Unless the time allocation prevents it, use of the 4-POINT-NOD nod is always preferred, as it will provide complete correction of detector defects, better spatial sampling, and higher S/N. Conceptually, nods are no different from dithers. However, they involve slightly bigger telescope movements and are therefore designed for a compact source, because the common field of view of all exposures will be rather small. Target acquisition will be needed for nods since the blind pointing error may result in the source close to the edge of the aperture. Nodding would then likely put the source beyond the edge. See the NIRSpec TA Recommended Strategies article for more information. In addition to the larger offsets, observations obtained with a nodding pattern are also treated differently from dithers in the pipeline, i.e., their sky background will be subtracted automatically.

The second option above, the off-scene nod, cannot be chosen in the dither menu of the IFU APT template. To obtain an off-scene sky observation, several steps should be followed:

  • new fixed target position must first be defined in the Targets folder of APT. 
  • Then, the corresponding background target pointing can be selected for a given science target using the Background Target specification on the science target in the Targets folder. 
  • Next, so that the science target and its background pointing are observed together, a new Target Group should be defined in the Targets folder in APT, 
  • The 2 fixed targets should then be added into the Target Group
  • At the observation level (in the observation folder), select the Target Group as the target. 

The 2 targets will then be observed in the same visit provided the offset is less than the visit splitting distance. This is preferable because it saves overheads and helps to avoid grating wheel moves between exposures. The grating wheel positioning is not repeatable such that, if the grating wheel moves between exposures (as it does between visits), the spectra will not return to the exact same position on the detector. In that case, simple pixel-to-pixel subtraction cannot be used in pipeline processing. The calibration must instead follow a "master background" process requiring additional steps to create a background spectrum that must be registered with the target spectra before subtraction.

Alternatively, separate observations for the science target and sky background pointings could be defined and linked with a timing special requirement. That will also require master background processing.

Dithers for better spatial sampling and to mitigate detector/MSA effects

Besides the nods, the observer can also choose a dither pattern from the dither drop-down menu in APT. Dithers are small offsets of the order of the IFU slice width for improved spatial and/or spectral sampling and to mitigate detector effects, the effects of open MSA shutters, and leakage of bright sources and background through the MSA. The NIRSpec IFU dither patterns (e.g., 4-POINT-DITHER, CYCLING, and SPARSE CYCLING, see Figure 2) were designed to also perform sub-spaxel offsets in order to further improve the PSF sampling. 

Mosaics and target groups

The 3rd option of performing an offset with the NIRSpec IFU is to apply a mosaic pattern. APT offers a dedicated menu for this which allows the user to select the size of the pattern (i.e., the number of rows and columns) and the overlap between individual ’tiles.’ This type of offset mainly serves to increase the field of view. Often, mosaics are used in combination with dithers and even off-scene sky observations as described in the previous sections. 

Mosaics are regular patterns. Besides the overlap, and a row and column shift, there is no other flexibility. If the observer desires a more irregular pattern, or if the aim is to cover targets in proximity to each other as shown in Figure 1 (bottom right), one can use a defined Target Group (see above). Targets defined in this way will be grouped into a single visit if they are within the visit splitting distance.

Strategies for selecting dithers in IFU mode

Available dithers/nods and their usage

The available dither patterns for the NIRSpec IFU mode are displayed in Figure 2. They include 6 main patterns and a number of additional options for some of them. Table 1 summarizes the available dither patterns and their usage for the IFU.  

Figure 2. NIRSpec IFU dither patterns

Dither points for all patterns available in the APT. Colored bars indicate the different slices covered by the dither points (the first 9 nine points in the case of the cycle pattern). For each dither pattern, the coverage of an individual spaxel is shown in the upper left. 

Note that the expected 1-σ radial JWST blind pointing accuracy after FGS acquisition (before instrument target acquisition) is determined on-orbit to be 0.10". Depending on the source extent and input positional accuracy, a 3-σ error may result in the target too close to the aperture edge for some of the IFU nods, so target acquisition is recommended for these IFU nodding patterns to work optimally.

Table 1. Available dither patterns and their usage for the IFU 



The IFU is nodded between 2 diagonal points separated by about 2.3", overlapping a portion of the field.

The IFU is nodded between 4 points separated by about 1.6", overlapping a portion of the field.

PurposeTo perform in-scene background subtraction.To perform in-scene background subtraction and to improve spatial and spectral pixel sampling.

When to use

When the target is faint and compact, i.e., it requires subtraction of zodiacal sky background and fits comfortably into the IFU field of view. Under these circumstances, the 4-point nod is nearly always the better choice. 

Must be used with TA.

This is the pattern of choice when the target is faint and compact, requires subtraction of zodiacal sky background, and fits comfortably into the IFU field of view. This pattern will have extra overhead.

Must be used with TA.

Name4-Point-DitherCycling & Sparse Cycling

DescriptionThe IFU is offset between 4 points separated by about 0.4", overlapping a large portion of the field.

The IFU is offset by a set pattern of offsets with a variety of separations.

  • A “cloud” of 60 pointings in different sizes (large, medium, and small).
  • The first 9 pointings resemble a more regular 9-point dither pattern.
  • The user can choose those points in a sequence from start-point to end-point (cycling) or choose specific points in the “cloud” (sparse cycling).

PurposeTo improve spatial and spectral samplingTo obtain optimized spatial and spectral pixel sampling for targets of different sizes 

When to use

This is the pattern of choice when the target is extended, i.e., it (nearly) fills the IFU field of view. Note: for faint extended targets that fill the IFU field of view, additional off-source nodding is required for subtraction of the sky background. 

Can be used without TA.

When more than 4 exposures are required/possible, and ultimate spatial and spectral sampling is beneficial. Note: for faint targets, additional off-source nodding is required for subtraction of the sky background. 

Small or medium-sized cycling patterns can be used without TA.

There is also the option None where no dither is performed; however, it is recommended for most JWST observations to select an appropriate dither pattern.

NIRSpec decision tree in IFU mode

Before choosing a dither pattern, the user should investigate the nature of the source and the scope or priority of the observation. Figure 3 depicts the reasoning that one should follow when preparing observations. The first decision is made on the nature of the source. Depending on whether it is bright or faint, extended or compact, different observing and dither strategies are recommended. We consider a source to be compact if it has a diameter smaller than ~0.2–0.3 arcsec.

Figure 3. NIRSpec IFU decision tree

Decision tree for choosing the right dither pattern for IFU observations. The main decision is made in the nature of the source. Several trade-offs come into play here and are described in the text. 

If the source is faint (i.e., the background is significant relative to the expected surface brightness of the source) and compact, it is always recommended to perform a 4-point nod. This gives adequate spatial and spectral sampling as well as pixel-based background subtraction using empty regions in the field of view. In addition, by using 4 pointings, the likelihood of losing pixels is reduced. If the source is faint but extended, the 4-point dither pattern would be the best choice, in combination with an off-source background pointing.  

For faint sources, it is recommended to use more groups (to create longer integrations up to the recommended  1,500 seconds) and fewer exposures to improve the signal to noise. Therefore, having fewer dither pointings but longer integrations would be a good trade-off in this case. See NIRSpec Detector Recommended Strategies to help determine detector parameters for your science case.

For bright sources, the background subtraction becomes less important, but can still be used in terms of nods if the source is compact.

For bright sources, if the target saturates after a few groups, it is recommended to use many short exposures which make the 60-point cycle the better choice. 

Strategies for selecting dithers in fixed slits mode

Available dithers/nods and their usage

The naming convention for fixed slits spectroscopy dithers deviates from those of the integral field spectroscopy. The so-called primary dithers are effectively nods, in the sense that they enable pixel-based background subtraction. Table 2 summarizes the available dither patterns and their usage for the fixed slits mode. The user can choose between a 2-, 3- and 5-point pattern that 'nods' the source along the slit. This should be the standard procedure, as there are important benefits to placing the spectrum on different detector areas: it allows in-scene background subtraction, as well as improved spatial and spectral pixel sampling, because the slit image on the detector is not perfectly aligned with the pixel grid (i.e., the slit is "tilted’). The optimal number of nod positions depends on the number of exposures needed/possible (more is better). One caveat of this technique is the varying throughput between the individual nod positions due to the uneven slit edges. 

 Table 2. Available dither patterns and their usage for the fixed slits


Primary Dither

(2, 3, or 5 points) 

Sub-Pixel DitherAcross gap SAM

Nodding of the source along the slit

Subpixel moves in spatial and/or spectral direction

Offset executed by selecting the option S200A1 and S200A2  

This is a small-angle maneuver from S200A1 to S200A2


To perform in-scene background subtraction.

To improve spatial and spectral pixel sampling.

To improve spatial and/or spectral pixel sampling.

To bridge the detector gap. 

When to use

Nearly always for point sources, as there are important benefits to placing the spectrum on different detector areas. The optimal number of nod positions depends on the number of exposures needed/possible.

Only in addition to primary dither pattern for point sources. The number of primary nod positions in this case should be increased first before considering subpixel dithers.

May also be used with extended sources where nodding is not appropriate.

Only with high-resolution gratings, and when complete wavelength coverage is needed. Selected dither pattern will be identically repeated in both slits. 

Subpixel dithers in the spectral direction (“across-slit”) are not recommended because they introduce variations in throughput and line spread function (LSF) shape.

Due to the tilt of the fixed slits with respect to the detector columns and rows, and the slight non-alignment of the 2 detectors, primary spatial dithers will improve the spectral sampling “for free”, and without the complications caused by a non-centered source.

NIRSpec decision tree in fixed slits mode

As for the IFU dithers, the nature of the source is the main driver for the decision process for FS dithers shown in Figure 4. For compact (diameter smaller than ~0.2"–0.3") sources one should always use the nods in the primary dithers, with as many positions as possible.  

The number of primary nod positions should be increased before considering subpixel dithers.

For extended sources, the nodding approach to subtract the in-scene background does not work because the science target fills (most of) the aperture, and therefore large telescope movements would cause (parts of) the target to fall out of the slit. In this case, it is recommended to apply subpixel dithers in the spatial direction. Of course, the dual slit dither to obtain complete wavelength coverage in high resolution is always available, regardless of source size. 

Figure 4. NIRSpec fixed slits decision tree

Decision tree for choosing the right dither pattern for FS observations. The main decision is made in the nature of the source. Several trade-offs come into play here and are described in the text. 

Strategies for selecting dithers in MOS mode

NIRSpec MOS Dither and Nod Patterns describes the options for MOS spectroscopy with the MSA. Most MOS planning will use MPT. The MPT Planner article describes how to specify dithers in MPT. Simple MOS spectroscopy observations can instead be defined in the MSA Configuration Editor. The MSA Configuration Editor also enables nodding and dithering. The NIRSpec MOS Recommended Strategies article provides additional information about the available dither patterns and dithering strategies in MOS mode. 

Latest updates
    Updated blind pointing accuracy value for Cycle 2

    Updated test for new MPT in APT 2020.1.1
Originally published