Pith. Sign in

REVIEW

$\texttt{raccoon}$: A Python package for removing wiggle artifacts in the JWST NIRSpec integral field spectroscopy

Instrumentation and Methods for Astrophysics · Submitted 17 Jul 2025 · 2 references

Pith's verdict: A plausible, clearly written software paper for a real JWST NIRSpec artifact, but the central empirical premise—that aperture sums are wiggle-free—is untested and needs quantitative validation before the claims carry weight.

T0 · AI review

How this review was made: An AI referee (deepseek-v4-flash) read the paper on August 6, 2026 and answered a fixed list of questions about it. T0 is the starting level every paper gets. The levels describe how deeply Pith has checked the paper, never the authors.

  1. T0 AI review An AI read the paper and answered a fixed list of questions.
  2. T1 Audit Automatic checks that the references and files the paper relies on exist and match.
  3. T2 Compute The paper's code or calculations re-run with the same results.
  4. T3 Formal statement The claims written out in a formal math language a computer can read.
  5. T4 Proof Those claims proved, and the proof checked by computer.

How Pith checks papers →

· 3 major objections · 4 minor · Ask about this paper · The compiled record · Read the full review →
Challenge this review Comment (0) Read on arXiv ↗
Cite ▾
arXiv ID2507.13341 (version 1)
Pith IDFUVIPUC5, Pith's permanent record of this paper and its review
CitationAnowar J. Shajib. "$\texttt{raccoon}$: A Python package for removing wiggle artifacts in the JWST NIRSpec integral field spectroscopy." arXiv:2507.13341 (2025). https://pith.science/paper/FUVIPUC5
Cite this reviewBibTeX for Pith's review of this paper
Claim paper

Why Pith says this

Highlight any text to comment on it.

Referee report
The paper

The paper claims

raccoon claims that a NIRSpec spaxel spectrum is a chirp wiggle multiplied by a smooth template, and that fitting both at once and dividing out the wiggle restores the underlying spectrum.

The reading

raccoon claims that the wiggles corrupting JWST NIRSpec integral-field spaxel spectra are not noise to be smoothed away but a deterministic artifact that can be modeled and removed. It describes every single-spaxel spectrum as a chirp-like wiggle function multiplied by a smooth template built from spectra summed over a circular aperture around that spaxel, with an optional shell sum. The package fits this product to the data across the full wavelength range in one step, then divides out the fitted wiggle to produce a corrected spectrum. If the model is faithful, spaxel-level science such as stellar kinematics and line measurements no longer has to be sacrificed or aperture-averaged to escape the artifacts.

What carries the argument

The central object is the product model $M(\lambda) = W(\lambda) T(\lambda)$: a chirp wiggle $W$ times a wiggle-free template $T$. The wiggle is written as $W(\lambda) = 1 + A(\lambda)[\sin \phi + a_1 \sin^2\phi + a_2 \sin(3\phi)]$ with phase $\phi = \lambda k(\lambda) + \phi_0$, allowing wavelength-dependent amplitude and wavenumber plus asymmetric or sharpened peak shapes. The template is built as $T(\lambda) = c_1 C(\lambda) + c_2 S(\lambda) + c_3 \lambda^b + \sum_{n=0}^N p_n \lambda^n$, where $C$ is the circular-aperture-summed spectrum and $S$ an optional shell sum, making the template empirical and local. B-splines for $A(\lambda)$ and $k(\lambda)$, the linear coefficients, and the shape parameters are all solved by one $\chi^2$ minimization across the full spectrum, after which the fitted $W$ is divided out of the data.

Extended reading notes

Core claim

The central claim is that the artifact obeys the multiplicative model $D(\lambda) = W(\lambda) T(\lambda)$ (Eq. 2), with $W(\lambda)$ a parametrized chirp (Eq. 1) whose amplitude and wavenumber are smooth B-spline functions of wavelength, and $T(\lambda)$ a linear-template combination of the circular-aperture-summed spectrum, an optional shell-summed spectrum, and a power-law-plus-polynomial continuum. Fitting $M(\lambda) = W(\lambda) T(\lambda)$ to the observed single-spaxel spectrum by minimizing $\chi^2$ over the whole wavelength range yields the wiggle signal in one step, and dividing the data by the best-fit $W$ removes the artifacts while propagating the associated uncertainties. The paper argues that this simultaneous fit preserves wiggle signal that earlier subtract-then-fit methods lose, and that a multiplicative correction is physically motivated because the wiggles act multiplicatively on the spectrum.

Load-bearing premise

The argument depends on the aperture-summed spectrum being essentially free of wiggles and representative of the true single-spaxel spectrum; if the wiggles do not cancel in the sum, or if the true spectrum varies within the aperture in a way the linear template cannot capture, the corrected spectrum will carry artifacts of that mismatch.

Editorial extensions

If this is right

  • Corrected spaxel-level spectra retain the native NIRSpec spatial resolution instead of requiring large-aperture sums, so kinematics and line measurements can be made at the finest sampling the instrument provides.
  • Because the fit covers the entire wavelength range in one step, masked regions or gaps from outlier rejection do not break the wiggle estimate.
  • A user-set detection threshold means corrections are applied only to spaxels with significant wiggles, leaving already clean spectra untouched.
  • The same chirp-plus-template machinery can incorporate a shell spectrum to track line-shape changes across a galaxy, extending the correction to kinematically varying sources.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • If the multiplicative chirp model generalizes, the same approach could be adapted to other undersampled integral-field or dithered instruments, since resampling artifacts commonly act as wavelength-dependent multiplicative ripples.
  • A testable prediction is that injecting a synthetic chirp of known amplitude and phase into a wiggle-free spaxel spectrum should be recovered by raccoon, and the corrected output should match the original spectrum within noise.
  • When the aperture-summed template fails to cancel wiggles for compact or highly variable sources, the correction would imprint template mismatch; users could detect this by comparing corrected spectra produced from two different aperture radii.
  • The claimed advantage over subtract-then-fit methods implies that the extracted wiggle depends on the template family, so systematic checks across template choices would quantify the remaining model-dependent uncertainty.
Original abstract

$\texttt{raccoon}$ is a Python package for removing resampling noise - commonly referred to as "wiggles'' - from spaxel-level spectra in datacubes obtained from the JWST Near Infrared Spectrograph's (NIRSpec) integral field spectroscopy (IFS) mode. These wiggles arise as artifacts during resampling of the 2D raw data into 3D datacubes, due to the point spread function (PSF) being undersampled. The standard JWST data reduction pipeline does not correct for this noise. The wiggle artifacts can significantly degrade the scientific usability of the data, particularly at the spaxel level, undermining the exquisite spatial resolution of NIRSpec. $\texttt{raccoon}$ provides an empirical correction by modeling and removing these artifacts, thereby restoring the fidelity of the extracted spectra. $\texttt{raccoon}$ forward-models the wiggles as a chirp function impacting one or more template spectra that are directly fit to the original data across the entire wavelength range. The best-fit wiggle model is then used to clean the data while propagating the associated uncertainties.

The compiled record

The paper's own sentences, arranged, kept beside the review and separate from it. Each label is drawn from a closed vocabulary; the number beside it is the probability the classifier gave that label. Numbers in the tables are the authors', checked by code. No sentence in this record was written by a model.

Compiled by classifier-1.13.0 via TypeSafe API, question bank abstract-p1-20260923, 2026-09-23: 1 request, 5,690 input tokens.

What the abstract itself states, as probabilities: claims first 0.06 · states limitation 0.11 · human participants 0.01 · controlled comparison 0.10 · randomized assignment 0.01 · states quantitative result 0.04 · compares with prior results 0.36 · mentions code or data availability 0.19.

The abstract, sentence by sentence

arXiv listing abstract v1. Results and the main claim are underlined; .

$\texttt{raccoon}$ is a Python package for removing resampling noise - commonly referred to as "wiggles'' - from spaxel-level spectra in datacubes obtained from the JWST Near Infrared Spectrograph's (NIRSpec) integral field spectroscopy (IFS) mode. These wiggles arise as artifacts during resampling of the 2D raw data into 3D datacubes, due to the point spread function (PSF) being undersampled. The standard JWST data reduction pipeline does not correct for this noise. The wiggle artifacts can significantly degrade the scientific usability of the data, particularly at the spaxel level, undermining the exquisite spatial resolution of NIRSpec. $\texttt{raccoon}$ provides an empirical correction by modeling and removing these artifacts, thereby restoring the fidelity of the extracted spectra. $\texttt{raccoon}$ forward-models the wiggles as a chirp function impacting one or more template spectra that are directly fit to the original data across the entire wavelength range. The best-fit wiggle model is then used to clean the data while propagating the associated uncertainties.

background contribution method result interpretation main claim

What the classifier reports for each sentence. The number is the probability it gave the label.
#sentencerolethe authors' own workstates the main conclusionstrength
s0 $\texttt{raccoon}$ is a Python package for removing resampling noise - commonly referred to as "wiggles'' - from spaxel-level spectra in datacubes obtained from the JWST Near Infrared Spectrograph's (NIRSpec) integral field spectroscopy (IFS) mode. contribution 1.00 0.49 0.22 asserted 1.00
s1 These wiggles arise as artifacts during resampling of the 2D raw data into 3D datacubes, due to the point spread function (PSF) being undersampled. background 1.00 0.15 0.04 asserted 1.00
s2 The standard JWST data reduction pipeline does not correct for this noise. gap 0.77 0.10 0.04 asserted 1.00
s3 The wiggle artifacts can significantly degrade the scientific usability of the data, particularly at the spaxel level, undermining the exquisite spatial resolution of NIRSpec. background 0.93 0.18 0.09 asserted 0.70
s4 $\texttt{raccoon}$ provides an empirical correction by modeling and removing these artifacts, thereby restoring the fidelity of the extracted spectra. contribution 0.96 0.81 0.53 asserted 1.00
s5 $\texttt{raccoon}$ forward-models the wiggles as a chirp function impacting one or more template spectra that are directly fit to the original data across the entire wavelength range. method 1.00 0.80 0.12 asserted 1.00
s6 The best-fit wiggle model is then used to clean the data while propagating the associated uncertainties. method 1.00 0.78 0.14 asserted 1.00

What kind of paper the classifier reports this is: method or tool 1.00 · evidence from analysis of existing data 0.53.

What was examined, and what was not

sources read
  • arXiv listing abstract v1
not examined
  • full text
  • figures and tables
  • references and citing sentences
  • relations to other papers
levels run
  • P abstract
not run
  • S sections
  • T body sentences
  • C citations
  • R cross-paper relations

Every quoted sentence on this record is the authors'. Every label is from Pith's closed vocabulary, with the probability shown beside it. Every number in the measurements table is the authors', checked by code. Record as JSON

Figures
Figure 1. Illustration of the wiggles in the single-spaxel spectrum (blue), which is a manifestation of the resampling noise in the standard-pipeline-reduced datacube due to PSF undersampling. The red spectrum shows the aperture-summed spectrum within a 4-spaxel radius, normalized to match its maximum to that of the single-spaxel one. The illustrated data are of an active galactic nucleus (AGN) from Perna et al. (2023). In raccoon, the wiggle is modeled as a sinusoidal chirp function W(λ) = 1 + A(λ)
Figure 2. Modeling of the full spectrum (blue in the top panel) based on the template spectra and the wiggles impacting it. The illustrated spectrum is the same one from
Figure 3. Illustration of the extracted and modeled wiggle signal. The illustrated data points represent D(λ)/M(λ) based on the best-fit M(λ), and the orange line illustrates the best-fit wiggle model W(λ). The grey points are rejected outliers using the false discovery rate method, and the blue points mark the wavelengths where the data were fit to the model. raccoon enables users to efficiently process multiple spaxels in a datacube, either across the entire field or within a specified spatial region. A user-defined detection threshold for the wiggle signal can be set, ensuring that…

Figures reproduced from arXiv:2507.13341 by the authors.

References
How the literature uses it

1 arXiv paper cite this in 2 sentences

Each citing sentence is taken from the citing paper's LaTeX source and typed by Pith's classifier. A label appears at probability 0.8 or more (0.95 for support), a contest at 0.7 or more; the quoted words are the citing authors'. How each label was checked · JSON

Papers citing it · 1 sentence without a confident label

Contests it 1 paper

Discussion

Disagree with the review, or know something it missed? Leave a comment, highlight any passage above to comment on it, or challenge this review formally.