sensitivity_on_off

gammapy.stats.sensitivity_on_off(n_off, alpha, significance, quantity='excess', method='lima')[source]

Compute sensitivity of an on-off observation.

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

quantity : {‘excess’, ‘n_on’}

Which output sensitivity quantity?

method : {‘lima’, ‘simple’}

Which method?

Returns:

sensitivity : numpy.ndarray

Sensitivity according to the method chosen.

Examples

>>> # sensitivity_on_off(n_off=20, alpha=0.1, significance=5, method='lima')
TODO
>>> # sensitivity_on_off(n_off=20, alpha=0.1, significance=5, method='simple')
2.5048971