fit_emission_lines_gaussian¶
Measure sub-pixel centroids of several emission lines at once.
| Category | Wavelength calibration |
| Backend | astropy - wraps the domain-standard astropy implementation |
| Version | 1.0.0 |
| Reads | - |
| Writes | extras.emission_line_centroids, metrics.n_lines |
Each line is fit in its own window after a cheap argmax recentring step. Fit failures degrade gracefully to the recentred argmax (warning recorded in the result message); the algorithm never raises mid-batch.
Parameters¶
| Parameter | Default | Required | Description |
|---|---|---|---|
guess_positions |
[] |
yes | Approximate pixel positions of the lines to fit. |
search_width |
40.0 |
- | Full width (pixels) of the fit window around each guess (≥ 4). |
initial_sigma |
5.0 |
- | Starting Gaussian σ (pixels). |
source_key |
'sky_spectrum' |
- | ctx.extras key of the spectrum to fit; falls back to ctx.spectrum when the key is absent. |
Use it¶
{
"tool": "fit_emission_lines_gaussian",
"arguments": {
"session_id": "<session_id>",
"params": {
"guess_positions": [],
"search_width": 40.0,
"initial_sigma": 5.0,
"source_key": "sky_spectrum"
}
}
}
Every algorithm is an MCP tool of the same name; describe_algorithm returns
this page's metadata as JSON.
References¶
- Markwardt 2009, ASP Conf. 411, 251 — Levenberg-Marquardt (MINPACK lmdif) algorithm in astronomy.
- Robitaille et al. 2013, A&A 558, A33 — Astropy.
Related algorithms¶
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_calibrate_polynomial- Fit a polynomial to (pixel → wavelength) pairs and apply it to the spectrum.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.