Capture possible error occuring due to to incomplete dictonaries.
This commit is contained in:
parent
da360990f6
commit
e4cfebe989
@ -886,7 +886,6 @@ def writephases(arrivals, fformat, filename, parameter=None, eventinfo=None):
|
||||
try:
|
||||
eventsource = eventinfo.origins[0]
|
||||
except:
|
||||
print("No source origin given! Locate event first!")
|
||||
print("No source origin calculated yet, thus no cnv-file creation possible!")
|
||||
return
|
||||
eventsource = eventinfo.origins[0]
|
||||
|
@ -123,8 +123,11 @@ class Comparison(object):
|
||||
compare_pdf = dict()
|
||||
for phase in phases:
|
||||
if phase in pdf_b[station].keys():
|
||||
try:
|
||||
compare_pdf[phase] = phases[phase] - pdf_b[station][
|
||||
phase]
|
||||
except:
|
||||
compare_pdf = None
|
||||
if compare_pdf is not None:
|
||||
compare_pdfs[station] = compare_pdf
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user