Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CTA-LAPP
RTA
HiPeRTA_Stream
Commits
c77b2b94
Commit
c77b2b94
authored
Apr 01, 2021
by
Pierre Aubert
Browse files
Check nan in plot dl1 param
parent
726ab9c3
Pipeline
#112414
passed with stage
in 1 minute and 40 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
hiperta_stream/stream_plot_dl1.py
hiperta_stream/stream_plot_dl1.py
+19
-15
No files found.
hiperta_stream/stream_plot_dl1.py
View file @
c77b2b94
...
...
@@ -20,13 +20,15 @@ def plotCalibEvent(pdf, tabImage, varName, nbbin):
strValue
=
varName
+
", size = "
+
str
(
tabValue
.
size
)
+
", Min : "
+
str
(
tabValue
.
min
())
+
", max : "
+
str
(
tabValue
.
max
())
+
", mean : "
+
str
(
tabValue
.
mean
())
+
", std : "
+
str
(
tabValue
.
std
())
print
(
strValue
)
plt
.
hist
(
tabValue
,
bins
=
nbbin
,
alpha
=
1.0
)
plt
.
xlabel
(
varName
)
plt
.
title
(
"Signal "
+
varName
)
plt
.
ylabel
(
"nb"
)
plt
.
yscale
(
"log"
)
plt
.
grid
()
try
:
plt
.
hist
(
tabValue
,
bins
=
nbbin
,
alpha
=
1.0
)
plt
.
xlabel
(
varName
)
plt
.
title
(
"Signal "
+
varName
)
plt
.
ylabel
(
"nb"
)
plt
.
yscale
(
"log"
)
plt
.
grid
()
except
ValueError
:
print
(
"Only NaN in"
,
varName
,
" => skip plot"
)
plt
.
text
(
0.05
,
0.95
,
strValue
,
transform
=
fig
.
transFigure
,
size
=
14
)
pdf
.
savefig
()
# saves the current figure into a pdf page
plt
.
close
()
...
...
@@ -50,14 +52,16 @@ def plotParam(pdf, tabParam, tabIsGoodEvent, varName, nbbin):
strValue
=
varName
+
", size = "
+
str
(
tabValue
.
size
)
+
", Min : "
+
str
(
tabValue
.
min
())
+
", max : "
+
str
(
tabValue
.
max
())
+
", mean : "
+
str
(
tabValue
.
mean
())
+
", std : "
+
str
(
tabValue
.
std
())
print
(
strValue
)
plt
.
hist
(
tabValue
,
bins
=
nbbin
,
alpha
=
1.0
)
plt
.
xlabel
(
varName
)
plt
.
title
(
"Parameter "
+
varName
)
plt
.
ylabel
(
"nb"
)
plt
.
yscale
(
"log"
)
plt
.
grid
()
try
:
plt
.
hist
(
tabValue
,
bins
=
nbbin
,
alpha
=
1.0
)
plt
.
xlabel
(
varName
)
plt
.
title
(
"Parameter "
+
varName
)
plt
.
ylabel
(
"nb"
)
plt
.
yscale
(
"log"
)
plt
.
grid
()
except
ValueError
:
print
(
"Only NaN in"
,
varName
,
" => skip plot"
)
plt
.
text
(
0.05
,
0.95
,
strValue
,
transform
=
fig
.
transFigure
,
size
=
14
)
pdf
.
savefig
()
# saves the current figure into a pdf page
plt
.
close
()
except
KeyError
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment