FitResult#

class gammapy.modeling.FitResult(optimize_result=None, covariance_result=None)[source]#

Bases: object

Fit result class.

The fit result class provides the results from the optimisation and covariance of the fit.

Parameters:
optimize_resultOptimizeResult

Result of the optimization step.

covariance_resultCovarianceResult

Result of the covariance step.

Attributes Summary

backend

Optimizer backend used for the fit.

covariance_result

Optimize result.

message

Optimizer status message.

method

Optimizer method used for the fit.

minuit

Minuit object.

models

Best fit parameters of the optimization step.

nfev

Number of function evaluations of the optimisation step.

optimize_result

Optimize result.

parameters

Best fit parameters of the optimization step.

success

Total success flag.

total_stat

Total stat of the optimization step.

trace

Parameter trace of the optimisation step.

Methods Summary

write(path[, overwrite, full_output, ...])

Write to file.

Attributes Documentation

backend#

Optimizer backend used for the fit.

covariance_result#

Optimize result.

message#

Optimizer status message.

method#

Optimizer method used for the fit.

minuit#

Minuit object.

models#

Best fit parameters of the optimization step.

nfev#

Number of function evaluations of the optimisation step.

optimize_result#

Optimize result.

parameters#

Best fit parameters of the optimization step.

success#

Total success flag.

total_stat#

Total stat of the optimization step.

trace#

Parameter trace of the optimisation step.

Methods Documentation

write(path, overwrite=False, full_output=True, overwrite_templates=False, write_covariance=True, checksum=False)[source]#

Write to file.

Parameters:
pathpathlib.Path or str

Path to write files.

overwritebool, optional

Overwrite existing file. Default is False.

full_outputbool, optional

Store full parameter output. Default is True.

overwrite_templatesbool, optional

Overwrite templates FITS files. Default is False.

checksumbool, optional

When True adds a CHECKSUM entry to the file. Default is False.