Skip to content

Commit e9650da

Browse files
chore: [pre-commit.ci] pre-commit autoupdate (#55)
* chore: [pre-commit.ci] pre-commit autoupdate updates: - [github.com/asottile/pyupgrade: v3.19.1 → v3.20.0](asottile/pyupgrade@v3.19.1...v3.20.0) - https://github.com/psf/blackhttps://github.com/psf/black-pre-commit-mirror - [github.com/psf/black-pre-commit-mirror: 24.10.0 → 25.9.0](psf/black-pre-commit-mirror@24.10.0...25.9.0) - [github.com/PyCQA/flake8: 7.1.1 → 7.3.0](PyCQA/flake8@7.1.1...7.3.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 25a5471 commit e9650da

File tree

2 files changed

+19
-18
lines changed

2 files changed

+19
-18
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ ci:
44

55
repos:
66
- repo: https://github.com/asottile/pyupgrade
7-
rev: v3.19.1
7+
rev: v3.20.0
88
hooks:
99
- id: pyupgrade
1010
args: ["--py36-plus"]
1111

12-
- repo: https://github.com/psf/black
13-
rev: 24.10.0
12+
- repo: https://github.com/psf/black-pre-commit-mirror
13+
rev: 25.9.0
1414
hooks:
1515
- id: black
1616

1717
- repo: https://github.com/PyCQA/flake8
18-
rev: 7.1.1
18+
rev: 7.3.0
1919
hooks:
2020
- id: flake8

scripts/validate_systs.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
11
"""
2-
Date: 200325
3-
History:
4-
- Originally written as a python notebook by Lukas Heinrich
5-
- Adapted for the 3L-RJ likelihood validation by Giordon Stark (https://github.com/kratsg/3L-RJ-mimic-likelihood-validation/blob/master/OutlierPlot.ipynb)
6-
- Adapted and generalized to script by Danika MacDonell [March 25, 2020]
2+
Date: 200325
3+
History:
4+
- Originally written as a python notebook by Lukas Heinrich
5+
- Adapted for the 3L-RJ likelihood validation by Giordon Stark (https://github.com/kratsg/3L-RJ-mimic-likelihood-validation/blob/master/OutlierPlot.ipynb)
6+
- Adapted and generalized to script by Danika MacDonell [March 25, 2020]
77
8-
Details: Script to visualize the relative size of the systematics for pyhf likelihoods at each mass point, where the systematics are added together in quadrature. Should be run in a directory containing the background-only json likelihood file, along with a patch json likelihood file for each signal point. Assumes that all the json patch file are located at the same directory level as this script.
8+
Details: Script to visualize the relative size of the systematics for pyhf likelihoods at each mass point, where the systematics are added together in quadrature. Should be run in a directory containing the background-only json likelihood file, along with a patch json likelihood file for each signal point. Assumes that all the json patch file are located at the same directory level as this script.
99
10-
Usage:
11-
>> python OutlierPlot.py --signal_template <signal_template_{a}_{b}_{c}_for_masses> --x_var <which variable in signal name template to plot on x axis (defaults to 'a')> --y_var <which variable in signal name template to plot on x axis (defaults to 'b')> --v_max <max colourbar amplitude> --x_label <x axis label> --y_label <y axis label>
10+
Usage:
11+
>> python OutlierPlot.py --signal_template <signal_template_{a}_{b}_{c}_for_masses> --x_var <which variable in signal name template to plot on x axis (defaults to 'a')> --y_var <which variable in signal name template to plot on x axis (defaults to 'b')> --v_max <max colourbar amplitude> --x_label <x axis label> --y_label <y axis label>
1212
13-
Example for 1Lbb Wh analysis (https://glance.cern.ch/atlas/analysis/analyses/details.php?id=2969):
13+
Example for 1Lbb Wh analysis (https://glance.cern.ch/atlas/analysis/analyses/details.php?id=2969):
1414
15-
>> python OutlierPlot.py --signal_template C1N2_Wh_hbb_{a}_{b} --x_var a --y_var b --v_max 10 --x_label '$m(\tilde{\\chi}_{1}^{\\pm}/\tilde{\\chi}_{2}^{0})$ [GeV]' --y_label '$m(\tilde{\\chi}_{1}^{0})$ [GeV]'
15+
>> python OutlierPlot.py --signal_template C1N2_Wh_hbb_{a}_{b} --x_var a --y_var b --v_max 10 --x_label '$m(\tilde{\\chi}_{1}^{\\pm}/\tilde{\\chi}_{2}^{0})$ [GeV]' --y_label '$m(\tilde{\\chi}_{1}^{0})$ [GeV]'
1616
17-
The signal template is the name of an arbitrary signal in the json patch files, with the signal masses left as {}. Given a background-only file and a patch file, the signal name can be found under "samples" in the output of:
18-
>> jsonpatch BkgOnly.json patch_XXX.json | pyhf inspect
17+
The signal template is the name of an arbitrary signal in the json patch files, with the signal masses left as {}. Given a background-only file and a patch file, the signal name can be found under "samples" in the output of:
18+
>> jsonpatch BkgOnly.json patch_XXX.json | pyhf inspect
1919
20-
If, for example, one of the signals is called C1N2_Wh_hbb_550_200, where 550 and 200 are the variable model masses, the signal template would be C1N2_Wh_hbb_{}_{}.
21-
"""
20+
If, for example, one of the signals is called C1N2_Wh_hbb_550_200, where 550 and 200 are the variable model masses, the signal template would be C1N2_Wh_hbb_{}_{}.
21+
22+
"""
2223

2324
import json
2425
import glob

0 commit comments

Comments
 (0)