/metadata_class: Auto stash before merge of "feature/metadata_class" and "develop"

This commit is contained in:
Marcel Paffrath 2018-07-11 14:01:47 +02:00
parent 0cec2c81d3
commit c3e8b2c03d
2 changed files with 22 additions and 9 deletions

1
autopylot.sh Normal file
View File

@ -0,0 +1 @@
python ./autoPyLoT.py -i /home/marcel/.pylot/pylot_global.in -dmt processed -c 80

View File

@ -92,13 +92,25 @@ def autopickevent(data, param, iplot=0, fig_dict=None, fig_dict_wadatijack=None,
result = pool.map(call_autopickstation, input_tuples)
pool.close()
for pick in result:
if type(pick) == BaseException:
print(pick)
elif pick:
station = pick['station']
pick.pop('station')
all_onsets[station] = pick
if ncores == 1:
results = serial_picking(input_tuples)
else:
results = parallel_picking(input_tuples, ncores)
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
@ -119,9 +131,9 @@ def call_autopickstation(input_tuple):
wfstream, pickparam, verbose, metadata, origin = input_tuple
# multiprocessing not possible with interactive plotting
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:
return e
return e, wfstream
def get_source_coords(parser, station_id):