simple_downsample

astropy_timeseries.simple_downsample(time_series, time_bin_size, func=None, time_bin_start=None, n_bins=None)[source] [edit on github]

Downsample a time series by binning values into bins with a fixed size, using a single function

Parameters:
time_series : TimeSeries

The time series to downsample.

time_bin_size : Quantity

The time interval for the binned time series

func : callable, optional

The function to use for combining points in the same bin. Defaults to np.nanmean.

time_bin_start : Time, optional

The start time for the binned time series. Defaults to the first time in the sampled time series.

n_bins : int, optional

The number of bins to use. Defaults to the number needed to fit all the original points.

Returns:
binned_time_series : BinnedTimeSeries

The downsampled time series.