wavelength_calibrate_polynomial¶
Fit a polynomial to (pixel → wavelength) pairs and apply it to the spectrum.
| Category | Wavelength calibration |
| Backend | numpy - implemented here on top of numpy primitives |
| Version | 1.0.1 |
| Reads | ctx.spectrum (a Spectrum1D) |
| Writes | spectrum, metrics.calibration_rms_angstrom |
The polynomial is fitted with numpy.polynomial.Polynomial.fit, which handles the domain mapping so high orders stay well-conditioned. pixel_positions are 0-based indices on the current ctx.spectrum.wavelength axis (see the class docstring).
Parameters¶
| Parameter | Default | Required | Description |
|---|---|---|---|
pixel_positions |
None |
yes | List of 0-based pixel indices identified in the arc spectrum (same frame as ctx.spectrum.wavelength; first sample = 0). |
wavelengths_angstrom |
None |
yes | Rest wavelengths corresponding to those pixels (Å). |
order |
3 |
- | Polynomial degree. |
Use it¶
References¶
- Tody 1986, Proc. SPIE 627, 733 — IRAF identify: polynomial dispersion solution fitted through identified arc lines.
- Tody 1993, ASP Conf. Ser. 52, 173 — IRAF in the Nineties (identify / dispcor dispersion functions).
Related algorithms¶
fit_emission_lines_gaussian- Measure sub-pixel centroids of several emission lines at once.match_lamp_lines- Auto-identify arc-lamp lines against the bundled NIST atlas.measure_arc_geometry- Measure smile_radius + slant_deg from an arc-lamp 2-D image.reidentify_arc_features- Re-anchor stored (pixel, λ) arc features onto a fresh arc exposure.wavelength_calibrate_easyspec- Fit a wavelength polynomial viaextraction.wavelength_calibrationand apply it.wavelength_calibration_in_situ- Refine the wavelength zero-point from simultaneously-acquired sky lines.wavelength_calibration_solar- Calibrate a solar spectrum from built-in Fraunhofer line wavelengths.