Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: add more flexibility to visualize.pulls #342
base: master
Are you sure you want to change the base?
feat: add more flexibility to visualize.pulls #342
Changes from 6 commits
000a7d3
80458f5
11126cf
fefece4
9ed8358
6a3ab96
fc581ca
f5bd953
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 am wondering whether we should extract and save the information about the constraint term (none, Gaussian, Poisson) instead of the modifier types. The problem with the types is that a parameter may control multiple modifiers (e.g. a
normsys
plus ashapesys
). For the purpose of plotting pulls, the constraint term type is all that is needed to decide the handling.We could get the constraint term types like this:
Going one step further, we could also save the
.width()
information to evaluate constraints for Poisson-constrained parameters (since the pre-fit uncertainty for those varies per parameter).For other use cases (like #332) it might be useful to also know all the modifier types.
While it is currently possible to determine the constraint term type from knowing the modifier, that will change when constraint terms become configurable in the future with
pyhf
. So perhaps it is best to store constraint term information directly, and optionally add another field in the future to also keep track of the modifier types?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 am remembering now where the idea of storing the modifier types come from: that allows to exclude by type in the plot, like excluding
staterror
. The constraint term type does not help there. It seems more likely that users would want to exclude by modifier type than by constraint term type, so perhaps it is best to stick with the implemented approach. The only thing that would need to be generalized is matching multiple modifier types.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.
Something like the following could help simplify things by using more of the
pyhf
API: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 believe this removal is related to making figure customization easier via style sheets? If so, could we split that out into a separate PR? I'd like things to be more easily configurable, but I also do think the minor ticks help with legibility of constraints. Is there a way to move this into a default style sheet that users could override?