Stats¶
-
class
gammapy.stats.
Stats
(n_on, n_off, a_on, a_off)[source]¶ Bases:
object
Container for an on-off observation.
- Parameters
- n_onarray_like
Observed number of counts in the on region
- n_offarray_like
Observed number of counts in the off region
- a_onarray_like
Relative background exposure of the on region
- a_offarray_like
Relative background exposure in the off region
Attributes Summary
Background exposure ratio (float).
Background estimate (float).
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}\]