SensitivityEstimator¶
-
class
gammapy.estimators.SensitivityEstimator(spectrum=None, n_sigma=5.0, gamma_min=10, bkg_syst_fraction=0.05)[source]¶ Bases:
gammapy.estimators.EstimatorEstimate 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 thangamma_minandbkg_syspercent larger than the number of background events in the ON region.- Parameters
- spectrum
SpectralModel 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
- spectrum
Examples
For a usage example see cta_sensitivity.html
Attributes Summary
Config parameters
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.
get_sqrt_ts(ts, norm)Compute sqrt(TS) value.
run(dataset)Run the sensitivty 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
- excess
RegionNDMap Minimal excess
- dataset
SpectrumDataset Spectrum dataset
- excess
- Returns
- e2dnde
Quantity Minimal differential flux.
- e2dnde
-
estimate_min_excess(dataset)[source]¶ Estimate minimum excess to reach the given significance.
- Parameters
- dataset
SpectrumDataset Spectrum dataset
- dataset
- Returns
- excess
RegionNDMap Minimal excess
- excess
-
static
get_sqrt_ts(ts, norm)¶ Compute sqrt(TS) value.
Compute sqrt(TS) as defined by:
\[\begin{split}\sqrt{TS} = \left \{ \begin{array}{ll} -\sqrt{TS} & : \text{if} \ norm < 0 \\ \sqrt{TS} & : \text{else} \end{array} \right.\end{split}\]