Skip to content

Commit

Permalink
handle poi_name=None
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-held committed Sep 19, 2023
1 parent 20859aa commit bd890a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cabinetry/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,15 @@ def model_and_data(
- the data (plus auxdata if requested) for the model
"""
workspace = pyhf.Workspace(spec, validate=validate)
poi_name_kwarg = {"poi_name": poi_name} if poi_name is not None else {}
model = workspace.model(
validate=validate,
poi_name=poi_name,
modifier_set=modifier_set,
modifier_settings={
"normsys": {"interpcode": "code4"},
"histosys": {"interpcode": "code4p"},
},
**poi_name_kwarg,
) # use HistFactory InterpCode=4 (default in pyhf since v0.6.0)
if not asimov:
data = workspace.data(model, include_auxdata=include_auxdata)
Expand Down

0 comments on commit bd890a4

Please sign in to comment.