[bugfix] missing network code in picksdict_from_picks triggered silent Exception using picks generated by picks_from_picksdict
This commit is contained in:
parent
b10b79ea79
commit
581a85b81f
@ -61,7 +61,7 @@ class Data(object):
|
|||||||
else:
|
else:
|
||||||
raise e
|
raise e
|
||||||
else: # create an empty Event object
|
else: # create an empty Event object
|
||||||
self.setNew()
|
#self.setNew()
|
||||||
evtdata = ObsPyEvent()
|
evtdata = ObsPyEvent()
|
||||||
evtdata.picks = []
|
evtdata.picks = []
|
||||||
self.evtdata = evtdata
|
self.evtdata = evtdata
|
||||||
|
@ -196,6 +196,7 @@ def picksdict_from_picks(evt):
|
|||||||
phase = {}
|
phase = {}
|
||||||
station = pick.waveform_id.station_code
|
station = pick.waveform_id.station_code
|
||||||
channel = pick.waveform_id.channel_code
|
channel = pick.waveform_id.channel_code
|
||||||
|
network = pick.waveform_id.network_code
|
||||||
try:
|
try:
|
||||||
onsets = picks[station]
|
onsets = picks[station]
|
||||||
except KeyError as e:
|
except KeyError as e:
|
||||||
@ -216,6 +217,7 @@ def picksdict_from_picks(evt):
|
|||||||
phase['lpp'] = lpp
|
phase['lpp'] = lpp
|
||||||
phase['spe'] = spe
|
phase['spe'] = spe
|
||||||
phase['channel'] = channel
|
phase['channel'] = channel
|
||||||
|
phase['network'] = network
|
||||||
try:
|
try:
|
||||||
picker = str(pick.method_id)
|
picker = str(pick.method_id)
|
||||||
if picker.startswith('smi:local/'):
|
if picker.startswith('smi:local/'):
|
||||||
|
Loading…
Reference in New Issue
Block a user