Table of Contents
Fetching ...

WIggle Corrector Kit for NIRSpEc Data: WICKED

Antoine Dumont, Nadine Neumayer, Anil C. Seth, Torsten Böker, Michael Eracleous, Kameron Goold, Jenny E. Greene, Kayhan Gültekin, Luis C. Ho, Jonelle L. Walsh, Nora Lützgendorf

TL;DR

WICKED addresses pervasive PSF undersampling wiggles in JWST/NIRSpec IFU data by an empirical, FFT-based approach that flags wiggle-affected spaxels and fits wiggles with a model combining aperture and annular templates, a power-law continuum, and a low-order polynomial. The wiggle spectrum is subdivided into frequency slices and modeled as sinusoids with a wavelength-dependent frequency constrained by a polynomial fit, iteratively refined from the brightest spaxel. Across simulations and a real case (NGC5128), WICKED outperforms uncorrected data and the prior method by Perna2023, preserving continuum and line-equivalent widths within ~5% and recovering line-of-sight velocities within ~1% (and with substantially reduced uncertainties) at moderate to high S/N. The method enables reliable single-pixel spectroscopy and detailed kinematic analyses, demonstrated by consistent gas and stellar kinematics with prior studies in Centaurus A, highlighting its practical impact for maximizing JWST NIRSpec IFU science. WICKED is publicly available as a Python package with a Jupyter notebook companion to facilitate adoption by the community.

Abstract

The point-spread function of the integral-field unit (IFU) mode of the JWST's NIRSpec is heavily under-sampled, creating resampling noise seen as low-frequency sinusoidal-like artifacts, or "wiggles". These artifacts in the data are not corrected in the JWST data pipeline, and significantly impact the science that can be achieved at a single-pixel level. We present WICKED (WIggle Corrector Kit for NIRSpEc Data), a tool designed to empirically remove wiggles. WICKED uses the Fast Fourier Transform to identify wiggle-affected spaxels across the data cube. Spectra are modeled with a mix of integrated aperture and annular templates, a power-law, and a second-degree polynomial. The method works across all medium- and high-resolution NIRSpec gratings: F070LP, F100LP, F170LP, and F290LP. WICKED can recover the true overall spectral shape up to a factor of 3.5x better compared to uncorrected spectra. It recovers the equivalent width of absorption lines within 5% of the true value-~3x better than uncorrected spectra and ~2x better than other methods. WICKED significantly improves kinematic measurements, recovering the line-of-sight velocity (LOSV) within 1% of the true value -- more than 100x better than uncorrected spectra at S/N ~40. As a case study, we applied WICKED to G235H/F170LP IFU data of the elliptical galaxy NGC5128, finding good agreement with previous studies. In wiggle-affected regions, the uncorrected spectrum showed stellar LOSV and velocity dispersion differences compared to the WICKED-cleaned spectrum, of ~17x and ~36x larger than the estimated uncertainties, respectively. Wiggles in NIRSpec IFU data can introduce severe biases in spectral shape, line measurements, and kinematics to values larger than the typical uncertainties. WICKED provides a robust, user-friendly solution, enabling precise single-pixel studies and maximizing JWST's potential.

WIggle Corrector Kit for NIRSpEc Data: WICKED

TL;DR

WICKED addresses pervasive PSF undersampling wiggles in JWST/NIRSpec IFU data by an empirical, FFT-based approach that flags wiggle-affected spaxels and fits wiggles with a model combining aperture and annular templates, a power-law continuum, and a low-order polynomial. The wiggle spectrum is subdivided into frequency slices and modeled as sinusoids with a wavelength-dependent frequency constrained by a polynomial fit, iteratively refined from the brightest spaxel. Across simulations and a real case (NGC5128), WICKED outperforms uncorrected data and the prior method by Perna2023, preserving continuum and line-equivalent widths within ~5% and recovering line-of-sight velocities within ~1% (and with substantially reduced uncertainties) at moderate to high S/N. The method enables reliable single-pixel spectroscopy and detailed kinematic analyses, demonstrated by consistent gas and stellar kinematics with prior studies in Centaurus A, highlighting its practical impact for maximizing JWST NIRSpec IFU science. WICKED is publicly available as a Python package with a Jupyter notebook companion to facilitate adoption by the community.

Abstract

