scikit-hep / pyhf

pure-Python HistFactory implementation with tensors and autodiff
https://pyhf.readthedocs.io/
Apache License 2.0
284 stars 84 forks source link

Add a scan-type kwarg to pyhf.infer.intervals.upper_limits.upper_limit #2014

Closed kratsg closed 2 years ago

kratsg commented 2 years ago

Should this be done in this PR, or should there be a separate PR with a new API for pyhf.infer.upperlimit? The API for the scan argument would need to change and we'd need to decide what the default method should be.

_Originally posted by @beojan in https://github.com/scikit-hep/pyhf/pull/1274#discussion_r561891446_

matthewfeickert commented 2 years ago

@kratsg I think this can get closed, as the pyhf.infer.intervals.upper_limits.upper_limit in PR #1274 has scan=None as a default. If scan is None it uses the pyhf.infer.intervals.upper_limits.toms748_scan API, and otherwise it will use the scan argument given to it for the pyhf.infer.intervals.upper_limits.linear_grid_scan API.

Is this acceptable in your mind for an API?