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.


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.

Click on the figure for a larger view. 

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 or msm  

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_spec3 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.

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.

SymptomsCauseWorkaroundFix buildMitigation 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.


Created issue

A mitigation plan is under investigation.

NS-IFU06: The centroid of point sources appears to drift slightly as a function of wavelength.

The cause is unclear, but likely related to the filter transmission. The drift is typically of order 20 milliarcsec over the wavelength range of a given disperser.



Updated issue

None at this time. Any action regarding pipeline or post-processing mitigation await an investigation on the root cause, which has just begun.

NS-IFU01: There is a hole at the peak of the PSF or an otherwise distorted PSF in IFU "s3d" cube.This is due to overly aggressive outlier detection.

Option 1: Turn off outlier rejection in the cube_build step of calwebb_spec3. However, this may allow other outliers to remain in the cube.

Option 2: Reprocess data using the  Science Calibration Pipeline, jwst 1.11.3 and onward. This version will be installed in the Operations Pipeline with build 9.3), planned for installation on .

Updated Operations Pipeline

The outlier detection algorithm was updated. STScI reprocessed affected data products with an updated Operations Pipeline that was installed on August 24, 2023. (Reprocessing of affected data typically takes 2–4 weeks after the update.)

NS-IFU02: Flux is not conserved in 1-D-extracted spectra of point sources when using a different output spaxel sampling.

The cube_build algorithm was designed to conserve flux assuming input units of surface brightness. However, the NIRSpec point source calibration produces units of flux density, which is not compatible.

If using data processed with the current Operations Pipeline build, do the following:

  1. change the header keyword SRCTYAPT in the primary extension of each "rate.fits" file to EXTENDED
  2. re-run the calwebb_spec2 pipeline to apply the surface brightness calibration
  3. change the header keyword SRCTYPE in the "SCI" extension header of the new "s3d" products to POINT
  4. re-run the extract_1d step

Otherwise, install the release candidate for the coming Operations Pipeline (jwst 1.11.3 and onward) and re-run calwebb_spec2.


Updated Operations Pipeline

Point source calibration for IFU data was changed to surface brightness units, and 1-D spectra converted back to flux density. STScI reprocessed affected data products with an updated Operations Pipeline that was installed on August 24, 2023. (Reprocessing of affected data typically takes 2–4 weeks after the update.)

NS-IFU03: Negative and/or surplus flux in the extracted 1-D spectra is seen, typically with an irregular wavelength-dependent undulation.

Correlated noise from low-level detector thermal instabilities, seen as vertical banding in 2-D count rate images, particularly in exposures of the NRS2 detector. While the IRS2 readout modes reduces this effect, it is not completely eliminated.

Run the NSClean script developed by B. Rauscher on count rate images, using an appropriate mask. (Rauscher, B. 2023, arXiv:2306.03250)

notebook demonstrating the use of the NSClean algorithm is now available. 

Updated issue

NSClean was implemented in the pipeline (v1.13.4 onwards) as a non-default option. 

Details on how to invoke NSClean within the science calibration pipeline are provided in the workaround notebook.

NS-IFU04: There is missing flux in the "x1d" spectrum of point sources.

Astrometric or pointing uncertainty may cause the default extraction aperture to miss the intended target or be off-center.

Option 1: Rerun the extract_1d pipeline step in calwebb_spec3 at specified coordinates.

Option 2: Install the latest release of the jwst package and then run the Science Calibration Pipeline on the affected dataset. Starting in jwst 1.11.0, the extract_1d step supports setting ifu_autocen = True.

Updated issue

An IFU astrometric solution was updated in July 2023, but small pointing offsets may remain. Reprocessing of affected data typically takes 2–4 weeks after the update.


Law, D., et al. 2023 AJ 166, 45
A 3D Drizzle Algorithm for JWST and Practical Application to the MIRI Medium Resolution Spectrometer

Notable updates
Originally published