CONAN.utils.bin_data#
- CONAN.utils.bin_data(t, f, err=None, statistic='mean', bins=20)#
Bin data in time.
- Parameters:
t (array-like) – Time stamps.
f (array-like) – Fluxes.
err (array-like) – Flux uncertainties.
statistic (str) – Statistic to compute in each bin. [‘mean’,’median’,’std’,’count’,’sum’,’max’] See scipy.stats.binned_statistic.
bins (int or array-like) – Number of bins or bin edges. See scipy.stats.binned_statistic.
- Returns:
t_bin (array-like) – Binned time stamps.
f_bin (array-like) – Binned fluxes.
err_bin (array-like) – Binned flux uncertainties. Only returned if err is not None.