Skip to content

Commit

Permalink
Merge pull request #93 from MadAnalysis/covsubset_bugfix
Browse files Browse the repository at this point in the history
Bugfix in SL interface
  • Loading branch information
BFuks authored Jun 20, 2022
2 parents 770cafc + 37bda08 commit 9983894
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions doc/releases/changelog-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,22 +51,31 @@
## Bug fixes
* Zero division error fixed in the simplified likelihoods workflow.
([#4](https://github.com/MadAnalysis/madanalysis5/pull/4))

* Bug fix in the Pyhf wrapper.
([#10](https://github.com/MadAnalysis/madanalysis5/pull/10))

* The ability to flush previous executions has been added to the PADForSFS.
([#17](https://github.com/MadAnalysis/madanalysis5/pull/17))

* The `RecParticleFormat` dataformat now has an `ntracks()` accessor (as
required by the NormalMode).
([#56](https://github.com/MadAnalysis/madanalysis5/pull/56))

* Negative value can now be used for SFS bounds.
([#52](https://github.com/MadAnalysis/madanalysis5/pull/52))

* Bugfix for covariance matrix construction when global likelihood switch is off.
([#88](https://github.com/MadAnalysis/madanalysis5/pull/88))

* Update the version check message for the cases that local version is greater
than stable version. ([#91](https://github.com/MadAnalysis/madanalysis5/pull/91))
* Error handling has been fixed for the version update checker
([#95](https://github.com/MadAnalysis/madanalysis5/pull/95)).

* SL interface break has been fixed in cases of HL extrapolation.
([#93](https://github.com/MadAnalysis/madanalysis5/pull/93))

## Contributors

This release contains contributions from (in alphabetical order):
Expand Down
10 changes: 5 additions & 5 deletions madanalysis/misc/run_recast.py
Original file line number Diff line number Diff line change
Expand Up @@ -1727,9 +1727,9 @@ def write_cls_output(self, analysis, regions, regiondata, errordata, summary, xs
# Adding the global CLs from simplified likelihood
for cov_subset in self.cov_config.keys():
if not xsflag:
myxsexp = regiondata["cov_subset"][cov_subset]["s95exp"]
myxsobs = regiondata["cov_subset"][cov_subset]["s95obs"]
best = str(regiondata["cov_subset"][cov_subset].get("best",0))
myxsexp = regiondata["cov_subset"][cov_subset].get("s95exp", "-1")
myxsobs = regiondata["cov_subset"][cov_subset].get("s95obs", "-1")
best = str(regiondata["cov_subset"][cov_subset].get("best", 0))
myglobalcls = "%.4f" % regiondata["cov_subset"][cov_subset]["CLs"]
description = "[SL]-"+cov_subset
summary.write(analysis.ljust(30,' ') + description.ljust(60,' ') + best.ljust(10, ' ') +
Expand Down Expand Up @@ -1769,8 +1769,8 @@ def write_cls_output(self, analysis, regions, regiondata, errordata, summary, xs
for likelihood_profile in list(self.pyhf_config.keys()):
if likelihood_profile not in list(pyhf_data.keys()):
continue
myxsexp = pyhf_data.get(likelihood_profile,{}).get('s95exp',"-1")
myxsobs = pyhf_data.get(likelihood_profile,{}).get('s95obs',"-1")
myxsexp = pyhf_data.get(likelihood_profile, {}).get('s95exp', "-1")
myxsobs = pyhf_data.get(likelihood_profile, {}).get('s95obs', "-1")
if not xsflag:
self.logger.debug(str(pyhf_data))
mycls = '{:.4f}'.format(pyhf_data.get(likelihood_profile,{}).get('CLs', 0.))
Expand Down

0 comments on commit 9983894

Please sign in to comment.