[update] add try/except to autopickstation call

This commit is contained in:
Marcel Paffrath 2018-07-11 09:42:28 +02:00
parent 91959367d4
commit a0fcf03c1e

View File

@ -93,7 +93,9 @@ def autopickevent(data, param, iplot=0, fig_dict=None, fig_dict_wadatijack=None,
pool.close() pool.close()
for pick in result: for pick in result:
if pick: if type(pick) == BaseException:
print(pick)
elif pick:
station = pick['station'] station = pick['station']
pick.pop('station') pick.pop('station')
all_onsets[station] = pick all_onsets[station] = pick
@ -116,7 +118,10 @@ def call_autopickstation(input_tuple):
""" """
wfstream, pickparam, verbose, metadata, origin = input_tuple wfstream, pickparam, verbose, metadata, origin = input_tuple
# multiprocessing not possible with interactive plotting # multiprocessing not possible with interactive plotting
return autopickstation(wfstream, pickparam, verbose, iplot=0, metadata=metadata, origin=origin) try:
return autopickstation(wfstream, pickparam, verbose, iplot=0, metadata=metadata, origin=origin)
except Exception as e:
return e
def get_source_coords(parser, station_id): def get_source_coords(parser, station_id):