tried worker function
This commit is contained in:
parent
41b7ca6968
commit
093f750aa1
@ -327,6 +327,7 @@ class SeismicShot(object):
|
|||||||
|
|
||||||
def pickParallel(self, folm, method = 'hos', aicwindow = (10, 0)):
|
def pickParallel(self, folm, method = 'hos', aicwindow = (10, 0)):
|
||||||
import multiprocessing
|
import multiprocessing
|
||||||
|
from pylot.core.util.utils import worker
|
||||||
|
|
||||||
self.setFolm(folm)
|
self.setFolm(folm)
|
||||||
self.setMethod(method)
|
self.setMethod(method)
|
||||||
@ -337,12 +338,11 @@ class SeismicShot(object):
|
|||||||
|
|
||||||
traceIDs = self.getTraceIDlist()
|
traceIDs = self.getTraceIDlist()
|
||||||
|
|
||||||
picks = pool.map(self.pickTrace, traceIDs)
|
picks = worker(self.pickTrace, traceIDs, maxthreads)
|
||||||
|
|
||||||
for traceID, pick in picks:
|
for traceID, pick in picks:
|
||||||
self.setPick(traceID, pick)
|
self.setPick(traceID, pick)
|
||||||
|
|
||||||
|
|
||||||
def pickTrace(self, traceID):
|
def pickTrace(self, traceID):
|
||||||
'''
|
'''
|
||||||
Intitiate picking for a trace.
|
Intitiate picking for a trace.
|
||||||
|
Loading…
Reference in New Issue
Block a user