rebin

sherpa.utils.rebin(y0, x0lo, x0hi, x1lo, x1hi)

Rebin a histogram.

Parameters:
  • y0 (sequence of numbers) – The Y values of the histogram to rebin.
  • x0lo (sequence of numbers) – The lower edges of the X values to rebin. This must match the size of y0.
  • x0hi (sequence of numbers) – The upper edges of the X values to rebin. This must match the size of y0.
  • x1lo (sequence of numbers) – The lower edges of the X values of the output histogram.
  • x1hi (sequence of numbers) – The upper edges of the X values of the output histogram. This must match the size of x1lo.
Returns:

yout – The re-binned Y values (same size as x1lo).

Return type:

NumPy array of numbers