autocorr#

elk.stats.autocorr(time, flux, largest_gap_allowed=0.25, plot=False, **plot_kwargs)[source]#

Calculate the autocorrelation function for an array of fluxes

Parameters
timendarray

Times of observations

fluxndarray

Flux for each observations

largest_gap_allowedfloat, optional

Largest gap in the data which is allowed in a chunk (in days), by default 0.25

plotbool, optional

Whether to show a plot of the autocorrelation, by default False

plot_kwargsvarious

Arguments to pass to elk.plot.plot_acf

Returns
ac_timendarray

Times evaluated for the autocorrelation function

acfndarray

The autocorrelation function

confintndarray

1-sigma confidence interval around the autocorrelation function with shape (len(ac_time), 2)

acf_statsdict

Some simple stats for the autocorrelation function

fig, axFigure, AxesSubplot

Figure and axis on which the correlation function has been plotted