FitResult

class mcalf.models.FitResult(fitted_parameters, fit_info)[source]

Bases: object

Class that holds the result of a fit.

Parameters:
  • fitted_parameters (numpy.ndarray) – The parameters fitted.

  • fit_info (dict) – Additional information on the fit including at least ‘classification’, ‘profile’, ‘success’, ‘chi2’ and ‘index’.

parameters

The parameters fitted.

Type:

numpy.ndarray

classification

Classification of the fitted spectrum.

Type:

int

profile

Profile of the fitted spectrum.

Type:

str

success

Whether the fit was completed successfully.

Type:

bool

chi2

Chi-squared value for the fit.

Type:

float

index

Index ([<time>, <row>, <column>]) of the spectrum in the spectral array.

Type:

list

__dict__

Other attributes may be present depending on the fit_info used.

Methods Summary

plot(model, **kwargs)

Plot the data and fitted parameters.

velocity(model[, vtype])

Calculate the Doppler velocity of the fit using model parameters.

Methods Documentation

plot(model, **kwargs)[source]

Plot the data and fitted parameters.

This calls the plot method on model but will plot for this FitResult object. See the model’s plot method for more details.

Parameters:
  • model (child class of ModelBase) – The model object to plot with.

  • **kwargs – See the model.plot method for more details.

velocity(model, vtype='quiescent')[source]

Calculate the Doppler velocity of the fit using model parameters.

Parameters:
  • model (child class of ModelBase) – The model object to take parameters from.

  • vtype ({'quiescent', 'active'}, default='quiescent') – The velocity type to find.

Returns:

velocity – The calculated velocity.

Return type:

float