ModelFit

class gdt.core.spectra.parameters.ModelFit[source]

Bases: object

A container for the info resulting from a spectral fit.

Attributes Summary

covariance

The covariance matrix of the fit

dof

The degrees-of-freedom of the fit

energy_fluence

The energy fluence

energy_flux

The energy flux

flux_energy_range

The energy range of the flux and fluence, (low, high)

name

The name of the model

parameters

A list of model parameters

photon_fluence

The photon fluence

photon_flux

The photon flux

stat_name

The name of the fit statistic

stat_value

The fit statistic value

time_range

The time range of the model fit, (low, high)

Methods Summary

from_data(name, time_range, **kwargs)

Create a ModelFit object from data.

parameter_list()

Return the list of parameter names

Attributes Documentation

covariance

The covariance matrix of the fit

Type:

(np.array)

dof

The degrees-of-freedom of the fit

Type:

(int)

energy_fluence

The energy fluence

Type:

(EnergyFluence)

energy_flux

The energy flux

Type:

(EnergyFlux)

flux_energy_range

The energy range of the flux and fluence, (low, high)

Type:

(tuple)

name

The name of the model

Type:

(str)

parameters

A list of model parameters

Type:

(list of Parameter)

photon_fluence

The photon fluence

Type:

(PhotonFluence)

photon_flux

The photon flux

Type:

(PhotonFlux)

stat_name

The name of the fit statistic

Type:

(str)

stat_value

The fit statistic value

Type:

(float)

time_range

The time range of the model fit, (low, high)

Type:

(float, float)

Methods Documentation

classmethod from_data(name, time_range, **kwargs)[source]

Create a ModelFit object from data.

Parameters:
  • name (str) – The name of the model

  • time_range (float, float) – The time range of the model fit, (low, high)

  • parameters (list, optional) – A list of model parameters

  • photon_flux (PhotonFlux, optional) – The photon flux

  • energy_flux (EnergyFlux, optional) – The energy flux

  • photon_fluence (PhotonFluence, optional) – The photon fluence

  • energy_fluence (EnergyFluence, optional) – The energy fluence

  • flux_energy_range (tuple, optional) – The energy range of the flux and fluence, (low, high)

  • stat_name (str, optional) – The name of the fit statistic

  • stat_value (float, optional) – The fit statistic value

  • dof (int, optional) – The degrees-of-freedom of the fit

  • covariance (np.array, optional) – The covariance matrix of the fit

Returns:

(ModelFit)

parameter_list()[source]

Return the list of parameter names

Returns:

(list) – The parameter names