Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
DavidWalz
airshower-deeplearning
Commits
0135c794
Commit
0135c794
authored
May 05, 2017
by
DavidWalz
Browse files
merge
parents
dd1eae31
9e3c3923
Changes
1
Hide whitespace changes
Inline
Side-by-side
plotting.py
View file @
0135c794
...
...
@@ -17,7 +17,7 @@ def maybe_save(fig, fname):
def
plot_array
(
v_stations
,
values
,
v_core
=
None
,
v_axis
=
None
,
label
=
''
,
title
=
''
,
vmin
=
None
,
vmax
=
None
,
fname
=
None
):
label
=
''
,
title
=
''
,
vmin
=
None
,
vmax
=
None
,
fname
=
None
):
"""Plot a map *values* for an detector array specified by *v_stations*. """
print
(
'Plot event'
)
xd
,
yd
,
zd
=
v_stations
.
T
/
1000
# in [km]
...
...
@@ -133,7 +133,6 @@ def plot_phi_distribution(phi, fname=None):
ax
.
set_ylabel
(
'frequency'
)
maybe_save
(
fig
,
fname
)
def
plot_xmax_distribution
(
Xmax
,
fname
=
None
):
""" histogram of Xmax values """
print
(
'Plot Xmax distribution'
)
...
...
@@ -184,6 +183,18 @@ def plot_stations_vs_phi(phi, S, fname=None):
ax
.
set_ylabel
(
'Number of Stations'
)
maybe_save
(
fig
,
fname
)
def
plot_tanks_with_hits_vs_zenith
(
v_axis
,
S
):
''' plot tanks with hits against zenith angular
gets v_axis, S=Signal '''
zenith
=
utils
.
vec2ang
(
v_axis
)[
1
]
*
180
/
np
.
pi
nt
=
np
.
sum
(
~
np
.
isnan
(
S
),
axis
=
(
1
))
fig
=
plt
.
figure
()
ax
=
sns
.
regplot
(
x
=
zenith
,
y
=
nt
,
x_bins
=
np
.
linspace
(
0
,
60
,
30
),
fit_reg
=
False
)
ax
.
grid
()
ax
.
set_xlabel
(
'zenith [degree]'
)
ax
.
set_ylabel
(
'Number of Stations'
)
fig
.
savefig
(
'./nstations_vs_zenith.png'
)
if
__name__
==
'__main__'
:
d
=
np
.
load
(
'showers.npz'
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment