Rebinning in the framework #451
-
Hi, I tried to set by "Binning" setup in "Regions" category, as
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Not currently, but this is planned: see #412 and a draft in #418. The best way to support this in my opinion is along the lines of what you show, allowing users provide explicit bin edges. This requires the feature to be supported upstream in An example for how to currently achieve rebinning can be found here: high-level API and implementation. It makes use of template builder overrides and works with histogram inputs. You would have to hardcode the new binning in there and manually re-bin (you can use config information to make decisions in that function, as this information is exposed). |
Beta Was this translation helpful? Give feedback.
Not currently, but this is planned: see #412 and a draft in #418. The best way to support this in my opinion is along the lines of what you show, allowing users provide explicit bin edges. This requires the feature to be supported upstream in
hist
, see scikit-hep/hist#345. At the moment this upstream issue blocks a proper implementation. The branch in #418 only supports uniform rebinning right now (which works for your example, but would e.g. not work for a target binning of [0, 250, 1000]).An example for how to currently achieve rebinning can be found here: high-level API and implementation. It makes use of template builder overrides and works with histogram inputs. You would have to ha…