fit_gaussian_line¶
Fit a single Gaussian (plus a linear continuum) to one spectral line.
| Category | Line fitting |
| Backend | scipy - implemented here on top of scipy primitives |
| Version | 1.1.0 |
| Reads | ctx.spectrum (a Spectrum1D) |
| Writes | line_fits, metrics.fwhm_angstrom |
Equivalent width follows the convention EW > 0 for absorption and EW < 0 for emission. The Gaussian is the right choice for instrument- or thermally-broadened lines.
Parameters¶
| Parameter | Default | Required | Description |
|---|---|---|---|
line_center_angstrom |
None |
yes | Approximate line centre in Å (required). |
window_angstrom |
20.0 |
- | Half-width of the fit window on each side of the line (Å). |
label |
'' |
- | Key under which to store the result; defaults to the rounded centre. |
Use it¶
References¶
- scipy.optimize.curve_fit — Levenberg-Marquardt / Trust Region Reflective
Related algorithms¶
compare_line_fits- Fit one spectral line with every profile in turn and pick the best one.equivalent_width- Measure a line's equivalent width without assuming a profile shape.fit_lorentzian_line- Fit a single Lorentzian (plus a linear continuum) to one spectral line.fit_voigt_line- Fit a single Voigt profile (plus a linear continuum) to one spectral line.vr_ratio- Violet/Red intensity ratio of a double-peaked emission line.