compute_chisq#

gammapy.stats.compute_chisq(flux)[source]#

Calculate the chi-square test for LightCurve.

Chisquare test is a variability estimator. It computes deviations from the expected value here mean value.

Parameters
fluxQuantity

The measured fluxes.

Returns
ChiSq, P-valuetuple of float or ndarray

Tuple of Chi-square and P-value.