Skip to content

Commit

Permalink
test: Add poi_name='mu' to pyhf.Model creation
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Sep 13, 2023
1 parent dff9a64 commit 6dc67f6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/test_backend_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def test_hypotest_qmu_tilde(
else [signal_sample, background_sample]
)
spec = {'channels': [{'name': 'singlechannel', 'samples': samples}]}
pdf = pyhf.Model(spec)
pdf = pyhf.Model(spec, poi_name="mu")

data = source['bindata']['data'] + pdf.config.auxdata

Expand Down
8 changes: 4 additions & 4 deletions tests/test_optim.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ def spec(source):

@pytest.mark.parametrize('mu', [1.0], ids=['mu=1'])
def test_optim(backend, source, spec, mu):
pdf = pyhf.Model(spec)
pdf = pyhf.Model(spec, poi_name="mu")
data = source['bindata']['data'] + pdf.config.auxdata

init_pars = pdf.config.suggested_init()
Expand All @@ -336,7 +336,7 @@ def test_optim(backend, source, spec, mu):

@pytest.mark.parametrize('mu', [1.0], ids=['mu=1'])
def test_optim_with_value(backend, source, spec, mu):
pdf = pyhf.Model(spec)
pdf = pyhf.Model(spec, poi_name="mu")
data = source['bindata']['data'] + pdf.config.auxdata

init_pars = pdf.config.suggested_init()
Expand Down Expand Up @@ -364,7 +364,7 @@ def test_optim_with_value(backend, source, spec, mu):
@pytest.mark.parametrize('mu', [1.0], ids=['mu=1'])
@pytest.mark.only_numpy_minuit
def test_optim_uncerts(backend, source, spec, mu):
pdf = pyhf.Model(spec)
pdf = pyhf.Model(spec, poi_name="mu")
data = source['bindata']['data'] + pdf.config.auxdata

init_pars = pdf.config.suggested_init()
Expand All @@ -391,7 +391,7 @@ def test_optim_uncerts(backend, source, spec, mu):
@pytest.mark.parametrize('mu', [1.0], ids=['mu=1'])
@pytest.mark.only_numpy_minuit
def test_optim_correlations(backend, source, spec, mu):
pdf = pyhf.Model(spec)
pdf = pyhf.Model(spec, poi_name="mu")
data = source['bindata']['data'] + pdf.config.auxdata

init_pars = pdf.config.suggested_init()
Expand Down
4 changes: 3 additions & 1 deletion tests/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,9 @@ def test_validation(setup):
source = setup['source']

pdf = pyhf.Model(
setup['spec'], modifier_settings={'normsys': {'interpcode': 'code1'}}
setup["spec"],
modifier_settings={"normsys": {"interpcode": "code1"}},
poi_name="mu",
)

if 'channels' in source:
Expand Down

0 comments on commit 6dc67f6

Please sign in to comment.