Note

You are not reading the most up to date version of Gammapy documentation.
Access the latest stable version v1.3 or the list of Gammapy releases.

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 : numpy.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