SensitivityEstimator¶
-
class
gammapy.spectrum.SensitivityEstimator(irf, livetime, slope=2.0, alpha=0.2, sigma=5.0, gamma_min=10.0, bkg_sys=0.05)[source]¶ Bases:
objectEstimate differential sensitivity.
Uses a 1D spectral analysis and on / off measurement.
Parameters: irf :
CTAPerfIRF object
livetime :
QuantityLivetime (object with the units of time), e.g. 5*u.h
slope : float, optional
Index of the spectral shape (Power-law), should be positive (>0)
alpha : float, optional
On/OFF normalisation
sigma : float, optional
Minimum significance
gamma_min : float, optional
Minimum number of gamma-rays
bkg_sys : float, optional
Fraction of Background systematics relative to the number of ON counts
Notes
For the moment, only the differential point-like sensitivity is computed at a fixed offset. 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_minandbkg_syspercent larger than the number of background events in the ON region.Examples
Compute and plot a sensitivity curve for CTA:
from gammapy.irf import CTAPerf from gammapy.spectrum import SensitivityEstimator filename = '$GAMMAPY_DATA/cta/perf_prod2/point_like_non_smoothed/South_5h.fits.gz' irf = CTAPerf.read(filename) sensitivity_estimator = SensitivityEstimator(irf=irf, livetime='5h') sensitivity_estimator.run() print(sensitivity_estimator.results_table)
Further examples in cta_sensitivity.html .
Attributes Summary
results_tableResults table ( Table).Methods Summary
run()Run the computation. Attributes Documentation
Methods Documentation