fit_lines¶
-
specutils.fitting.
fit_lines
(spectrum, model, fitter=<astropy.modeling.fitting.LevMarLSQFitter object>, exclude_regions=None, weights=None, window=None)[source]¶ Fit the input models to the spectrum. The parameter values of the input models will be used as the initial conditions for the fit.
Parameters: spectrum : Spectrum1D
The spectrum object over which the equivalent width will be calculated.
model: `~astropy.modeling.Model` or list of `~astropy.modeling.Model`
The model or list of models that contain the initial guess.
exclude_regions : list of
SpectralRegion
List of regions to exclude in the fitting.
weights : list (NOT IMPLEMENTED YET)
List of weights to define importance of fitting regions.
window :
SpectralRegion
or list ofSpectralRegion
Regions of the spectrum to use in the fitting. If None, then the whole spectrum will be used in the fitting.
Returns: models : Compound model of
Model
A compound model of models with fitted parameters.
Notes
- Could add functionality to set the bounds in
model
if they are not set. - The models in the list of
model
are added - together and passed as a compound model to the
Fitter
class instance.
- The models in the list of
- Could add functionality to set the bounds in