rebin

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

Rebin a histogram.

Parameters:
y0sequence of numbers

The Y values of the histogram to rebin.

x0lo, x0hisequence of numbers

The lower and upper edges of the X values to rebin. They must match the size of y0.

x1lo, x1hisequence of numbers

The lower and upper edges of the X values of the output histogram.

Returns:
youtNumPy array of numbers

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