NIRSpec Background Recommended Strategies
Strategies for removing the sky contamination from JWST NIRSpec observations are provided for three observing modes: multi-object spectroscopy, integral field spectroscopy, and fixed slits spectroscopy.
A large fraction of NIRSpec observations are detector noise-limited, while spectroscopy with the prism, as well as verification and confirmation images, may be dominated by the background noise at certain wavelengths.
The main background components that affect NIRSpec observations are:
- The in-field sky radiance, contributed by the zodiacal cloud of the Solar System and the Milky Way.
- The straylight from the out-of-field sky.
These contributions are extensively described in the JWST Background Model article.
Other signal components may affect NIRSpec observations in IFU and MOS mode, such as light through individual MSA failed open shutters, and the cumulative ″leakage″ signal caused by the closed MSA shutters which are not completely opaque to sky illumination. A description of the MSA flux leakage problem is presented in the article NIRSpec Micro-Shutter Assembly and a procedure on how to perform a correction for an IFU observation is described in the NIRSpec MSA Leakage Correction for IFU Observations article.
Background removal strategies
Not all NIRspec observations require background subtraction. Bright objects may have surface brightness in the NIRSpec bands that is significantly brighter than the surface brightness in the JWST Background Model at 1 - 5 μm. In that case, if the background is clearly negligible, it may not be necessary to subtract it. Note that pixel-to-pixel background subtraction (nodding) itself adds noise.
Two background subtraction strategies are possible for NIRSpec observations; pixel-to-pixel subtraction and master background subtraction.
The first background subtraction method is the pixel-to-pixel subtraction at count rate level. This method is always performed in practice by nodding, and can be implemented as in-scene or off-scene nods. For sources that are point-like or compact, an in-scene nodding strategy maximizes the on-source exposure time, and thus the signal to noise ratio (SNR). Several in-scene nodding strategies are implemented within the available dither patterns for each observing mode, and the recommended ones are highlighted in Table 1.
For extended sources observed in fixed slit and IFU modes, observing the ″blank sky″ signal at a dedicated off-scene position is recommended. Pixel-to-pixel background subtraction processing will be performed only if the grating wheel has not moved between the target and off-scene associated background exposures. If the grating wheel moved between the target and background exposures (as would be the case if they were in different visits), pipeline processing will follow a more involved "master background" subtraction method described below.
In this article, and all NIRSpec-related documentation, nodding is taken to mean that pixel-by-pixel subtraction is performed in pipeline processing. Dithering implies that a subtraction is not performed. Nods still provide improvements in data quality that is obtained from dithering. Observations that are specified as nodded in APT can be post-processed to skip the pixel-by-pixel subtraction (treating the nods as dithers)-- a strategy which might be advantageous for MOS observations of extended sources. Likewise, dithered data can be re-processed to treat dithers as nods, which may be desired for FS observations, since nodding is not a supported option for this observing mode.
Table 1. Recommended strategies for background subtraction of compact sources
|Observing Mode||Nodding Strategies1|
|Fixed Slit spectroscopy|
2, 3, 5 points2
|Integral Field Spectroscopy|
2, 4 points3
Multi Object Spectroscopy
2 shutters 2 points4
3 shutters 3 points4
5 shutters 3 points4
5 shutters 5 points4
(1) Bold options are the recommended ones.
(2) These choices map to the options for Primary Dither Positions* in the FS APT template.
(3) These choices map to the options for Dither Type = 2-POINT-NOD, and 4-POINT-NOD in the IFU APT Template.
(4) These choices are obtained using the checkbox Nod in Slitlet in the Dither Setup section of the MPT Planner. The number of dithers is set by the default slitlet shape. For the 5-shutter slitlet, there is an option for the number of exposures per configuration. Three or five may be selected, corresponding to the central shutter and either the two extreme shutters in the slitlet, or all the shutters, respectively.
*Bold italics font style is used to indicate parameters, parameter values, and/or special requirements that are set in the APT GUI.
Master background subtraction
The second background subtraction method is based on an independent flux-calibrated 1D background spectrum. For the MOS mode, this master background can be obtained as part of the science observation by designing the MSA configuration to include ″blank sky″ shutters. During pipeline processing, spectra from these background shutters will be extracted and combined into a single background spectrum to be subtracted from the target spectrum. Master background shutters can be added to an existing MSA configuration, or when designing a new MSA configuration, using the Manual Configuration Editor at the Observation level in APT. In the case of high spectral resolution observations, the number and distribution of background shutters needed will depend on the infield background uniformity and the desired combined spectral coverage. In this case, the IRS2 readout mode is highly recommended, to minimize the impact of the 1/f noise in the MSA master background.
For IFU or fixed slit mode observations of point sources, a master background may also be constructed using off-source spaxels. Pipeline processing will likely not be available for this option, but users will be able to extract and create a master background spectrum for self-correction of their target exposures on their own. Additionally, the off-scene nod option discussed above for the IFU and implemented in APT using a Target Group (see NIRSpec Dithering Recommended Strategies), requires this method if the grating wheel moves between the target and background exposures. This is because the grating wheel positioning is not exactly repeatable when returning to the same disperser. However, if the disperser used for the target exposures remains in place for the background exposures, the pixel-to-pixel background subtraction method is performed in the pipeline by default.
How does the SNR scale with the background subtraction strategy?
The background subtraction step with multiple nods is not completely built into the JWST Exposure Time Calculator (ETC).
In the JWST Exposure Time Calculator (ETC) in IFU mode, the SNR is calculated correctly for the "IFU Nod Off Scene", and the 2-point "IFU Nod In Scene" strategies. For other cases, simply adding exposures does not replicate the effect of nodding for background-limited and detector-limited observations. The reason for this discrepancy is two-fold. First, pairwise pixel-to-pixel subtraction of two exposures, followed by coaddition, is not the same as straight coaddition that is modeled by adding exposures in the ETC. Second, when there are N nods, there are N-1 measurements of the background for each exposure. In pipeline processing, the latter condition improves the signal-to noise of the background measurement. Note that for observations of especially bright objects, where the noise is dominated by the noise on the source counts, nodding does yield the same signal-to-noise as coaddition (e.g. dithers) without prior pixel-to-pixel subtraction. Hence, in this case, ETC calculations can be correctly performed by adding exposures for each nod. (However, as noted above, in these cases, it is worth considering whether background subtraction is necessary at all.) It is possible to estimate whether observations are in the detector-limited, background-limited, or object-noise-limited regime using the ETC.
For background- and detector-limited observations, it is straightforward to scale the signal-to-noise from the ETC outputs. Table 2 provides corrections for the different pixel-to-pixel background subtraction strategies (Column 5, SNRBS-signal ). Corrections are expressed in terms of SNR1pt, which is the S/N obtained for a single pointing with no nodding, and a (hypothetical) noise-free background subtraction. (Note that noise from the background in the science aperture still contributes). It can be shown that SNR1pt, from a single exposure with time t, is the same as the SNR from a two point nod, with two exposures each having time t. Clearly, if background-subtraction via nodding is not needed, it should be avoided, because will take twice as long to achieve the same SNR with in-scene nodding as with no nodding.
Here, we provide guidance on how to implement each case in Table 2 in the ETC and APT.
IFU Nod Off Scene
The IFU off scene nodding should be implemented in the ETC with one exposure. The noise from the off-scene nod exposure will be accounted for correctly, regardless of whether the observation is background, detector, or source-noise limited. The SNR reported from the ETC will not need to be corrected. However, the total time for the strategy reported by the ETC is only for the on-scene observation. Users will have to implement a separate off-scene observation in APT, which will slightly more than double the time required for the observations. The off-scene nod option is described in more detail in the NIRSpec Dithering Recommended Strategies; it is implemented in APT using a Target Group.
IFU 2-point Nod In Scene
The IFU 2-point in scene nodding should be implemented in the ETC with one exposure. The noise will be calculated correctly, regardless of whether the observation is background, detector, or source-noise limited, so a correction is not needed. In this case, selecting the ETC's "IFU Nod In Scene" on the "Detector Strategy Tab" will double the number of exposures to show the correct total exposure time. In APT, this strategy is implemented by selecting "2-point nod" under Dither Type, and entering the number of Groups and Integrations desired per nod. APT's exposure table will show two dithers.
IFU 4-point Nod In Scene
For background- and detector-limited observations, the IFU 4-point in-scene nod should be implemented in the ETC as a 2-point in scene nod. The number of exposures is still one, and the groups and integrations specified should be for a single nod position. Then, to scale to the 4 point nod, the total exposure time will be twice what is reported by the ETC (2 times the two-point nod time), and the achieved SNR will be √3 higher (see Table 2). In APT, this strategy is implemented by selecting 4-point nod under Dither Type, and entering the number of Groups and Integrations desired per nod. APT's exposure table will show four dithers. As noted above, for observations that are limited by the noise on the source, nodding yields the same SNR dithering, so the 4-point in-scene nod can be calculated in the ETC by choosing 2 exposures and a 2-point in-scene nod (4 total exposures).
FS and MOS Nodding
The ETC does not implement nodding at all for FS and MOS observations. Hence, the available Aperture Spectral Extraction and MSA Full Shutter Extraction (MOS only) can be taken to correspond to SNR1pt in Table 2. In these cases, when observations are background or detector limited, the SNR should be calculated for a single nod point (one exposure) and scaled according to Table 2. In the ETC strategy tab, the background subtraction should be implemented with the noiseless sky background option, since the noise from the pixel-by-pixel background subtraction will be accounted for by the scalings in Table 2. Since the ETC calculation is being done for only a single nod, the total exposure time for the strategy will be 2, 3, 4, or 5 times the total exposure time given in the ETC. As with the IFU template, the number of groups and integrations are entered in APT per nod, and the total time for the whole strategy will be determined by specifying the desired nod/dither pattern. For MOS observations generated using the MSA Planning Tool (MPT) the number of nods are specified in the dither setup section of the Planner tab. Note that the FS supports dithering, but not nodding, both in APT and pipeline processing. However, users can always re-process observations to treat the FS dithers as nods. Finally, as with the other cases, if the observations are limited by the noise on the source counts, then the number of nods can be entered as the number of exposures in the ETC, and no scaling is required.
Nodding and Dithering combined
In some cases nodding and dithering will be used together. For example, MOS observations may use in-slitlet nodding to subtract the background, and a larger dither to obtain continuous wavelength coverage over the chip gap. Or, alternatively, IFU observers should use dithered observations of their scene, even when they are choosing an off-scene background. In these cases, the dithers, but not nods, should be added in the ETC as exposures. The ETC output SNR can still be interpreted as SNR1pt in Table 2, so that a single nod-point can be scaled to the SNR and exposure time of multiple nods.
Table 2. Signal-to-noise ratio scaling with nod strategy for background- and detector-limited observations
Off-scene nodding (IFU Only)
ETC correction needed?
IFU Nod Off Scene
(1 point on source, 1 point off-source)
ETC correction needed?
Dedicated background observations
For a given position on the sky, the background signal is time-variable throughout the year, driven by the seasonal variability of the zodiacal cloud.
To reliably measure the background signal with dedicated sky exposures in the case of extended objects, it is recommended to link observations or visits in a NON-INTERRUPTIBLE manner using APT TIMING special requirements.
For background-limited observations, independently of the background subtraction strategy, it is important to evaluate how the background varies throughout the year, potentially affecting when that observation is being best scheduled to minimize the background noise.
The Background-Limited JWST Observations article provides a technique to assess the impact of seasonal variations at a given sky position using the ETC. The user can ensure low background levels by using the APT BACKGROUND-LIMITED special requirement.