Skip to content

Commit 5087314

Browse files
authored
Merge pull request #15 from SpeysideHEP/simplify-bugfix
Bugfix in Simplify
2 parents 6d8b5a1 + 6165c1c commit 5087314

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

.zenodo.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"description": "pyhf plug-in for spey package",
33
"license": "MIT",
4-
"title": "SpeysideHEP/spey-pyhf: v0.1.7",
5-
"version": "v0.1.7",
4+
"title": "SpeysideHEP/spey-pyhf: v0.1.8",
5+
"version": "v0.1.8",
66
"upload_type": "software",
77
"creators": [
88
{
@@ -29,7 +29,7 @@
2929
},
3030
{
3131
"scheme": "url",
32-
"identifier": "https://github.com/SpeysideHEP/spey-pyhf/tree/v0.1.7",
32+
"identifier": "https://github.com/SpeysideHEP/spey-pyhf/tree/v0.1.8",
3333
"relation": "isSupplementTo"
3434
},
3535
{

docs/releases/changelog-v0.1.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
[#5](https://github.com/SpeysideHEP/spey-pyhf/issues/5).
4343
([#2](https://github.com/SpeysideHEP/spey-pyhf/pull/2))
4444

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

4750
This release contains contributions from (in alphabetical order):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
download_url=f"https://github.com/SpeysideHEP/spey-pyhf/archive/refs/tags/v{version}.tar.gz",
3939
author="Jack Y. Araz",
40-
author_email=("jackaraz@jlab.org"),
40+
author_email=("jack.araz@stonybrook.edu"),
4141
license="MIT",
4242
package_dir={"": "src"},
4343
packages=find_packages(where="src"),

src/spey_pyhf/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Version of the spey - pyhf plugin"""
22

3-
__version__ = "0.1.7"
3+
__version__ = "0.1.8"

src/spey_pyhf/simplify.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,12 @@ def __call__(
428428
elif convert_to == "default_pdf.effective_sigma":
429429
# Get 68% quantiles
430430
q = (1.0 - (norm.cdf(1.0) - norm.cdf(-1.0))) / 2.0
431+
# upper and lower uncertainties
431432
absolute_uncertainty_envelops = np.stack(
432-
[np.quantile(samples, q, axis=0), np.quantile(samples, 1 - q, axis=0)],
433+
[
434+
np.abs(np.quantile(samples, 1 - q, axis=0) - background_yields),
435+
np.abs(background_yields - np.quantile(samples, q, axis=0)),
436+
],
433437
axis=1,
434438
)
435439
save_kwargs.update(

0 commit comments

Comments
 (0)