    Return the results of the last covar run.

get_covar_results()
Alias: get_covariance_results
>>> res = get_covar_results() >>> print(res) datasets = (1,) methodname = covariance iterfitname = none fitname = levmar statname = chi2gehrels sigma = 1 percent = 68.2689492137 parnames = ('bgnd.c0',) parvals = (10.228675427602724,) parmins = (-2.4896739438296795,) parmaxes = (2.4896739438296795,) nfits = 0

In this case, of a single parameter, the covariance matrix is just the variance of the parameter:

>>> res.extra_output array([[ 6.19847635]])

Notes

The fields of the object include:

Item
Definition
datasets
A tuple of the data sets used in the analysis.
methodname
This will be 'covariance'.
iterfitname
The name of the iterated-fit method used, if any.
fitname
The name of the optimization method used.
statname
The name of the fit statistic used.
sigma
The sigma value used to calculate the confidence intervals.
percent
The percentage of the signal contained within the confidence intervals (calculated from the sigma value assuming a normal distribution).
parnames
A tuple of the parameter names included in the analysis.
parvals
A tuple of the best-fit parameter values, in the same order as parnames .
parmins
A tuple of the lower error bounds, in the same order as parnames .
parmaxes
A tuple of the upper error bounds, in the same order as parnames .
nfits
The number of model evaluations.

There is also an extra_output field which is used to return the covariance matrix.

See the bugs pages on the Sherpa website for an up-to-date listing of known bugs.

December 2023