/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) 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):