Merge branch 'develop' into feature/metadata_class
This commit is contained in:
commit
c376364206
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 = parallel_picking(input_tuples, ncores)
|
result = parallel_picking(input_tuples, ncores)
|
||||||
#result = serial_picking(input_tuples)
|
#result = serial_picking(input_tuples)
|
||||||
|
|
||||||
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
|
||||||
@ -133,9 +145,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