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

API to access allowed values for an input #170

Open
nsmith- opened this issue Mar 8, 2023 · 1 comment
Open

API to access allowed values for an input #170

nsmith- opened this issue Mar 8, 2023 · 1 comment
Labels
enhancement New feature or request evaluator Issues related to the evaluator

Comments

@nsmith-
Copy link
Collaborator

nsmith- commented Mar 8, 2023

When using a correction, in particular for systematic string inputs, it would be useful to be able to enumerate the allowed values to automate the processing of systematic uncertainties. This would be an evaluator call.

At present, from the schema, one can access such info through the summary method:

import correctionlib.schemav2 as cs
cset = cs.CorrectionSet.parse_file("jectest.json")
nodecounts, input_summaries = cset.corrections[1].summary()
print(input_summaries["systematic"].values)

would return {'nom', 'up', 'down'}

Both this current method and a future evaluator call would need to be modified for #5

@nsmith- nsmith- added enhancement New feature or request evaluator Issues related to the evaluator labels Mar 8, 2023
@swertz
Copy link
Contributor

swertz commented Mar 8, 2023

This would be very nice; also getting access to the list of correction names in a correctionSet would be useful (e.g., at the moment the JERC uncertainties are implemented as different correction objects). It should be easy enough to give access to the keys of the maps in the CorrectionSet object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request evaluator Issues related to the evaluator
Development

No branches or pull requests

2 participants