/metadata_class: Auto stash before merge of "feature/metadata_class" and "develop"
This commit is contained in:
parent
0cec2c81d3
commit
c3e8b2c03d
1
autopylot.sh
Normal file
1
autopylot.sh
Normal file
@ -0,0 +1 @@
|
|||||||
|
python ./autoPyLoT.py -i /home/marcel/.pylot/pylot_global.in -dmt processed -c 80
|
@ -92,13 +92,25 @@ def autopickevent(data, param, iplot=0, fig_dict=None, fig_dict_wadatijack=None,
|
|||||||
result = pool.map(call_autopickstation, input_tuples)
|
result = pool.map(call_autopickstation, input_tuples)
|
||||||
pool.close()
|
pool.close()
|
||||||
|
|
||||||
for pick in result:
|
if ncores == 1:
|
||||||
if type(pick) == BaseException:
|
results = serial_picking(input_tuples)
|
||||||
print(pick)
|
else:
|
||||||
elif pick:
|
results = parallel_picking(input_tuples, ncores)
|
||||||
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
|
# quality control
|
||||||
# median check and jackknife on P-onset times
|
# median check and jackknife on P-onset times
|
||||||
@ -119,9 +131,9 @@ 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
|
||||||
try:
|
try:
|
||||||
return autopickstation(wfstream, pickparam, verbose, iplot=0, metadata=metadata, origin=origin)
|
return autopickstation(wfstream, pickparam, verbose, iplot=0, metadata=metadata, origin=origin), wfstream
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return e
|
return e, wfstream
|
||||||
|
|
||||||
|
|
||||||
def get_source_coords(parser, station_id):
|
def get_source_coords(parser, station_id):
|
||||||
|
Loading…
Reference in New Issue
Block a user