MIRI MRS Dedicated Sky Observations

Depending on the science target and dithering scheme, it may be necessary to get a reference sky observation with the medium-resolution spectrometer (MRS) in order to accurately model and subtract the mid-infrared background signal.

On this page

Why would I want background observations for my data?

At mid-infrared wavelengths, the MIRI MRS receives significant background emission from a combination of zodiacal light and telescope thermal emission. This background emission is negligible in channel 1, visible in channel 2 for long exposures, visible in channel 3 for all exposures, and dominant in channel 4 longward of 20 μm where the telescope thermal emission becomes large. This emission component should be subtracted from the science data to avoid biasing the recovered spectra (see, e.g., Figure 1).

Figure 1. MIRI MRS extracted spectra of the bright (K=5) O9V star 10 Lac

MRS observations of 10 Lac demonstrate the difference in extracted spectra with and without background subtraction even in the limit of bright point sources.
MIRI MRS dithered observations of bright point sources can estimate the background emission using sections of the field of view far from the point source. More complex scenes, however, cannot generally rely upon measuring the background automatically from empty regions within the scene. It is therefore recommended that such programs determine the background level using dedicated cotemporal observations of an empty region of the sky nearby their science target. Likewise, dedicated background observations can also be useful for removing some detector artifacts such as variations in the hot/warm pixels (which evolve over time) and coherent striping produced by drifts in the effective detector dark current that are currently not well calibrated by the JWST pipeline (while the pipeline corrects for DC offsets in the dark count rate it cannot compensate for changes in the coherent pattern noise). Such detector systematics are best calibrated using dedicated backgrounds with the same readout ramp length as the science data.

How are backgrounds used in the JWST pipeline?

Background subtraction can be performed at 3 places in the JWST pipeline for MIRI MRS data:

  • The first location, in the calwebb_spec2 stage, can perform direct pixelwise subtraction of a set of dedicated background observations from the science data.  This approach is best for mitigating detector artifacts due to hot pixels, coherent striping from variable dark current, and residual flat field calibration errors.  However, it also relies the most on having good SNR in the background observations comparable to the science observations. This step is not performed by the default pipeline and must be explicitly called by users in offline reprocessing.

  • The second location, in the calwebb_spec3 stage, performs a model-based master background subtraction of the data using dedicated background observations associated with the science observations. One-dimensional spectra are extracted using a sigma-clipped mean algorithm applied across the dedicated background fields at each wavelength in order to construct a one-dimensional background model. This spectral model is then broadcast back to detector space and subtracted from the science data prior to constructing the final dithered data cube. This approach is best for optimizing SNR for the majority of science use cases as the effective depth of the background observations is improved by the sigma-clipped mean applied throughout the field of view. However, it is also the method least equipped to handle coherent detector artifacts or flat fielding errors. This is the default approach used by the JWST operational pipeline, and is the only means of obtaining background-subtracted data cubes. As such, it relies upon having dedicated background observations unless overridden by a user and passed a one-dimensional background model to use.

  • The third location, in the 1-d spectral extraction step at the end of calwebb_spec3 implements a classical annular background subtraction approach when performing aperture-based extraction of objects flagged as point sources from the final IFU data cubes. This is the default background subtraction method used for observations of point sources obtained with the MRS point-source optimized dither pattern. This is thus the "minimal" approach to background subtraction in which only the 1-D extracted spectra (but not the 3-D data cubes from which they are derived) are corrected for background emission. Note, however, that this approach can suffer from multiple known issues affecting the astrometry of the final data products, potentially resulting in both the extraction aperture and background annulus being centered at the wrong location.

Experience with on-sky data obtained during commissioning and early Cycle 1 observations has indicated that it is also possible to achieve somewhat better performance using a hybrid approach to the dedicated background data (see Pontopiddan et al. 2022). Rather than directly subtracting the individual pixels of the background observations from the science data, in some cases it is possible to compute a running detector column-based mean across the background observations in order to measure the temporal detector pattern noise and subtract these mean values from the corresponding columns in the science data. This significantly improves the SNR of such a correction, but does not address any other kinds of coherent pattern artifacts. Similarly, an updated bad/hot pixel mask can easily be constructed from dedicated background observations and applied to the science data. Neither of these 2 techniques is currently implemented in the JWST pipeline, although there are ongoing efforts studying the relative performance of these and other calibration approaches.

We note that all of these background subtraction methods are complicated by the presence of large-scale cosmic ray "showers."  These cosmic ray events are highly variable and their detailed origin is unknown; some science programs are completely unaffected while in other programs these showers cover tens to hundreds of pixels on the detector and can persist over multiple integrations. These artifacts can manifest as coherent pattern noise in composite data cubes since they cover entire slices for a large range of wavelengths, adding noise to model-based backgrounds and at times rendering pixel-based backgrounds impractical.  While these artifacts are at present largely uncorrected by the JWST pipeline, investigations into how to mitigate their impact are underway.

What does this mean for my science program?

The best approach to background subtraction can vary substantially between different science programs and under different observing conditions. Best practice recommendations may also continue to evolve as calibration efforts continue throughout Cycle 1. At the present time, recommended approaches to background subtraction can be summarized as follows:

  • Bright point source observations do not need to take a dedicated background and should use the point source-optimized dither patterns. The pipeline will estimate a background spectrum from an annular region surrounding the nominal point source location and subtract this background when performing 1-D spectral extraction on the composite data cube.

  • Faint point sources or bright point sources surrounded by extended emission should consider obtaining a dedicated background with detector readout parameters (i.e., Ngroups) equal to that used for the science exposures. Such a dedicated background will be required for the pipeline to automatically background-subtract the data cubes, as the extended emission or wings of the central PSF might otherwise bias the estimated background level. This background can also be used to subtract out detector pattern noise  that might make identification of faint astrophysical features more challenging, either through direct image subtraction or application of statistical averaging techniques calibrated against the background data. Likewise, hot pixels not flagged by the pipeline can be easily identified in offline analysis using the background data.

  • Bright extended sources should take a dedicated background with Ngroups equal to that used for the science exposures. This is necessary in order for the pipeline to be able to subtract the thermal+zodiacal signal when constructing the final data cubes.

  • Faint extended sources should take dedicated backgrounds with Ngroups equal to that used for the science exposures and a total exposure depth comparable to that used for the science data. This is to both improve the correction of detector-level artifacts and to allow the use of direct pixel-minus-pixel background subtraction if desired at longer wavelengths (where flat field errors can be more impactful given the higher thermal background).  Such pixel-based background subtraction has resulted in improved performance for some Cycle 1 programs targeting extremely faint extended sources in cases where the cosmic ray showers are not too severe.

How to obtain a sky background

Dedicated background observations should be obtained using the offset background option in the Astronomer's Proposal Tool (APT).

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

The checkbox on the APT MRS template within APT (in the Fixed Targets form) is used to specify that the object requires a companion background observation and allows the user to select a sky target from the target list. This sky target may be created in the usual manner as if it were an astronomical object, should be specified as an Extended source, and should have an observation of its own (note that Acq Target should be set to NONE in the observation form for dedicated background observations). Background observations should have the same number of groups per integration as the science observations in order to ensure similar detector readout systematics between the two.

In the Special Requirements section of the APT science target observation form, the science target and background target observations should then be linked together as a non-interruptible sequence by grouping the observation timings so that the background is obtained as soon as possible after the last exposure on the target. This linking also ensures that the JWST pipeline recognizes that the background should be applied to the corresponding science data. While there is no maximum allowable offset imposed between the science and background targets, they should generally be within 1–2 arcmin if feasible to ensure that the effective background does not change visibly between science and background targets. Based on experience in commissioning and early Cycle 1 observations, suitable background targets can generally be identified using the APT Aladin interface by identifying regions of sky that the 2MASS and WISE imaging indicate are free of sources.

Dedicated background observations do not need to be dithered if using the model-based master background pipeline method. Programs that wish to use the pixel-based background subtraction method should minimally use a 2-point dither pattern in order to mitigate the effects of bad pixels and cosmic rays.


Pontoppidan, K. et al. 2022, ApJ, 936, 14
The JWST Early Release Observations

Latest updates

  • Significantly revised guidance based on lessons learned during commissioning and early Cycle 1 observations.

    Updated guidance on necessity of dedicated backgrounds
Originally published