-
Notifications
You must be signed in to change notification settings - Fork 13
Update external postfit functionality #102
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
base: main
Are you sure you want to change the base?
Changes from all commits
d596b4a
54a575c
c061cbd
7036274
79ff7ae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -817,16 +817,16 @@ def make_plot( | |
| h_den = h_inclusive | ||
|
|
||
| if diff: | ||
| h1 = hh.addHists(h_inclusive, h_den, scale2=-1) | ||
| h0 = hh.addHists(h_num, h_num, scale2=-1) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess you're using this to get an empty histogram with the same size as
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is actually only used to draw the grey line around 1 (or 0 in case the difference is plot), without errors. |
||
| h2 = hh.addHists(h_data, h_den, scale2=-1) | ||
| if h_data_stat is not None: | ||
| h2_stat = hh.divideHists( | ||
| h_data_stat, h_den, cutoff=cutoff, rel_unc=True | ||
| ) | ||
| else: | ||
| h1 = hh.divideHists( | ||
| h_inclusive, | ||
| h_den, | ||
| h0 = hh.divideHists( | ||
| h_num, | ||
| h_num, | ||
| cutoff=1e-8, | ||
| rel_unc=True, | ||
| flow=False, | ||
|
|
@@ -839,7 +839,7 @@ def make_plot( | |
| ) | ||
|
|
||
| hep.histplot( | ||
| h1, | ||
| h0, | ||
| histtype="step", | ||
| color="grey", | ||
| alpha=0.5, | ||
|
|
@@ -1311,14 +1311,7 @@ def make_plots( | |
| h_data_stat = None | ||
|
|
||
| if hists_up is not None: | ||
| hup = [ | ||
| ( | ||
| h[{k.replace("Sig", ""): v for k, v in idxs.items()}] | ||
| if h is not None | ||
| else None | ||
| ) | ||
| for h in hists_up | ||
| ] | ||
| hup = [h[idxs] if h is not None else None for h in hists_up] | ||
| else: | ||
| hup = None | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It may be helpful to be more descriptive in this help section (or perhaps start a documentation?), because honestly I don't always follow the intricacies of these settings; in particular, here, I'm not sure what the use case for this is, and even a short sentence to give more context may help the layman user :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've modified the help message. In general I agree that we should come up with a better documentation.