scikit-hep / cabinetry

design and steer profile likelihood fits
https://cabinetry.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
26 stars 19 forks source link

feat: support bin width normalization in data/MC plots #452

Open alexander-held opened 6 months ago

alexander-held commented 6 months ago

This adds a new plot_options dictionary to visualize.data_mc which allows configuring figure options per region. The normalize_binwidth setting takes a reference width (as a number) and a unit (as a string) to then normalize the distribution accordingly. An example looks like this:

plot_options = {"Signal_region": {"normalize_binwidth": (100, "GeV")}}
cabinetry.visualize.data_mc(
    prediction_prefit, data, config=config, plot_options=plot_options
)

to-do:

* add new plot_options setting to allow customizing figures per region in visualize.data_mc
* support bin width normalization via normalize_binwidth setting in plot_options