SensitivityEstimator¶
-
class
gammapy.spectrum.
SensitivityEstimator
(spectrum=None, sigma=5.0, gamma_min=10)[source]¶ Bases:
object
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
sigma
, and being larger thangamma_min
andbkg_sys
percent larger than the number of background events in the ON region.- Parameters
- spectrum
SpectralModel
Spectral model assumption
- sigmafloat, optional
Minimum significance
- gamma_minfloat, optional
Minimum number of gamma-rays
- spectrum
Examples
For a usage example see cta_sensitivity.html
Methods Summary
estimate_min_e2dnde
(self, excess, dataset)Estimate dnde from given min.
estimate_min_excess
(self, dataset)Estimate minimum excess to reach the given significance.
run
(self, dataset)Run the sensitivty estimation
Methods Documentation
-
estimate_min_e2dnde
(self, excess, dataset)[source]¶ Estimate dnde from given min. excess
- Parameters
- excess
CountsSpectrum
Minimal excess
- dataset
SpectrumDataset
Spectrum dataset
- excess
- Returns
- e2dnde
Quantity
Minimal differential flux.
- e2dnde
-
estimate_min_excess
(self, dataset)[source]¶ Estimate minimum excess to reach the given significance.
- Parameters
- dataset
SpectrumDataset
Spectrum dataset
- dataset
- Returns
- excess
CountsSpectrum
Minimal excess
- excess
-
run
(self, dataset)[source]¶ Run the sensitivty estimation
- Parameters
- dataset
SpectrumDatasetOnOff
Dataset to compute sensitivty for.
- dataset
- Returns
- sensitivity
Table
Sensitivity table
- sensitivity