Stats

class gammapy.stats.Stats(n_on, n_off, a_on, a_off)[source]

Bases: object

Container for an on-off observation.

Parameters:
n_on : array_like

Observed number of counts in the on region

n_off : array_like

Observed number of counts in the off region

a_on : array_like

Relative background exposure of the on region

a_off : array_like

Relative background exposure in the off region

Attributes Summary

alpha Background exposure ratio (float)
background Background estimate (float)
excess Excess (float)

Attributes Documentation

alpha

Background exposure ratio (float)

\[\alpha = a_\mathrm{on} / a_\mathrm{off}\]
background

Background estimate (float)

\[\mu_\mathrm{bg} = \alpha\ n_\mathrm{off}\]
excess

Excess (float)

\[n_\mathrm{ex} = n_\mathrm{on} - \mu_\mathrm{bg}\]