Access modifier values #1735
-
Dear all, Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
Hi Shreya, what do you mean by "values of the modifiers"? Here is an example for how to access the constraint term width: import pyhf
model = pyhf.simplemodels.uncorrelated_background([6], [9], [3])
for parameter in model.config.par_order:
print(f"parameter {parameter} has type {dict(model.config.modifiers)[parameter]}")
if model.config.param_set(parameter).constrained:
print(f" width of parameter: {model.config.param_set(parameter).width()}") This might be useful for A nice (and I think quite general) approach may be using A more convoluted method is getting nominal parameter settings for all parameters (e.g. |
Beta Was this translation helpful? Give feedback.
-
Hi @alexander-held,
I would like to access these values - Best, |
Beta Was this translation helpful? Give feedback.
-
@alexander-held Hi! With regards, Ramdas |
Beta Was this translation helpful? Give feedback.
-
Thank you for information! I have 13 gamma NPs (for channel 3_lep_atLeast_3jets), and they are constrained_by_normal |
Beta Was this translation helpful? Give feedback.
Hi Shreya, what do you mean by "values of the modifiers"? Here is an example for how to access the constraint term width:
This might be useful for
staterror
pruning.A nice (and I think quite general) approach may be using
model._modifications
, but I cannot comment much on that since I have not tried it yet. See #1652 andvalidate_systs.py
.A more co…