rebin

sherpa.utils.rebin(y0, x0lo, x0hi, x1lo, x1hi)[source] [edit on github]

Rebin a histogram.

Parameters
  • y0 (sequence of numbers) – The Y values of the histogram to rebin.

  • x0lo (sequence of numbers) – The lower and upper edges of the X values to rebin. They must match the size of y0.

  • x0hi (sequence of numbers) – The lower and upper edges of the X values to rebin. They must match the size of y0.

  • x1lo (sequence of numbers) – The lower and upper edges of the X values of the output histogram.

  • x1hi (sequence of numbers) – The lower and upper edges of the X values of the output histogram.

Returns

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

Return type

NumPy array of numbers