rebin_by_snr

gdt.core.binning.binned.rebin_by_snr(counts, count_uncert, exposure, old_edges, background_counts, snr)[source]

Rebins binned data such that each bin is above a minimum signal-to-noise ratio

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

  • background_counts (np.array) – The background counts in each bin

  • snr (float) – The minimum signal-to-ratio threshold

Returns:

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

The counts, uncertainty, and

exposure in each bin and the new bin edges