fit_gaussian_lines
Fit one or more Gaussians to a continuum-subtracted spectrum to estimate line parameters (amplitude, center, width, FWHM, integrated flux) and their uncertainties from channel data.
Instructions
Fit 1..N Gaussians to a continuum-subtracted spectrum.
x: channel centres (km/s, or GHz/MHz; integrated fluxes are then in flux_unit x x_unit). flux: per channel. rms: per-channel noise; if None it is estimated from the fit residuals (MAD). initial_guesses: optional [[amplitude, centre, sigma], ...]; otherwise peaks are found greedily on the residual spectrum. For each component: amplitude, centre, sigma, FWHM = 2.3548 sigma, integrated flux = sqrt(2 pi) A sigma with its covariance error, and a direct channel sum over centre +/- window_nsigma sigma with error rms dv sqrt(N_chan). Limits: assumes independent channels (Hanning-smoothed or oversampled data have correlated noise, so the errors are too small by up to sqrt(2)); a Gaussian may be a poor shape for double-peaked disk lines.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"x": "<x>",
"flux": "<flux>"
},
"name": "fit_gaussian_lines"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| rms | No | ||
| flux | Yes | ||
| x_unit | No | km/s | |
| flux_unit | No | mJy | |
| n_components | No | ||
| window_nsigma | No | ||
| initial_guesses | No |