Skip to content

Commit 7be8a23

Browse files
committed
Add q0 test statistic as valid option to CLI infer interface
The CLI API (e.g. `pyhf cls`) allows the test statistic to be set, but it limits the options to `q` and `qtilde`. However, the discovery test statistic `q0` is also a valid option here, but it can't currently be set on the command line. This commit is a simple fix; it adds `q0` to the list of allowed arguments to `pyhf cls --test-stat`.
1 parent 40ebf6d commit 7be8a23

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/contributors.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ Contributors include:
3636
- Lorenz Gaertner
3737
- Melissa Weber Mendonça
3838
- Matthias Bussonnier
39+
- Ben Rosser

src/pyhf/cli/infer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def fit(
144144
@click.option('--measurement', default=None)
145145
@click.option('-p', '--patch', multiple=True)
146146
@click.option('--test-poi', default=1.0)
147-
@click.option('--test-stat', type=click.Choice(['q', 'qtilde']), default='qtilde')
147+
@click.option('--test-stat', type=click.Choice(['q', 'qtilde', 'q0']), default='qtilde')
148148
@click.option(
149149
'--calctype', type=click.Choice(['asymptotics', 'toybased']), default='asymptotics'
150150
)

0 commit comments

Comments
 (0)