EnergyDependentMorphologyEstimator#

class gammapy.estimators.EnergyDependentMorphologyEstimator(energy_edges, source=0, fit=None)[source]#

Bases: Estimator

Test if there is any energy-dependent morphology in a map dataset for a given set of energy bins.

Parameters:
energy_edgeslist of Quantity

Energy edges for the energy-dependence test.

sourcestr or int

For which source in the model to compute the estimator.

fitFit, optional

Fit instance specifying the backend and fit options. If None, the fit backend default is minuit. Default is None.

Examples

For a usage example see Morphological energy dependence estimation tutorial.

Attributes Summary

config_parameters

Configuration parameters.

selection_optional

tag

Methods Summary

copy()

Copy estimator.

estimate_energy_dependence(datasets)

Estimate the potential of energy-dependent morphology.

run(datasets)

Run the energy-dependence estimator.

Attributes Documentation

config_parameters#

Configuration parameters.

selection_optional#
tag = 'EnergyDependentMorphologyEstimator'#

Methods Documentation

copy()#

Copy estimator.

estimate_energy_dependence(datasets)[source]#

Estimate the potential of energy-dependent morphology.

Parameters:
datasetsDatasets

Input datasets to use.

Returns:
resultsdict

Dictionary with results of the energy-dependence test. Entries are:

  • “delta_ts” : difference in ts between fitting each energy band individually (sliced fit) and the joint fit

  • “df” : the degrees of freedom between fitting each energy band individually (sliced fit) and the joint fit

  • “result” : the results for the fitting each energy band individually (sliced fit) and the joint fit

run(datasets)[source]#

Run the energy-dependence estimator.

Parameters:
datasetsDatasets

Input datasets to use.

Returns:
resultsdict

Dictionary with the various energy-dependence estimation values. There are two top level keys energy_dependence (detailing the morphology energy dependence and its significance) and src_above_bkg (giving significance of the source per energy bin).

energy_dependence (dict):

  • “delta_ts” : delta(TS) between the different hypotheses

  • “df” : the number of degrees of freedom

  • “result” (dict) : contains the results of the two hypotheses with columns ‘Hypothesis’, ‘Emin’, ‘Emax’ and each free parameter with its error

src_above_bkg (dict):

  • “Emin” : the minimum energy of the energy band

  • “Emax” : the maximum energy of the energy band

  • “delta_ts” : difference in ts

  • “df” : the number of degrees of freedom between null and alternative hypothesis

  • “significance” : significance of the result