cstat¶
-
gammapy.stats.
cstat
(n_on, mu_on, n_on_min=1e-25)[source]¶ C statistic, for Poisson data.
The C statistic is defined as
C=2[μon−non+non(log(non)−log(μon)]and C=0 where μon<=0.
n_on_min
handles the case wheren_on
is 0 or less and the log cannot be taken. For more information see Fit statistics- Parameters
- n_onarray_like
Observed counts
- mu_onarray_like
Expected counts
- n_on_minarray_like
n_on
=n_on_min
wheren_on
<=n_on_min.
- Returns
- statndarray
Statistic per bin
References