[bugfix] empty picks dictionary leading to KeyError
This commit is contained in:
parent
db9a1371b1
commit
cc9ae9c146
@ -506,6 +506,8 @@ class Data(object):
|
|||||||
# check for automatic picks
|
# check for automatic picks
|
||||||
print("Writing phases to ObsPy-quakeml file")
|
print("Writing phases to ObsPy-quakeml file")
|
||||||
for key in picks:
|
for key in picks:
|
||||||
|
if not picks[key].get('P'):
|
||||||
|
continue
|
||||||
if picks[key]['P']['picker'] == 'auto':
|
if picks[key]['P']['picker'] == 'auto':
|
||||||
print("Existing auto-picks will be overwritten in pick-dictionary!")
|
print("Existing auto-picks will be overwritten in pick-dictionary!")
|
||||||
picks = picks_from_picksdict(picks)
|
picks = picks_from_picksdict(picks)
|
||||||
|
Loading…
Reference in New Issue
Block a user