Module rebin

Module rebin 

Source
Expand description

Energy rebinning: coarsen the TOF/energy axis by integer factor.

Two modes:

  • Counts: sum adjacent bins (conserves total counts).
  • Transmission: average adjacent bins (T = I/I₀ is a ratio, so bin-averaging with uniform I₀ gives the correct result).

Functions§

rebin_centers
Rebin bin centers by averaging each group of factor centers.
rebin_counts
Rebin a 3D counts array along axis 0 by summing groups of factor slices.
rebin_edges
Rebin bin edges by keeping every factor-th edge, always including the final edge.
rebin_transmission
Rebin a 3D transmission array along axis 0 by averaging groups of factor slices.