[update] add try/except to autopickstation call
This commit is contained in:
parent
91959367d4
commit
a0fcf03c1e
@ -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):
|
||||||
|
Loading…
Reference in New Issue
Block a user