JWST MIRI LRS Pipeline Caveats
Features and potential caveats specific to MIRI LRS data processing in the JWST Science Calibration Pipeline are described in this article.
On this page
See also: MIRI Low Resolution Spectroscopy
Caveats specific to MIRI LRS data processing in the JWST Science Calibration Pipeline are described below. This article is not intended as a how-to guide or as full documentation of individual pipeline steps, but rather to give a scientist-level overview of any known issues that users should be aware of for their science.
MIRI LRS pipeline
See also: JWST Science Calibration Pipeline Overview, JWST Data Calibration Reference Files, Example Jupyter Notebooks - Running the Pipeline
Software documentation outside JDox: Stage 2 Spectroscopic Pipeline, Calibration Reference Data System
Wavelength calibration for the MIRI LRS was updated in October 2022, after an issue was uncovered in the first Cycle 1 science observations. The LRS mode provides nominal coverage from 5 to 12 µm, with the wavelength decreasing with increasing row number on the detector. The true range extends somewhat beyond these limits in both directions though the data calibration becomes more challenging outside of this nominal range. Between 4 and 5 µm, the dispersion steepens with respect to the detector pixels, making it very challenging to fit a solution; beyond 12 µm, the throughput of the prism drops off strongly, limiting the achievable signal to noise ratio. Plots of the dispersion profiles are shown on the MIRI Filters and Dispersers page.
The calibration pipeline originally used a single reference file to fit the dispersion for fixed slit and slitless data taken with the LRS. However, the dispersion was found to be more strongly variable with position in the field than expected. As the location of the spectra for these 2 modes are in different parts of the detector, separate dispersion solutions are needed for the 2 modes. The difference in dispersion between the 2 modes causes errors of up to 0.5 µm in the wavelength calibration. Once the issue was identified, new reference files were produced for both modes, providing calibration accuracies of ~0.010–0.015 µm for slitless spectroscopy, and ~0.02–0.05 µm for observations with the slit. Further observations will be taken in the course of Cycle 1 to further improve the accuracy of the LRS wavelength calibration, with a goal accuracy of 5–10 nm over the full nominal wavelength range.
Words in bold are GUI menus/
panels or data software packages;
bold italics are buttons in GUI
tools or package parameters.
It is important to note that the LRS wavelength calibration does not operate in isolation from other calibration steps. The path loss correction, flat field, photometric calibration, and extraction aperture correction all have a wavelength dependency. Following the update to the wavelength calibration in October 2022, these reference files were also updated. This process will be repeated when further updates are made to the wavelength calibration. Users are encouraged to sign up to the notification email lists to receive prompt notification when new MIRI reference files are delivered.
Users are also encouraged to reach out to the MIRI team via the JWST Helpdesk if they need further clarification on any aspect of this issue.
The spectral extraction in the JWST calibration pipeline is not reliably producing science quality spectra when run automatically, i.e., for the products users will find in MAST. Two separate issues affecting the quality of the extracted products have been identified, as explained below.
Errors in source location
This issue particularly affects LRS slit data, where the source is typically moved between 2 different nod positions. The extract_1d step in the calwebb_spec2 pipeline uses the coordinate information of the observation to identify the location of the spectrum in the science aperture, rather than by having the position hard-coded or by applying a source-finding algorithm. This means that any inaccuracies or errors in the coordinate registration of the data will result in the extraction being performed in the wrong part of the aperture, despite the spectrum being in the expected position. If the "x1d" or "x1dints" products do no show the expected spectral shape for a target, despite the spectral images (the "cal" or "s2d" products) showing good quality spectra, this is the likely explanation.
Errors in coordinate registration can occur when guide stars have inaccurate coordinates in the catalog, or if the wrong guide star is identified during the Fine Guidance Sensor's ID process. (The risk of this increases with field crowding.) As long as the offset is small and the target still lands in the target acquisition region of interest, the TA sequence will compensate for such errors, placing the target at the correct position in the slit or the subarray. The assigned coordinates will, however, be offset from what was expected in those cases, and the extraction algorithm will (attempt to) extract the spectrum from the wrong location. As the slit measures just ~4.7" × 0.5", even small coordinate offsets can cause this issue.
This issue can be addressed by manually defining the extraction aperture in the "extract_1d" reference file, and re-running the step. This should be combined with setting the extract_1d parameter use_source_posn to False to prevent the pipeline from computing further offsets. The contents of this file and the available parameters are described in the calibration pipeline documentation. A demonstration of such a workaround is provided in the materials of the TSO JWebbinar (see video, notebook).
Bad pixel spikes and dropouts
A second issue with the spectral extraction is bad pixel spikes and dropouts in the extracted spectrum. These appear as single-point dips or spikes in the spectrum that can at times mimic absorption or emission features. The cause of these features is the presence of a flagged or hot pixel in the extraction aperture. When a pixel has been flagged as "DO_NOT_USE" by the pipeline, due to it being a known bad or hot pixel, or being affected by a cosmic ray, the pipeline excludes it from the summation of flux in the extraction aperture. It does not interpolate its value from its neighbouring pixels. This causes the extracted flux along this row in the aperture to drop compared to the rows above and below, i.e., causing a dip. Similarly, hot pixels are included in the summation as they are, causing spikes in the spectrum. This issue affects the cosmetics of the extracted spectrum, and, if located on or near a physical spectral feature, can interfere with the analysis.
Work is being done to update the extraction algorithm in the calibration pipeline to avoid this problem. A simple workaround is to interpolate over the dropout point. A more rigorous solution is to identify the flagged pixel in the spectral image (the "cal" or "s2d" file), and rectify its value through filtering or interpolation.
Background subtraction (slitless mode)
The JWST calibration pipeline does not currently perform any background subtraction on the spectral images taken with the slitless LRS mode. Work is being done to implement an optimized algorithm for this. Based on experience with commissioning and early science data, the following strategies are recommended:
- A very simple background subtraction can be performed as part of the spectral extraction in the extract_1d step of the calwebb_spec2 pipeline. By creating a custom reference file for the extract_1d step, an off-target background region can be defined alongside the source region, from which a background is computed. This is demonstrated in the materials of the TSO JWebbinar (see video, notebook).
- A better result is obtained by manually computing a background spectrum from off-target regions of the subarray in the "rateints.file", for each individual integration. The best regions of the subarrays from which the background is computed are those at the edges of the subarray (excluding the first 4 columns, which contain the reference pixels). By median-combining different off-target regions to compute an effective background, a 2-D background image can be constructed, and subtracted from the science data. If this operation is performed on the "rateints" product, the same file can then be processed further through the calwebb_spec2 pipeline.