[add] --ncores flag added to autoPyLoT call, also enabled in GUI widget

This commit is contained in:
2017-08-03 11:49:15 +02:00
parent 90006809a5
commit 154e7b459f
5 changed files with 42 additions and 19 deletions

View File

@@ -21,7 +21,7 @@ from pylot.core.pick.utils import checksignallength, checkZ4S, earllatepicker, \
from pylot.core.util.utils import getPatternLine, gen_Pool
def autopickevent(data, param, iplot=0, fig_dict=None):
def autopickevent(data, param, iplot=0, fig_dict=None, ncores=0):
stations = []
all_onsets = {}
input_tuples = []
@@ -50,7 +50,7 @@ def autopickevent(data, param, iplot=0, fig_dict=None):
print('iPlot Flag active: NO MULTIPROCESSING possible.')
return all_onsets
pool = gen_Pool()
pool = gen_Pool(ncores)
result = pool.map(call_autopickstation, input_tuples)
pool.close()