[bugfix] merge_picks not checking for method_id

[cleanup] removed unnecessary Data()
This commit is contained in:
Marcel Paffrath 2017-08-17 15:47:42 +02:00
parent 76144252ea
commit 2b942338b0
2 changed files with 5 additions and 3 deletions

View File

@ -862,7 +862,11 @@ def merge_picks(event, picks):
network = pick.waveform_id.network_code
method = pick.method_id
for p in event.picks:
if p.waveform_id.station_code == station and p.phase_hint == phase:
if p.waveform_id.station_code == station\
and p.waveform_id.network_code == network\
and p.phase_hint == phase\
and str(p.method_id) in str(method)\
or str(method) in str(p.method_id):
p.time, p.time_errors, p.waveform_id.network_code, p.method_id = time, err, network, method
del time, err, phase, station, network, method
return event

View File

@ -776,7 +776,6 @@ def autopickstation(wfstream, pickparam, verbose=False,
################################################################
# get Wood-Anderson peak-to-peak amplitude
# initialize Data object
data = Data()
# re-create stream object including both horizontal components
hdat = edat.copy()
hdat += ndat
@ -795,7 +794,6 @@ def autopickstation(wfstream, pickparam, verbose=False,
############################################################
# get Wood-Anderson peak-to-peak amplitude
# initialize Data object
data = Data()
# re-create stream object including both horizontal components
hdat = edat.copy()
hdat += ndat