discrete_correlation#

gammapy.stats.discrete_correlation(flux1, flux_err1, flux2, flux_err2, time1, time2, tau, axis=0)[source]#

Compute the discrete correlation function for a variable source.

Parameters:
flux1, flux_err1: `~astropy.units.Quantity`

The first set of measured fluxes and associated error.

flux2, flux_err2Quantity

The second set of measured fluxes and associated error.

time1, time2Quantity

The time coordinates at which the fluxes are measured.

tauQuantity

Size of the bins to compute the discrete correlation.

axisint, optional

Axis along which the correlation is computed. Default is 0.

Returns:
bincenters: Quantity

Array of discrete time bins.

discrete_correlation: ndarray

Array of discrete correlation function values for each bin.

discrete_correlation_errndarray

Error associated to the discrete correlation values.

References

[Edelson1988]

“THE DISCRETE CORRELATION FUNCTION: A NEW METHOD FOR ANALYZING UNEVENLY SAMPLED VARIABILITY DATA”, Edelson et al. (1988) https://ui.adsabs.harvard.edu/abs/1988ApJ…333..646E/abstract