SensitivityEstimator#

class gammapy.estimators.SensitivityEstimator(spectrum=None, n_sigma=5.0, gamma_min=10, bkg_syst_fraction=0.05)[source]#

Bases: gammapy.estimators.core.Estimator

Estimate differential sensitivity.

This class allows to determine for each reconstructed energy bin the flux associated to the number of gamma-ray events for which the significance is n_sigma, and being larger than gamma_min and bkg_sys percent larger than the number of background events in the ON region.

Parameters
spectrumSpectralModel

Spectral model assumption

n_sigmafloat, optional

Minimum significance. Default is 5.

gamma_minfloat, optional

Minimum number of gamma-rays. Default is 10.

bkg_syst_fractionfloat, optional

Fraction of background counts above which the number of gamma-rays is. Default is 0.05

Examples

For a usage example see Point source sensitivity tutorial.

Attributes Summary

config_parameters

Config parameters

selection_optional

tag

Methods Summary

copy()

Copy estimator

estimate_min_e2dnde(excess, dataset)

Estimate dnde from given min.

estimate_min_excess(dataset)

Estimate minimum excess to reach the given significance.

run(dataset)

Run the sensitivity estimation

Attributes Documentation

config_parameters#

Config parameters

selection_optional#
tag = 'SensitivityEstimator'#

Methods Documentation

copy()#

Copy estimator

estimate_min_e2dnde(excess, dataset)[source]#

Estimate dnde from given min. excess

Parameters
excessRegionNDMap

Minimal excess

datasetSpectrumDataset

Spectrum dataset

Returns
e2dndeQuantity

Minimal differential flux.

estimate_min_excess(dataset)[source]#

Estimate minimum excess to reach the given significance.

Parameters
datasetSpectrumDataset

Spectrum dataset

Returns
excessRegionNDMap

Minimal excess

run(dataset)[source]#

Run the sensitivity estimation

Parameters
datasetSpectrumDatasetOnOff

Dataset to compute sensitivity for.

Returns
sensitivityTable

Sensitivity table