[bugfix] missing network code in picksdict_from_picks triggered silent Exception using picks generated by picks_from_picksdict

This commit is contained in:
Marcel Paffrath 2017-06-26 13:58:26 +02:00
parent b10b79ea79
commit 581a85b81f
2 changed files with 3 additions and 1 deletions

View File

@ -61,7 +61,7 @@ class Data(object):
else:
raise e
else: # create an empty Event object
self.setNew()
#self.setNew()
evtdata = ObsPyEvent()
evtdata.picks = []
self.evtdata = evtdata

View File

@ -196,6 +196,7 @@ def picksdict_from_picks(evt):
phase = {}
station = pick.waveform_id.station_code
channel = pick.waveform_id.channel_code
network = pick.waveform_id.network_code
try:
onsets = picks[station]
except KeyError as e:
@ -216,6 +217,7 @@ def picksdict_from_picks(evt):
phase['lpp'] = lpp
phase['spe'] = spe
phase['channel'] = channel
phase['network'] = network
try:
picker = str(pick.method_id)
if picker.startswith('smi:local/'):