Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
inference
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gourab Saha
inference
Commits
4e9b83c1
Commit
4e9b83c1
authored
4 years ago
by
Marcel Rieger
Browse files
Options
Downloads
Patches
Plain Diff
Fix z-axis resolution in 2D likelihood plots.
parent
e0b32e67
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dhi/plots/likelihoods.py
+6
-6
6 additions, 6 deletions
dhi/plots/likelihoods.py
dhi/tasks/likelihoods.py
+4
-3
4 additions, 3 deletions
dhi/tasks/likelihoods.py
with
10 additions
and
9 deletions
dhi/plots/likelihoods.py
+
6
−
6
View file @
4e9b83c1
...
...
@@ -431,7 +431,7 @@ def plot_likelihood_scan_2d(
draw_objs
.
append
((
h_dummy
,
""
))
# setup the nll hist
r
.
setup_hist
(
h_nll
,
props
=
{
"
Contour
XX
"
:
100
,
"
Minimum
"
:
z_min
,
"
Maximum
"
:
z_max
})
r
.
setup_hist
(
h_nll
,
props
=
{
"
Contour
"
:
100
,
"
Minimum
"
:
z_min
,
"
Maximum
"
:
z_max
})
r
.
setup_z_axis
(
h_nll
.
GetZaxis
(),
pad
=
pad
,
props
=
{
"
Title
"
:
z_title
,
"
TitleOffset
"
:
1.3
})
draw_objs
.
append
((
h_nll
,
"
SAME,COLZ
"
))
...
...
@@ -819,15 +819,15 @@ def plot_nuisance_likelihood_scans(
draw_objs
=
[(
h_dummy
,
"
HIST
"
)]
legend_entries
=
[]
# horizontal guidance line at dnll = 1 in log scale
if
y_log
and
(
_y_min
<
1.
<
y_max_line
):
# horizontal and vertical guidance lines
if
(
_y_min
<
1
<
y_max_line
)
and
(
y_log
or
y_max_line
<
100
):
# horizontal
line
=
ROOT
.
TLine
(
x_min
,
1.
,
x_max
,
1.
)
r
.
setup_line
(
line
,
props
=
{
"
LineColor
"
:
12
,
"
LineStyle
"
:
2
,
"
NDC
"
:
False
})
draw_objs
.
append
(
line
)
# vertical guidance lines in log scale
for
x
in
[
-
1
,
1
]:
if
y_log
and
(
x_min
<
x
<
x_max
):
# vertical
for
x
in
[
-
1
,
1
]:
line
=
ROOT
.
TLine
(
x
,
_y_min
,
x
,
min
(
1.
,
y_max_line
))
r
.
setup_line
(
line
,
props
=
{
"
LineColor
"
:
12
,
"
LineStyle
"
:
2
,
"
NDC
"
:
False
})
draw_objs
.
append
(
line
)
...
...
This diff is collapsed.
Click to expand it.
dhi/tasks/likelihoods.py
+
4
−
3
View file @
4e9b83c1
...
...
@@ -97,7 +97,7 @@ class MergeLikelihoodScan(LikelihoodBase):
data
=
[]
dtype
=
[(
p
,
np
.
float32
)
for
p
in
self
.
scan_parameter_names
]
+
[
(
"
d
elta_
nll
"
,
np
.
float32
),
(
"
dnll
"
,
np
.
float32
),
(
"
dnll2
"
,
np
.
float32
),
]
poi_mins
=
self
.
n_pois
*
[
np
.
nan
]
...
...
@@ -106,7 +106,8 @@ class MergeLikelihoodScan(LikelihoodBase):
scan_values
=
branch_map
[
branch
]
f
=
inp
.
load
(
formatter
=
"
uproot
"
)[
"
limit
"
]
failed
=
len
(
f
[
"
deltaNLL
"
].
array
())
<=
1
dnll
=
f
[
"
deltaNLL
"
].
array
()
failed
=
len
(
dnll
)
<=
1
if
failed
:
data
.
append
(
scan_values
+
(
np
.
nan
,
np
.
nan
))
continue
...
...
@@ -116,7 +117,7 @@ class MergeLikelihoodScan(LikelihoodBase):
poi_mins
=
[
f
[
p
].
array
()[
0
]
for
p
in
self
.
pois
]
# store the value of that point
dnll
=
f
[
"
deltaNLL
"
].
array
()
[
1
]
dnll
=
dnll
[
1
]
data
.
append
(
scan_values
+
(
dnll
,
dnll
*
2.0
))
data
=
np
.
array
(
data
,
dtype
=
dtype
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment