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_offarray_like

Observed number of counts in the off region

alphaarray_like

On / off region exposure ratio for background events

Returns
backgroundnumpy.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