pyhs3.parameter_context.ParameterContext¶
- class pyhs3.parameter_context.ParameterContext(parameter_set, domain=<factory>, parameters_of_interest=())[source]¶
Resolved parameter context: starting values,
constset, bounds and POIs.The context is fixed when a model is built:
constparameters become graph constants, every other parameter a graph input.- Variables:
parameter_set – The referenced parameter point (an analysis
initor an explicit override); gives the starting values and theconstflags.domain – The domain giving the parameter bounds (for an analysis, its domains merged into one).
parameters_of_interest – Names of the parameters of interest, in the order the analysis lists them; empty when there is no analysis or it lists none.
Examples
>>> from pyhs3.domains import ProductDomain >>> from pyhs3.parameter_points import ParameterPoint, ParameterSet >>> context = ParameterContext( ... parameter_set=ParameterSet( ... name="init", ... parameters=[ ... ParameterPoint(name="mu", value=1.0), ... ParameterPoint(name="lumi", value=1.0, const=True), ... ], ... ), ... domain=ProductDomain( ... name="dom", axes=[{"name": "mu", "min": 0.0, "max": 5.0}] ... ), ... parameters_of_interest=("mu",), ... ) >>> context.values {'mu': 1.0, 'lumi': 1.0} >>> sorted(context.const) ['lumi'] >>> context.bounds {'mu': (0.0, 5.0)}
- Parameters:
parameter_set (
ParameterSet)domain (
Domain)
- __init__(parameter_set, domain=<factory>, parameters_of_interest=())¶
- Parameters:
parameter_set (
ParameterSet)domain (
Domain)
Methods
__init__(parameter_set[, domain, ...])Attributes
(lower, upper)of every coordinate axis of the domain;-inf/inffor an open side.Names of the parameters that are
constin the parameter point.Name of the referenced parameter point.
Starting value of every parameter in the parameter point,
constones included.
- ParameterContext.bounds¶
(lower, upper)of every coordinate axis of the domain;-inf/inffor an open side.Constant axes have no bounds and are left out.
- ParameterContext.const¶
Names of the parameters that are
constin the parameter point.
- ParameterContext.name¶
Name of the referenced parameter point.
- ParameterContext.parameters_of_interest¶
- ParameterContext.values¶
Starting value of every parameter in the parameter point,
constones included.
- ParameterContext.parameter_set¶
- ParameterContext.domain¶