scikit-hep / cabinetry

design and steer profile likelihood fits
https://cabinetry.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
26 stars 21 forks source link

fix: set POI for limit calculations via dedicated pyhf API #364

Closed alexander-held closed 1 year ago

alexander-held commented 2 years ago

348 added the possibility to specify a custom POI via a kwarg in fit.limit. This was done by setting model.config.poi_name and model.config.poi_index directly, which is no longer possible after https://github.com/scikit-hep/pyhf/pull/1972 (see https://github.com/scikit-hep/pyhf/issues/1984). https://github.com/scikit-hep/pyhf/pull/1985 adds support for None POI values in model.config.set_poi, which allows that API to be used instead. This PR switches to this dedicated API to support temporarily changing the POI, which requires an update of the minimum pyhf version to 0.7.0rc4.

* use pyhf model.config.set_poi API to support temporary POI changes in limit calculations
codecov[bot] commented 2 years ago

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage :thumbsup:

Coverage data is based on head (c19b5f4) compared to base (a8ca551). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #364 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 23 23 Lines 2018 2013 -5 Branches 330 330 ========================================= - Hits 2018 2013 -5 ``` | [Impacted Files](https://codecov.io/gh/scikit-hep/cabinetry/pull/364?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep) | Coverage Δ | | |---|---|---| | [src/cabinetry/fit/\_\_init\_\_.py](https://codecov.io/gh/scikit-hep/cabinetry/pull/364/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep#diff-c3JjL2NhYmluZXRyeS9maXQvX19pbml0X18ucHk=) | `100.00% <100.00%> (ø)` | | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=scikit-hep)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.