excess_matching_significance_on_off¶
-
gammapy.stats.
excess_matching_significance_on_off
(n_off, alpha, significance, method='lima')[source]¶ Compute sensitivity of an on-off observation.
This function is the inverse of
significance_on_off
.Parameters: n_off : array_like
Observed number of counts in the off region
alpha : array_like
On / off region exposure ratio for background events
significance : array_like
Desired significance level
method : {‘lima’, ‘simple’}
Which method?
Returns: excess :
numpy.ndarray
Excess
Examples
>>> excess_matching_significance_on_off(n_off=20,alpha=0.1,significance=5,method='lima') 12.038 >>> excess_matching_significance_on_off(n_off=20,alpha=0.1,significance=5,method='simple') 27.034 >>> excess_matching_significance_on_off(n_off=20,alpha=0.1,significance=0,method='lima') 2.307301461e-09 >>> excess_matching_significance_on_off(n_off=20,alpha=0.1,significance=0,method='simple') 0.0 >>> excess_matching_significance_on_off(n_off=20,alpha=0.1,significance=-10,method='lima') nan >>> excess_matching_significance_on_off(n_off=20,alpha=0.1,significance=-10,method='simple') nan