rebin_by_edge

gdt.core.binning.binned.rebin_by_edge(counts, count_uncert, exposure, old_edges, new_edges)[source]

Rebins binned data based on an array of bin edge indices

Parameters:
  • counts (np.array) – The counts in each bin

  • count_uncert (np.array) – The uncertainty in each bin

  • exposure (np.array) – The exposure of each bin

  • old_edges (np.array) – The time edges of each bin

  • new_edges (np.array) – The new edges of the binned data

Returns:

(np.array, np.array, np.array, np.array)

The counts, uncertainty, and

exposure in each bin and the new bin edges