pyhf icon indicating copy to clipboard operation
pyhf copied to clipboard

Documentation for parameter-related properties of `_ModelConfig`

Open alexander-held opened this issue 3 years ago • 1 comments

Summary

There are a few different things available in a model.config for accessing parameters:

  • model.config.parameters for an alphabetically sorted, non-expanded (staterror/shaperror) list,
  • model.config.par_order for a non-expanded list in the order that pyhf uses internally when handling and returning parameters,
  • model.config.par_names() for an expanded version of the list in the order used internally.

Only par_names() shows up in the _ModelConfig documentation at the moment. parameters presumably comes from the _ChannelSummaryMixin mixin, but I do not see this class in the documentation (if that was there, clicking through to it from the _ModelConfig page could be a convenient way to find additional properties coming from the base class).

model.config.parameters may not be that commonly needed, and could be obtained from model.config.par_order. The latter is very useful when using model.config.param_set().

See also #1024 for a few more points related to parameters vs par_order.

Documentation Page Link

https://pyhf.readthedocs.io/en/v0.6.3/_generated/pyhf.pdf._ModelConfig.html

Code of Conduct

  • [X] I agree to follow the Code of Conduct

alexander-held avatar Jan 20 '22 08:01 alexander-held

Thanks @alexander-held — 100% agree with you here. :+1:

matthewfeickert avatar Jan 20 '22 22:01 matthewfeickert