NIRSpec Background Recommended Strategies
Strategies for removing the sky contamination from JWST NIRSpec observations are provided for 3 observing modes: multi-object spectroscopy, integral field spectroscopy, and fixed slits spectroscopy.
On this page
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 stray light 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.
Pixel-to-pixel 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 that fill the aperture 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 also provide improvements in data quality that are 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 reprocessed 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 strategies* |
---|---|
Fixed slit spectroscopy | 2, 3, 5 points† |
Integral field spectroscopy | 2, 4 points‡ |
Multi-object spectroscopy | 2 shutters 2 points§ 3 shutters 3 points§ 5 shutters 3 points§ or 5 shutters 5 points§ |
* Green options are the recommended ones.
† These choices map to the options for Primary Dither Positions in the FS APT template.
‡ These choices map to the options for Dither Type = 2-POINT-NOD, and 4-POINT-NOD in the IFU APT Template.
§ These choices are obtained using the checkbox Nod in Slitlet in the Pointing Setup section of the NIRSpec MSA Planning Tool 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. "3" or "5" may be selected, corresponding to the central shutter and either the 2 extreme shutters in the slitlet, or all the shutters, respectively.
Words in bold are GUI menus/
panels or data software packages;
bold italics are buttons in GUI
tools or package parameters.
Master background subtraction
The second background subtraction method is based on an independent flux-calibrated 1-D 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 MSA 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 or compact sources, a master background may also be constructed using off-source spaxels. Pipeline processing is not available for this option, but the user may 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.
Master background subtraction may be a viable option whenever there is a large enough area of source-free background to create an accurate estimate of the background spectrum, regardless of the observed scene. This will often require an interactive selection and extraction of the master background spectrum, which is not currently part of pipeline processing. If proper care is taken, the resulting signal to noise of the master background spectrum and background-subtracted source spectrum may be superior to what is achieved using pixel-to-pixel background subtraction. This option may be considered for either in-scene or off-scene background estimation. The resulting SNR will generally increase with the number of background pixels utilized in creating the master background spectrum, though this will of course depend on the S/N and systematics of the background pixels. The accuracy of the extracted master background spectrum will also depend on the uniformity of the background and presence of any contaminating sources in the observed scene.
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 for the IFU On-Target + Off-Target Pointing (formerly "IFU Nod Off Scene"), the IFU On-Target 2-Point Nod (formerly "IFU Nod In Scene"), and (starting with ETC v4.0) the IFU On-Target N-Point Nod (for 4 point nod) strategies. (Starting with ETC v3.0, there is a third IFU strategy, IFU Aperture Photometry). For other NIRSpec observing modes (including FS and MOS), 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 2 exposures, followed by co-addition, is not the same as straight co-addition that is modeled by adding exposures in the ETC. Second, from N = 3 nods and upwards, the pipeline uses N-1 measurements for background subtraction for each exposure, thereby improving 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 co-addition (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.
In short, the ETC does contain correct strategies for:
- IFU, 2-point on-target + off-target nod
- IFU, 2-point on-target nod
- IFU, 4-point on-target nod
- FS and MOS with no nodding
For all other cases, the signal to noise for background-limited and detector-limited observations must be derived by scaling from these correctly implemented strategies. Table 2 provides scale factors to estimate the S/N for different pixel-to-pixel background subtraction strategies (Column 4, SNRBS-signal ), by scaling from the correctly implemented ETC strategies. For this, we work with the basic unit 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). The SNR1pt can be calculated directly for FS and MOS in the ETC, as the only options do not consider nodding. For the IFU, it can be shown that SNR1pt, from a single exposure with time t, is the same as the signal to noise from a 2-point on-target nod, with 2 exposures each having time t. Hence, we can obtain the basic unit from which to scale to other IFU strategies by performing ETC calculations for the 2-point on-target nod. Finally, it is important to recognize that the correction factors listed in Table 2 are calculated assuming that all nods have the same exposure time and exposure parameters (readout mode and pattern, groups, and integrations).
Table 2. Signal-to-noise ratio scaling with nod strategy for background- and detector-limited observations
Off-scene nodding (IFU Only) | |||
---|---|---|---|
Nod strategy | Obs. mode | ETC correction needed? | SNRBS-signal |
IFU On-Target + Off-Target Nod (1 point on-source, 1 point off-source) | IFU | No | 1/ √2SNR1pt |
In-scene nodding | |||
Nod strategy | Obs. mode | ETC correction needed? | SNRBS-signal |
2 point (2 points on-source) | IFU | No | SNR1pt |
2 point | FS, MOS | No | SNR1pt |
3 point | FS, MOS | Yes | √2 SNR1pt |
4 point | IFU | No | SNR1pt |
5 point | FS, MOS | Yes | √4 SNR1pt |
Here, guidance is provided on how to implement each case in Table 2 in the ETC and APT.
IFU on-target + off-target nod
The IFU on-target + off-target nodding (1 point on-source, 1 point off-source) should be implemented in the ETC with one exposure, selecting the ETC's IFU On-Target + Off-Target Pointing on the Detector Strategy Tab. The noise from the off-target 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-target observation. Users will have to implement a separate off-target observation in APT, which will slightly more than double the time required for the observations. The IFU on-target + off-target nod option is described in more detail in the NIRSpec Dithering Recommended Strategies; it is implemented in APT using a Target Group.
IFU on-target 2-point nod
The IFU on-target 2-point nodding should be implemented in the ETC with one Total Dithers. 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 On-Target 2-Point Nod 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 2 dithers.
IFU on-target 4-point nod
For background- and detector-limited observations, the IFU on-target 4-point nod should be implemented in the ETC by selecting the strategy IFU On-Target N-Point Nod, with the Dither Patterns automatically specified as Default 4 Point Nod. The noise will be calculated correctly from the three nod positions not containing the source. The number of exposures (Total Dithers in the ETC) is still 1, and the groups and integrations specified should be for a single nod position. 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 4 dithers. As noted above, for observations that are limited by the noise on the source, nodding yields the same SNR as dithering.
FS and MOS nodding
The ETC does not implement nodding 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 reprocess 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 will likely use dithered observations within their ETC 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 Total Dithers. 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.
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.
Background-limited observations
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 JWST Background-Limited 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.