Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexander-held
Copy link
Member

@alexander-held alexander-held commented Jan 15, 2024

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:

  • ensure that this design is the right direction to go (could also support log settings per region in this fashion)
  • tests
  • consider also adding x-axis label setting and bin edge values (useful for workspaces built externally), could also be follow-up PR
* 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant