Skip to content

Commit

Permalink
Merge pull request #15 from SpeysideHEP/simplify-bugfix
Browse files Browse the repository at this point in the history
Bugfix in Simplify
  • Loading branch information
jackaraz authored Dec 10, 2024
2 parents 6d8b5a1 + 6165c1c commit 5087314
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"description": "pyhf plug-in for spey package",
"license": "MIT",
"title": "SpeysideHEP/spey-pyhf: v0.1.7",
"version": "v0.1.7",
"title": "SpeysideHEP/spey-pyhf: v0.1.8",
"version": "v0.1.8",
"upload_type": "software",
"creators": [
{
Expand All @@ -29,7 +29,7 @@
},
{
"scheme": "url",
"identifier": "https://github.com/SpeysideHEP/spey-pyhf/tree/v0.1.7",
"identifier": "https://github.com/SpeysideHEP/spey-pyhf/tree/v0.1.8",
"relation": "isSupplementTo"
},
{
Expand Down
3 changes: 3 additions & 0 deletions docs/releases/changelog-v0.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
[#5](https://github.com/SpeysideHEP/spey-pyhf/issues/5).
([#2](https://github.com/SpeysideHEP/spey-pyhf/pull/2))

* Bugfix in uncertainty quantification for full statistical model mapping on effective sigma
([#15](https://github.com/SpeysideHEP/spey-pyhf/pull/15))

## Contributors

This release contains contributions from (in alphabetical order):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
download_url=f"https://github.com/SpeysideHEP/spey-pyhf/archive/refs/tags/v{version}.tar.gz",
author="Jack Y. Araz",
author_email=("[email protected]"),
author_email=("[email protected]"),
license="MIT",
package_dir={"": "src"},
packages=find_packages(where="src"),
Expand Down
2 changes: 1 addition & 1 deletion src/spey_pyhf/_version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Version of the spey - pyhf plugin"""

__version__ = "0.1.7"
__version__ = "0.1.8"
6 changes: 5 additions & 1 deletion src/spey_pyhf/simplify.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,12 @@ def __call__(
elif convert_to == "default_pdf.effective_sigma":
# Get 68% quantiles
q = (1.0 - (norm.cdf(1.0) - norm.cdf(-1.0))) / 2.0
# upper and lower uncertainties
absolute_uncertainty_envelops = np.stack(
[np.quantile(samples, q, axis=0), np.quantile(samples, 1 - q, axis=0)],
[
np.abs(np.quantile(samples, 1 - q, axis=0) - background_yields),
np.abs(background_yields - np.quantile(samples, q, axis=0)),
],
axis=1,
)
save_kwargs.update(
Expand Down

0 comments on commit 5087314

Please sign in to comment.