From 6883930fa2fbde8510efa0525c5ac0bf49f626dd Mon Sep 17 00:00:00 2001 From: Alexander Held Date: Tue, 20 Dec 2022 14:19:50 +0100 Subject: [PATCH] handle poi_name=None --- src/cabinetry/model_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cabinetry/model_utils.py b/src/cabinetry/model_utils.py index 493029be..984bc757 100644 --- a/src/cabinetry/model_utils.py +++ b/src/cabinetry/model_utils.py @@ -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)