fit_generic_continuum

specutils.fitting.fit_generic_continuum(spectrum, median_window=3, model=<Chebyshev1D(3, c0=0., c1=0., c2=0., c3=0.)>, fitter=<astropy.modeling.fitting.LevMarLSQFitter object>, exclude_regions=None, weights=None)[source]

Basic fitting of the continuum of an input spectrum. The input spectrum is smoothed using a median filter to remove the spikes.

Parameters:

spectrum : Spectrum1D

The spectrum object overwhich the equivalent width will be calculated.

model : list of Model

The list of models that contain the initial guess.

exclude_regions : list of 2-tuples

List of regions to exclude in the fitting. Passed through to the fitmodels routine.

weights : list (NOT IMPLEMENTED YET)

List of weights to define importance of fitting regions.

Returns:

continuum_model

Fitted continuum as a model of whatever class model provides.

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.