NIRSpec Background Recommended Strategies
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.
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 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‡
2 shutters 2 points§
3 shutters 3 points§
5 shutters 3 points§
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 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 (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 off-scene nod
- IFU, 2-point in-scene 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. However, for the IFU, the ETC does not include an option without nodding. Fortunately, 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 in-scene 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 for the 2-point in-scene 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)
ETC correction needed?
IFU nod off-scene
(1 point on source, 1 point off-source)
ETC correction needed?
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 2 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 2-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 4 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 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 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.
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 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.