tried worker function

This commit is contained in:
Marcel Paffrath 2016-05-23 12:06:55 +02:00
parent 41b7ca6968
commit 093f750aa1

View File

@ -327,6 +327,7 @@ class SeismicShot(object):
def pickParallel(self, folm, method = 'hos', aicwindow = (10, 0)):
import multiprocessing
from pylot.core.util.utils import worker
self.setFolm(folm)
self.setMethod(method)
@ -337,12 +338,11 @@ class SeismicShot(object):
traceIDs = self.getTraceIDlist()
picks = pool.map(self.pickTrace, traceIDs)
picks = worker(self.pickTrace, traceIDs, maxthreads)
for traceID, pick in picks:
self.setPick(traceID, pick)
def pickTrace(self, traceID):
'''
Intitiate picking for a trace.