Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auxdata kwarg harmonization in expected / observed data #1561

Closed
alexander-held opened this issue Aug 25, 2021 · 0 comments · Fixed by #1562
Closed

Auxdata kwarg harmonization in expected / observed data #1561

alexander-held opened this issue Aug 25, 2021 · 0 comments · Fixed by #1562
Assignees
Labels
API Changes the public API user request Request coming form a pyhf user

Comments

@alexander-held
Copy link
Member

Description

The API for expected and observed data (from model / workspace) uses two different names for the kwarg to steer whether auxdata should be included in the return value:

import pyhf

model = pyhf.simplemodels.uncorrelated_background(
    signal=[12.0, 11.0], bkg=[50.0, 52.0], bkg_uncertainty=[3.0, 7.0]
)
print(model.expected_data([0.0, 1.0, 1.0], include_auxdata=False))

ws = pyhf.Workspace.build(model, [52.0, 53.0])
print(ws.data(model, with_aux=False))

expected_data uses include_auxdata, while data uses with_aux. I am opening this issue to suggest harmonizing the naming.

Is your feature request related to a problem? Please describe.

I occasionally confuse the kwarg names, of course a very minor problem.

Describe the solution you'd like

Harmonization of the kwargs.

Describe alternatives you've considered

Sticking with current state, and/or using higher-level interfaces (cabinetry.model_utils) to avoid having to remember the name.

Relevant Issues and Pull Requests

none

Additional context

none

@kratsg kratsg self-assigned this Aug 25, 2021
@kratsg kratsg added user request Request coming form a pyhf user API Changes the public API labels Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Changes the public API user request Request coming form a pyhf user
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants