Merge branch 'develop' into feature/refactor
This commit is contained in:
@@ -89,14 +89,22 @@ def autopickevent(data, param, iplot=0, fig_dict=None, fig_dict_wadatijack=None,
|
||||
'stations on {} cores.'.format(len(input_tuples), ncores_str))
|
||||
|
||||
pool = gen_Pool(ncores)
|
||||
result = pool.map(call_autopickstation, input_tuples)
|
||||
results = pool.map(call_autopickstation, input_tuples)
|
||||
pool.close()
|
||||
|
||||
for pick in result:
|
||||
if pick:
|
||||
station = pick['station']
|
||||
pick.pop('station')
|
||||
all_onsets[station] = pick
|
||||
for result, wfstream in results:
|
||||
if type(result) == dict:
|
||||
station = result['station']
|
||||
result.pop('station')
|
||||
all_onsets[station] = result
|
||||
else:
|
||||
if result == None:
|
||||
result = 'Picker exited unexpectedly.'
|
||||
if len(wfstream) > 0:
|
||||
station = wfstream[0].stats.station
|
||||
else:
|
||||
station = None
|
||||
print('Could not pick a station: {}\nReason: {}'.format(station, result))
|
||||
|
||||
# quality control
|
||||
# median check and jackknife on P-onset times
|
||||
@@ -116,7 +124,10 @@ def call_autopickstation(input_tuple):
|
||||
"""
|
||||
wfstream, pickparam, verbose, metadata, origin = input_tuple
|
||||
# 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), wfstream
|
||||
except Exception as e:
|
||||
return e, wfstream
|
||||
|
||||
|
||||
def get_source_coords(parser, station_id):
|
||||
|
||||
Reference in New Issue
Block a user