NIRSpec IFU Known Issues
Known issues specific to NIRSpec IFU data processing in the JWST Science Calibration Pipeline are described in this article. This 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 issues that users should be aware of for their science.
On this page
Specific artifacts are described in the Artifacts section below. Guidance on using the pipeline data products is provided in the Pipeline Notes section along with a summary of some common issues and workarounds in the summary section.
Please also refer to NIRSpec IFU Calibration Status for an overview of the current astrometric, photometric, and wavelength calibration accuracy of NIRSpec IFU data products.
Artifacts
Cube building artifacts
There is spatial undersampling in the IFU that may result in an apparent "ringing" in the spectrum upon resampling during cube building, as demonstrated in Figure 1 (Law et al. 2023). This is inherent to the cube building process and there is currently no correction in the pipeline for it. Ways to mitigate this effect are currently being investigated. It may help to use a larger spatial extraction region to reduce the amplitude of the effect in extracted 1-D spectra.
Figure 1. An example of cube building artifacts.
An example of spectrum "ringing" artifacts resulting from cube resampling during cube building (© Law et al. 2023, Figure 11). The figure shows a JWST/NIRSpec G140H/F100LP spectrum of G2V star GSPC P330-E. The solid blue line shows the spectrum of the brightest spaxel in a single exposure, and exhibits significant resampling noise compared to the orange spectrum extracted from a 3 spaxel radius region from a cube built from four dithered exposures.
Pipeline notes
The topics below affect imaging observations and reflect common questions about how to improve the quality of the data from the pipeline. For issues that affect all observing modes, see NIRSpec Known Issues.
Cube building
The cube_build step of the pipeline combines the individual 2-D IFU slice images and creates a 3-D spectral cube. The IFU cubes are, by default, constructed with north pointing up and east to the left. Cube building can be done using either the default 3-D drizzle algorithm, or alternatively, the Shepard's method of weighting. The current pipeline default setting is the 3-D drizzle algorithm.
- To use 3-D drizzle, set
WEIGHTING
=DRIZZLE
- To use Shepard's method with exponential or linear weighting, set
WEIGHTING
=emsm
ormsm
It is sometimes useful to build a cube in the detector frame (for example, when analyzing the point spread function), rather than in sky coordinates. To build the cube in detector coordinates:
Set coord_system
= ifualign
Correlated 1/f read noise
The effects of 1/f noise for NIRSpec/IFU are shown in IFU 1/f noise workaround notebook, which also demonstrates the use of the NSClean algorithm to remove most of this effect. NSClean is now implemented in the pipeline (v1.13.4 onwards) as a non-default option. Further details on how to invoke NSClean within the JWST Science Calibration Pipeline and adjust default parameters are described in the 1/f noise workaround notebook.
Background subtraction
ReadTheDocs documentation: Background Subtraction
Background subtraction is automatically applied by the calwebb_spec2 pipeline for nodded observations or observations with dedicated background or leakage observations. It is not automatically applied for observations that have off-scene background observations that were not linked to the target in APT. Custom background subtraction may be required depending on science use case. In particular, a 1-D master background spectrum may be specified when running the calwebb_spec3 pipeline. A notebook is currently under construction to demonstrate this workaround.
Leakage of flux through the MSA may be significant in the case of bright extended targets or point sources in stuck-open shutters. If dedicated leakage observations were obtained at every dither or nod, the pipeline will use them to subtract the leakage signal. However, if leakage observations were only acquired at one dither or nod, the pipeline may not process the data correctly. In this case, custom background subtraction may be necessary.
Spectral and spatial distortions
Credit: T. Beck JWST Technical Memo (in-prep).
Distortions have been seen in the spatial location of the PSF centroid as a function of wavelength and the spectral centroid of emission lines:
(i) Point sources in the NIRSpec IFU have been seen to wander in x/y positions by up to 0.5 pixels, with the worst effects seen in the PRISM, G140H, and G395M settings (as demonstrated in Figure 2). Pixels with high flux gradients are also seen to exhibit a ringed flux structure. These PSF effects, which are seen in undersampled data, do improve with an increased number of dithers but are not removed completely. The "ringing" structure can affect continuum subtraction accuracy in spatial pixels that suffer from this effect. Variation in PSF position and spatial issues from the IFU distortion mean that spectra extracted from individual spatial elements can have the incorrect level of flux throughout the cube. As a result, this can affect spatially resolved flux ratio maps or small aperture flux extractions.
Figure 2. Spatial distortion of PSF.
The x and y position of the PSF from 2-D Gaussian fits as a function of wavelength for the NIRSpec IFU observation of the (point source) planetary nebula IRAS 05248-7007 using the PRISM+CLEAR disperser/filter combination. Each panel shows a different dither observation, combined here for illustration purposes. The color bar to the left shows the wavelengths of the measured x and y positions from 1 to 5 µm. In this view, the cross-slice direction goes from bottom to top, while the right-left direction is the axis along the IFU slices. Hence, the larger shift in the x pixel direction shows that the PSF centroid is predominantly varying within a slice, and the y shift in centroid position across slices is small and less than one slice width. Credit: T. Beck JWST Technical Memo (in-prep).
(ii) Gaussian line-fit kinematic analysis of compact emission lines are showing a blue/red shifted character across slices at the 1–1.5 pixel level, as demonstrated in Figure 3. The shift is seen across the NIRSpec IFU slices, with similar shift in pixel magnitude regardless of disperser used. The kinematic analyses of all spatially resolved emission line sources with compact morphologies can be affected at this level.
Figure 3. Spectral shift in emission lines.
Spectral shifts seen in the emission line data from the PRISM data analysis using the Brɑ emission line at 4.05 µm and the pipeline default cube building weighting (drizzle). The panel shows 4 different dither observations combined into a single FoV for illustration purposes. Each observation shows a kinematic pixel centroid shift of nearly 1.5 pixels across the PSF position from the upper left (blue shifted centroids) to the lower right (red shifted centroids). It should be noted that the maximum expected velocity and kinematic shift from this PN should have been well below NIRSpec instrument sensitivities. Credit: T. Beck JWST Technical Memo (in-prep).
These issues with the NIRSpec spatial PSF wander and spectral shifts point toward a non-trivial problem in the calibration of the NIRSpec IFU instrument model, particularly the portion of the model that anchors the internal instrument model to the RA, Dec, wavelength mapping on the sky. It has been established that these issues can have a different character depending on disperser mode used, and are not related to the cube building algorithm in the pipeline. Both issues are currently under investigation via spatial and spectral IFU distortion calibration programs (PID 6641 and 6640, respectively). STScI is acquiring data to characterize the issues and are addressing the problems. Once the root cause is identified a mitigation plan will be released to the community
Summary of common issues and workarounds
The sections above provide detail on each of the known issues affecting NIRSpec IFU data; the table below summarizes some of the most likely issues users may encounter along with any workarounds, if available. Note that greyed-out issues have been retired, and are fixed as of the indicated pipeline build.
Symptoms | Cause | Workaround | Fix build | Mitigation Plan |
---|---|---|---|---|
NS-IFU05: Spectra extracted from single spaxels on/near point sources show a sinusoidal modulation. | NIRSpec is undersampled, and distortion causes spectral traces (particularly for the gratings) to be curved on the detector. Resampling the raw data to a rectified data cube introduces artifacts if extracting spectra on scales smaller than the PSF. See detailed discussion by Law et al. 2023. | Extract spectra from larger apertures comparable in width to the PSF. Combining dithers/nods also reduces, but does not eliminate, the effect. | N/A | Updated issue None at this time. |
NS-IFU06: The centroid of point sources appears to drift by up to 0.5 pixels as a function of wavelength. | Issue related to a combination of filter transmission effects and the calibration of the IFU instrument model. The drift is typically of order 20 milliarcsec over the wavelength range of a given disperser. | None at present. | N/A | Updated issue None at this time. Any action regarding pipeline or post-processing mitigation await an investigation on the root cause, which is underway via Spatial IFU Distortion calibration program 6641. |
NS-IFU07: The spectral centroid of emission lines shows unexpected structure across IFU slices. | Issue related to how the NIRSpec IFU instrument model is anchored to the RA, Dec, wavelength mapping on the sky. | None at present. | N/A | Created issue None at this time. Any action regarding pipeline or post-processing mitigation await an investigation on the root cause, which is underway via Spectra IFU Distortion calibration program 6640. |
NS-IFU08: Leakcals are not properly associated in pipeline processing when there are separate leakcals for science and background exposures. | The pipeline does not check whether leakcals were taken for a background or science exposure. Additionally, when one leakcal is taken for all science dithers and a separate leakcal is taken for all background dithers the pipeline will attempt to match based on dither position which will fail to find matches for all but the first dither position. | None at present | N/A | Created issue Potential solutions are being investigated for possible inclusion in the operational pipeline build to be released in May 2025 |
References
Law, D., et al. 2023 AJ 166, 45
A 3D Drizzle Algorithm for JWST and Practical Application to the MIRI Medium Resolution Spectrometer