scikit-hep / hist

Histogramming for analysis powered by boost-histogram
https://hist.readthedocs.io
BSD 3-Clause "New" or "Revised" License
127 stars 26 forks source link

[FEATURE] Add the option to disable flow when using project #545

Open chrispap95 opened 11 months ago

chrispap95 commented 11 months ago

When projecting to an axis of a multi-dimensional histogram, the flow bins are always included. This may be desired by default but it would be nice to be able to discard the flow bins. For example, one might want to make a cut on one axis:

h_new = h_old[10j:50j, :, :, :]

and then check how the other variables look like after the cut:

h_new.project("axis_2")

This is going to be the same as h_old.project("axis_2") since flow is always included. What I am suggesting is:

h_new.project("axis_2", flow=False)

which would show what happens to axis_2 after the cut on axis_0.