[bugfix] comparison should not through an KeyError due to missing picks
This commit is contained in:
parent
416f4c7aa7
commit
c489fad6ba
@ -146,7 +146,12 @@ class Comparison(object):
|
|||||||
pdf_dict = self.comparison
|
pdf_dict = self.comparison
|
||||||
std_array = list()
|
std_array = list()
|
||||||
for station, phases in pdf_dict.items():
|
for station, phases in pdf_dict.items():
|
||||||
|
try:
|
||||||
std_array.append(phases[phase].standard_deviation())
|
std_array.append(phases[phase].standard_deviation())
|
||||||
|
except KeyError as e:
|
||||||
|
print('{err_msg}; station = {station}, phase = {phase}'.format(
|
||||||
|
err_msg=str(e), station=station, phase=phase))
|
||||||
|
continue
|
||||||
return std_array
|
return std_array
|
||||||
|
|
||||||
def hist_expectation(self, phases='all', bins=20, normed=False):
|
def hist_expectation(self, phases='all', bins=20, normed=False):
|
||||||
|
Loading…
Reference in New Issue
Block a user