Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
km3mon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
km3py
km3mon
Commits
340990c2
Commit
340990c2
authored
5 years ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Update lower limits
parent
0aac4ea0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
scripts/ztplot.py
+4
-9
4 additions, 9 deletions
scripts/ztplot.py
with
4 additions
and
9 deletions
scripts/ztplot.py
+
4
−
9
View file @
340990c2
...
...
@@ -149,12 +149,12 @@ class ZTPlot(kp.Module):
n_triggered_hits
=
sum
(
hits
.
triggered
)
# Check for new record
is_
new_record
=
overlays
>
self
.
lower_limits
[
is_
in_top10
=
overlays
>
self
.
lower_limits
[
'
overlays
'
]
or
n_hits
>
self
.
lower_limits
[
'
n_hits
'
]
or
n_triggered_hits
>
self
.
lower_limits
[
"
n_triggered_hits
"
]
if
(
utc_timestamp
-
self
.
last_plot_time
)
<
60
and
not
is_
new_record
:
if
(
utc_timestamp
-
self
.
last_plot_time
)
<
60
and
not
is_
in_top10
:
self
.
log
.
debug
(
"
Skipping plot...
"
)
return
...
...
@@ -193,16 +193,10 @@ class ZTPlot(kp.Module):
grid_lines
=
grid_lines
)
shutil
.
move
(
f_tmp
,
f
)
if
is_
new_record
:
if
is_
in_top10
:
self
.
cprint
(
"
New record! Overlays: {}, hits: {}, triggered hits: {}
"
.
format
(
overlays
,
n_hits
,
n_triggered_hits
))
if
overlays
>
self
.
lower_limits
[
'
overlays
'
]:
self
.
lower_limits
[
'
overlays
'
]
=
overlays
if
n_hits
>
self
.
lower_limits
[
'
n_hits
'
]:
self
.
lower_limits
[
'
n_hits
'
]
=
n_hits
if
n_triggered_hits
>
self
.
lower_limits
[
'
n_triggered_hits
'
]:
self
.
lower_limits
[
'
n_triggered_hits
'
]
=
n_triggered_hits
plot_filename
=
os
.
path
.
join
(
self
.
plots_path
,
...
...
@@ -218,6 +212,7 @@ class ZTPlot(kp.Module):
run_id
,
det_id
,
frame_index
,
trigger_counter
,
utc_timestamp
])
shutil
.
copy
(
f
,
plot_filename
)
self
.
_update_lower_limits
()
plt
.
close
(
fig
)
plt
.
close
(
'
all
'
)
...
...
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