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.
