combine_by_factor

gdt.core.binning.unbinned.combine_by_factor(times, old_edges, bin_factor, tstart=None, tstop=None)[source]

Bins individual events to a multiple factor of bins given a set of bin edges

Parameters:
  • times (np.array) – The time of each event

  • old_edges (np.array) – The edges to be combined

  • bin_factor (int) – The number of bins to be combined

  • tstart (float, optional) – The first bin edge time. Will use the first event time if omitted.

  • tstop – (float, optional): The last bin edge time. Will use the last event time if omitted.

Returns:

np.array – The edges of the binned data