rebin_by_time¶
- gdt.core.binning.binned.rebin_by_time(counts, count_uncert, exposure, old_edges, dt)[source]¶
Rebins binned data to a specified temporal bin width.
If the requested bin width is smaller than some of the original bin widths, those bins will be left as is.
If the requested bin width is an exact factor of all the current bin widths, the resulting bin width will be exactly as requested. If the requested bin width is not an exact factor, then the resulting bin width will be approximately the requested bin width without exceeding the requested bin width.
- 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
dt (float) – The requested temporal bin width in seconds
- Returns:
(np.array, np.array, np.array, np.array) –
- The counts, uncertainty, and
exposure in each bin and the new bin edges