You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
will remove all normsys modifiers and anything with a NP called "Modeling".
I currently see no convenient way to prune when requiring multiple conditions to be satisfied simultaneously, i.e. a logical "and" between the kwargs. As an example, I would want something like
to prune all normsys modifiers acting on the "ttbar" sample (better API ideas welcome).
I would be happy to find out if there is already a way to achieve this, otherwise I think it would be a useful addition (I just ran into it while thinking about scikit-hep/cabinetry#445).
Additional Information
n/a
Code of Conduct
I agree to follow the Code of Conduct
The text was updated successfully, but these errors were encountered:
#994 is along similar lines here. If I was to make this a bit more flexible, I'd rely on something more like XPath support so you can do .samples[name="ttbar"].modifiers[kind="normsys"] or similar. But to first order, could rewrite some of the logic to allow for a flag like this. Although for something more complex, you can always fallback to jq.
Indeed this can also be solved externally without too much effort (and for some specific cases that might be the best way). I think an "and" combination would provide flexibility that would be useful to provide centrally in pyhf. The "or" could equally achieved by chaining multiple prune together, while "and" cannot.
Summary
As far as I can see, the current
pyhf.Workspace.prune
approach is to prune anything that matches any of its arguments. This means e.g. thatwill remove all
normsys
modifiers and anything with a NP called"Modeling"
.I currently see no convenient way to prune when requiring multiple conditions to be satisfied simultaneously, i.e. a logical "and" between the kwargs. As an example, I would want something like
to prune all
normsys
modifiers acting on the"ttbar"
sample (better API ideas welcome).I would be happy to find out if there is already a way to achieve this, otherwise I think it would be a useful addition (I just ran into it while thinking about scikit-hep/cabinetry#445).
Additional Information
n/a
Code of Conduct
The text was updated successfully, but these errors were encountered: