Spectrometer Calibration Calculator

Least-squares λ(px) = Σ Ck·pxk, fitted in a scaled Chebyshev basis (numerically stable to order 6 even on 4096-px detectors), reported as raw monomial coefficients with 1σ uncertainties. Validated against numpy to <10⁻⁹ relative.

Calibration points

One point per line: pixel, wavelength_nm (comma, tab, or space separated). Order m needs ≥ m+1 points; uncertainties need ≥ m+2.

Result

Fit results appear here.

Fit & residuals

Numerics: the fit solves normal equations in a Chebyshev basis Tk(u), u ∈ [−1, 1] over the pixel range, then converts exactly to monomial Ck — avoiding the ~10²⁰ dynamic range that makes raw-monomial normal equations lose most coefficient digits in double precision. Cov(C) = J·s²(AᵀA)⁻¹·Jᵀ with s² = SSR/(N−p). Source: repo, validated in scripts/test_calibration.mjs.