stats - Statistics#

gammapy.stats Package#

Statistics.

Functions#

cash(n_on, mu_on[, truncation_value])

Cash statistic, for Poisson data.

cash_sum_cython(counts, npred)

Summed cash fit statistics.

cstat(n_on, mu_on[, truncation_value])

C statistic, for Poisson data.

f_cash_root_cython(x, counts, background, model)

Function to find root of.

get_wstat_gof_terms(n_on, n_off)

Goodness of fit terms for WSTAT.

get_wstat_mu_bkg(n_on, n_off, alpha, mu_sig)

Background estimate mu_bkg for WSTAT.

norm_bounds_cython(counts, background, model)

Compute bounds for the root of _f_cash_root_cython.

wstat(n_on, n_off, alpha, mu_sig[, mu_bkg, ...])

W statistic, for Poisson data with Poisson background.

compute_fvar(flux, flux_err[, axis])

Calculate the fractional excess variance.

compute_fpp(flux, flux_err[, axis])

Calculate the point-to-point excess variance.

compute_flux_doubling(flux, flux_err, coords)

Compute the minimum characteristic flux doubling and halving over a certain coordinate axis for a series of measurements.

compute_chisq(flux)

Calculate the chi-square test for LightCurve.

structure_function(flux, flux_err, time[, ...])

Compute the discrete structure function for a variable source.

discrete_correlation(flux1, flux_err1, ...)

Compute the discrete correlation function for a variable source.

TimmerKonig_lightcurve_simulator(...[, ...])

Implementation of the Timmer-Koenig algorithm to simulate a time series from a power spectrum.

Classes#

CashCountsStatistic(n_on, mu_bkg)

Class to compute statistics for Poisson distributed variable with known background.

WStatCountsStatistic(n_on, n_off, alpha[, ...])

Class to compute statistics for Poisson distributed variable with unknown background.