The point-spread function of the integral-field unit (IFU) mode of the JWST's NIRSpec is heavily under-sampled, creating resampling noise seen as low-frequency sinusoidal-like artifacts, or "wiggles". These artifacts in the data are not corrected in the JWST data pipeline, and significantly impact the science that can be achieved at a single-pixel level. We present WICKED (WIggle Corrector Kit for NIRSpEc Data), a tool designed to empirically remove wiggles. WICKED uses the Fast Fourier Transform to identify wiggle-affected spaxels across the data cube. Spectra are modeled with a mix of integrated aperture and annular templates, a power-law, and a second-degree polynomial. The method works across all medium- and high-resolution NIRSpec gratings: F070LP, F100LP, F170LP, and F290LP. WICKED can recover the true overall spectral shape up to a factor of 3.5x better compared to uncorrected spectra. It recovers the equivalent width of absorption lines within 5% of the true value-~3x better than uncorrected spectra and ~2x better than other methods. WICKED significantly improves kinematic measurements, recovering the line-of-sight velocity (LOSV) within 1% of the true value -- more than 100x better than uncorrected spectra at S/N ~40. As a case study, we applied WICKED to G235H/F170LP IFU data of the elliptical galaxy NGC5128, finding good agreement with previous studies. In wiggle-affected regions, the uncorrected spectrum showed stellar LOSV and velocity dispersion differences compared to the WICKED-cleaned spectrum, of ~17x and ~36x larger than the estimated uncertainties, respectively. Wiggles in NIRSpec IFU data can introduce severe biases in spectral shape, line measurements, and kinematics to values larger than the typical uncertainties. WICKED provides a robust, user-friendly solution, enabling precise single-pixel studies and maximizing JWST's potential.

Paper Structure

This paper contains 14 sections, 2 equations, 10 figures.

Figures (10)

  • Figure 1: Correction of the brightest spaxel in the F170LP cube of the A-star J1757132 using the FitWigglesCentralPixel step in WICKED. The top panel shows the original spectrum (red) with prominent wiggles. The aperture (3-pixel radius) and annular integrated (3 to 5 pixel annular radius) spectra are displayed in gray and yellow, respectively, with the best-fit model shown in blue. Subtracting this smooth model from the single spaxel data produces the wiggle spectrum (middle panel, gray). WICKED identifies peaks and valleys in the wiggle spectrum (green crosses) and fits a wiggle model (red), which is subtracted to produce the final wiggle-free spectrum (bottom panel, red). pink vertical lines mark masked regions, while the yellow area highlights the gap between the NRS1 and NRS2 detectors.
  • Figure 2: The Fast Fourier Transform is used in WICKED to flag spaxels in the data cube affected by wiggles. The built-in method plot_wiggle_FFT in WICKED allows for manual examination of the spectrum and its Fourier transform for a specific spaxel in the datacube. Left panel shows the wiggle spectrum, created by subtracting the spectrum from the best-fit model. Right panel shows the Fourier transform of the wiggle spectrum. The solid fuchsia line represents the mean amplitude in the wiggle-dominated part of the spectrum (shaded red region). WICKED flags spaxels by comparing this value to the standard deviation (blue dashed line). If data from both NRS detectors are available, as in this case, WICKED determines which part of the spectrum shows the most prominent wiggles and bases the flagging on that part of the spectrum.
  • Figure 3: Comparison of the spectrum of the A-star J1757132 (top, black) and the degraded spectrum (top, red) with the added wiggle model (green) at S/N ratios of $50$, $15$ and $8$. Middle: the Fourier spectra of i) the degraded spectrum (solid, red), ii) the wiggle model (green), iii) the degraded spectrum without wiggles (black), and iv) the data corrected with WICKED (dashed, red). The horizontal lines mark the mean amplitude of the Fourier spectrum at frequencies dominated by wiggles and at larger frequencies. The Fourier ratio can effectively distinguish wiggles from noise down to a S/N ratio of $\sim 8$. Bottom: comparison of the input wiggle model (green) versus the recovered wiggle spectrum for the data cleaned with WICKED.
  • Figure 4: Comparison of recovered equivalent width for two absorption lines present in the spectrum of the A-star (solid black line) J1757132. The bottom left panel shows the profile of the LINE 1 for the original spectrum (solid black), the spectrum with wiggles (dashed) and the spectra corrected using WICKED (red) and with the code by Perna2023 (yellow). The line profile and equivalent width are better recovered with WICKED than with the code by Perna2023, with the corrected spectrum having $< 5\%$ difference with the "true" value derived from the spectrum with no wiggles. For the uncorrected spectrum (gray) we see EW differences exceeding the typical error ( 4%) in spectra with S/N as low as 50.
  • Figure 5: Comparison of the mean difference flux respect to the aperture spectrum of the A-star J175713. The black rectangles represent the minimum expected the flux difference at a given S/N ratio. The spectra corrected using WICKED (solid red) shows the smallest mean flux difference compared to the uncorrected spectrum (gray) and the spectrum clean using the method by Perna2023 (solid yellow) at all S/N.
  • ...and 5 more figures