Relative Content

Tag Archive for pythonuproot

rebinning hist object from linear bins to log(x) bins in scikit-hep hist

I am trying to rebin my hist objects from linear bins to log(x) bins. I see on the UHI read the docs on indexing (https://uhi.readthedocs.io/en/latest/indexing.html#) that it is possible to linear rebin with h == h[::rebin(2)], but this gives all bins the same width still. Is it possible to rebin with user defined bin edges? In this case, I wanted log(x) bins. If it is not possible, I am also thinking about making a new hist object that meets the log(x) bins by slicing the original histogram in a loop, each loop being each bin edges.

rebinning hist object from linear bins to log(x) bins in scikit-hep hist

I am trying to rebin my hist objects from linear bins to log(x) bins. I see on the UHI read the docs on indexing (https://uhi.readthedocs.io/en/latest/indexing.html#) that it is possible to linear rebin with h == h[::rebin(2)], but this gives all bins the same width still. Is it possible to rebin with user defined bin edges? In this case, I wanted log(x) bins. If it is not possible, I am also thinking about making a new hist object that meets the log(x) bins by slicing the original histogram in a loop, each loop being each bin edges.