Skip to content

refactor: refactor internal plottable histogram and allow comparision of plottable histograms (for pulls, ratio, ...) #573

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

cyrraz
Copy link
Member

@cyrraz cyrraz commented Jun 12, 2025

The main goal goal of this PR is allow the comparison of histograms for creating ratio plots, pull plots, ...

  • The first step to achieve this goal is the introduction of the EnhancedPlottableHistogram class, inheriting from the UHI protocol.
  • The second step is the definition of the function ensure_plottable_histogram() that can convert ROOT, numpy, boost_histogram, Hist into an EnhancedPlottableHistogram.
  • The third step (still a work in progress) is to copy and adapt from plothist the comparison functions so that they take EnhancedPlottableHistogram objects and propagate the uncertainties. The comparison functions will use ensure_plottable_histogram() on the input histograms so that they can compare varied histogram types.
  • A minor change is the addition of a noxfile.py allowing to test `ROOT inputs.

This PR will be un-drafted when third step in completed.

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