Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Heimann
lassie
Commits
b69de43d
Commit
b69de43d
authored
Jul 11, 2017
by
Sebastian Heimann
Browse files
fix error in plotting of cf traces
parent
afa541a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/ifc.py
View file @
b69de43d
...
...
@@ -531,6 +531,7 @@ class ManualPickIFC(IFC):
nsl
=
tr
.
nslc_id
[:
3
]
try
:
index
=
nsl_to_index
[
nsl
]
print
nsl
ts
=
picked_times
[
picked_index
==
index
]
its
=
(
num
.
round
((
ts
-
tr
.
tmin
)
/
tr
.
deltat
)).
astype
(
num
.
int64
)
its
=
its
[
num
.
logical_and
(
0
<=
its
,
its
<
tr
.
data_len
())]
...
...
src/plot.py
View file @
b69de43d
...
...
@@ -198,12 +198,13 @@ def plot_detection(
station_index
=
dict
(
(
rec
.
codes
,
i
)
for
(
i
,
rec
)
in
enumerate
(
receivers
))
dists
=
[]
dists
_all
=
[]
amps
=
[]
shifts
=
[]
pdata2
=
[]
for
trs
,
shift_table
,
shifter
in
pdata
:
trs
=
[
tr
.
copy
()
for
tr
in
trs
]
dists
=
[]
for
tr
in
trs
:
istation
=
station_index
[
tr
.
nslc_id
[:
3
]]
shift
=
shift_table
[
imax
,
istation
]
...
...
@@ -217,10 +218,11 @@ def plot_detection(
amps
.
append
(
num
.
max
(
num
.
abs
(
amp
)))
shifts
.
append
(
shift
)
pdata2
.
append
((
trs
,
shift_table
,
shifter
))
pdata2
.
append
((
trs
,
dists
,
shift_table
,
shifter
))
dists_all
.
extend
(
dists
)
dist_min
=
min
(
dists
)
dist_max
=
max
(
dists
)
dist_min
=
min
(
dists
_all
)
dist_max
=
max
(
dists
_all
)
shift_min
=
min
(
shifts
)
shift_max
=
max
(
shifts
)
...
...
@@ -245,7 +247,7 @@ def plot_detection(
lw
=
2.
)
nsl_have
=
set
()
for
ishifter
,
(
trs
,
shift_table
,
shifter
)
in
enumerate
(
pdata2
):
for
ishifter
,
(
trs
,
dists
,
shift_table
,
shifter
)
in
enumerate
(
pdata2
):
color
=
plot
.
mpl_graph_color
(
ishifter
)
for
tr
,
dist
in
zip
(
trs
,
dists
):
...
...
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