Table of Contents
Fetching ...

A Classic Nonlinearity Correction Algorithm for Detectors Read Out Up-The-Ramp

Timothy D. Brandt

TL;DR

This work tackles correcting classic nonlinearity in up-the-ramp nondestructive readouts under constant illumination by deriving a forward polynomial correction $z_i = \sum_{k=0}^N a_k y_i^k$ fitted via a covariance-aware $\chi^2$ across many ramps with varying illumination. It reformulates the problem in terms of read-difference statistics $g_{i,k}$ and solves a linear system $\mathbf{A}\mathbf{a} = \boldsymbol{\xi}$ for the nonlinear coefficients, while enforcing a constraint on the total ramp slope to avoid degeneracy; conditioning is improved using a Legendre basis. The method is validated on synthetic data, revealing that high-order corrections (up to $N \approx 9$–$20$) are often required and that biases can arise when mixing ramps with different count rates, with recommended mitigations such as grouping ramps by count-rate or neglecting photon-noise in the covariance. Applied to Roman-WFI detector data, the approach achieves good formal agreement for $N \ge 9$ and demonstrates practical feasibility for large-format detectors, supported by an open-source Python implementation. Overall, the algorithm provides a scalable, statistically principled way to derive nonlinearity corrections from heterogeneous ramp data, enabling accurate linearization across wide dynamic ranges.

Abstract

We derive an algorithm for computing a classic nonlinearity correction -- applicable to constant and uniform illumination -- in the presence of read noise and photon noise. The algorithm operates simultaneously on many nondestructive ramps at a range of count rates and directly computes the function transforming measured counts into linearized counts. We also compute chi squared for the corrected ramps, enabling the user to identify the polynomial degree beyond which chi squared ceases to improve significantly. The computational cost of our algorithm is linear in the number of reads and ramps, reaching ~100 hours to derive a correction for all 4096 x 4096 pixels of a Hawaii-4 RG detector from 186 illuminated 55-read ramps on a 2023 Macbook Pro laptop (~10,000 reads per pixel). We identify a potential source of bias in the nonlinearity correction when combining ramps of very different illuminations, together with effective mitigations. We apply our algorithm to a random set of pixels from the Roman Space Telescope's Wide Field Instrument. We find that a >=9th order nonlinearity correction is needed, at which point chi squared is close to its theoretically expected value and beyond which chi squared improves little with increasing polynomial order. Python software implementing our algorithm is available at https://github.com/RomanSpaceTelescope/SOCReferenceFileCode.

A Classic Nonlinearity Correction Algorithm for Detectors Read Out Up-The-Ramp

TL;DR

This work tackles correcting classic nonlinearity in up-the-ramp nondestructive readouts under constant illumination by deriving a forward polynomial correction fitted via a covariance-aware across many ramps with varying illumination. It reformulates the problem in terms of read-difference statistics and solves a linear system for the nonlinear coefficients, while enforcing a constraint on the total ramp slope to avoid degeneracy; conditioning is improved using a Legendre basis. The method is validated on synthetic data, revealing that high-order corrections (up to ) are often required and that biases can arise when mixing ramps with different count rates, with recommended mitigations such as grouping ramps by count-rate or neglecting photon-noise in the covariance. Applied to Roman-WFI detector data, the approach achieves good formal agreement for and demonstrates practical feasibility for large-format detectors, supported by an open-source Python implementation. Overall, the algorithm provides a scalable, statistically principled way to derive nonlinearity corrections from heterogeneous ramp data, enabling accurate linearization across wide dynamic ranges.

Abstract

We derive an algorithm for computing a classic nonlinearity correction -- applicable to constant and uniform illumination -- in the presence of read noise and photon noise. The algorithm operates simultaneously on many nondestructive ramps at a range of count rates and directly computes the function transforming measured counts into linearized counts. We also compute chi squared for the corrected ramps, enabling the user to identify the polynomial degree beyond which chi squared ceases to improve significantly. The computational cost of our algorithm is linear in the number of reads and ramps, reaching ~100 hours to derive a correction for all 4096 x 4096 pixels of a Hawaii-4 RG detector from 186 illuminated 55-read ramps on a 2023 Macbook Pro laptop (~10,000 reads per pixel). We identify a potential source of bias in the nonlinearity correction when combining ramps of very different illuminations, together with effective mitigations. We apply our algorithm to a random set of pixels from the Roman Space Telescope's Wide Field Instrument. We find that a >=9th order nonlinearity correction is needed, at which point chi squared is close to its theoretically expected value and beyond which chi squared improves little with increasing polynomial order. Python software implementing our algorithm is available at https://github.com/RomanSpaceTelescope/SOCReferenceFileCode.

Paper Structure

This paper contains 10 sections, 20 equations, 12 figures.

Figures (12)

  • Figure 1: Example of the nonlinear response of a Roman-WFI pixel to constant illumination. The orange line shows a constant count rate, while the blue points show the actual measurements. The lower panel shows the difference between the blue points and the orange line normalized by the orange line's accumulated charge from reset. The errors represent photon noise and are highly correlated.
  • Figure 2: Nonlinearity corrections of orders up to 10 applied to synthetic data that are perfectly corrected (up to read and photon noise) by a 6-th order polynomial. There are 300 ramps all plotted together with semitransparent red dots for their individual reads; their count rates vary by $\approx$10%. The correction polynomial takes measured counts (shown on the $x$-axis) and outputs corrected counts (on the $y$-axis).
  • Figure 3: The same data as in Figure \ref{['fig:fakedata_abs_allsat']}, but plotted relative to a linear fit to better show variations. The left panel shows one ramp; the right panel shows all 300 ramps used to derive the nonlinearity correction. The ramps have a 10% range of count rates, so to that individual reads cease to become visually distinguishable after around read 10.
  • Figure 4: The incremental improvements in $\chi^2$ that can be achieved with increasing polynomial correction order, shown on a logarithmic scale. The $\chi^2$ value is computed for 300 ramps of 55 reads each. In this case, the synthetic data are perfectly corrected, up to read and photon noise, by a sixth order polynomial. Improvements in $\chi^2$ past this point are $\approx$1 per additional order as expected from noise in the absence of signal.
  • Figure 5: Percent error in the derived nonlinearity correction as a function of counts for synthetic data where the true (sixth-order) correction is known. Each line represents the fit for 300 ramps of 55 reads each; the dashed lines show the empirical 95% confidence interval. With 300 ramps per pixel of similar count rates, the approach is nearly unbiased.
  • ...and 7 more figures