background

gammapy.stats.background(n_off, alpha)[source]

Estimate background in the on-region from an off-region observation.

\[\mu_{background} = \alpha \times n_{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

Returns:

background : ndarray

Background estimate for the on region

Examples

>>> background(n_off=4, alpha=0.1)
0.4
>>> background(n_off=9, alpha=0.2)
1.8