parallelization
This commit is contained in:
parent
0dd69a0e19
commit
ae2fc73d89
@ -206,14 +206,8 @@ class Survey(object):
|
|||||||
plt.xlabel('Difference in time (auto - manual) [s]')
|
plt.xlabel('Difference in time (auto - manual) [s]')
|
||||||
return diffs
|
return diffs
|
||||||
|
|
||||||
# def pickShot(self, shTr):
|
|
||||||
# shotnumber, traceID = shTr
|
|
||||||
# shot = self.getShotForShotnumber(shotnumber)
|
|
||||||
# traceID, pick = shot.pickTrace(traceID)
|
|
||||||
# return shotnumber, traceID, pick
|
|
||||||
|
|
||||||
def pickAllShots(self, vmin=333, vmax=5500, folm=0.6, HosAic='hos',
|
def pickAllShots(self, vmin=333, vmax=5500, folm=0.6, HosAic='hos',
|
||||||
aicwindow=(10, 0), cores = 1):
|
aicwindow=(15, 0), cores = 1):
|
||||||
'''
|
'''
|
||||||
Automatically pick all traces of all shots of the survey.
|
Automatically pick all traces of all shots of the survey.
|
||||||
|
|
||||||
@ -241,15 +235,14 @@ class Survey(object):
|
|||||||
shot.setVmin(vmin)
|
shot.setVmin(vmin)
|
||||||
shot.setVmax(vmax)
|
shot.setVmax(vmax)
|
||||||
count += 1
|
count += 1
|
||||||
#shot.pickParallel(folm)
|
|
||||||
shot.setPickParameters(folm = folm, method = HosAic, aicwindow = aicwindow)
|
shot.setPickParameters(folm = folm, method = HosAic, aicwindow = aicwindow)
|
||||||
shotlist.append(shot)
|
shotlist.append(shot)
|
||||||
|
|
||||||
picks = worker(ppick, shotlist, cores)
|
picks = worker(ppick, shotlist, cores)
|
||||||
|
|
||||||
for item in picks:
|
for shot in picks:
|
||||||
for it in item:
|
for item in shot:
|
||||||
shotnumber, traceID, pick = it
|
shotnumber, traceID, pick = item
|
||||||
self.getShotForShotnumber(shotnumber).setPick(traceID, pick)
|
self.getShotForShotnumber(shotnumber).setPick(traceID, pick)
|
||||||
|
|
||||||
# tpicksum += (datetime.now() - tstartpick);
|
# tpicksum += (datetime.now() - tstartpick);
|
||||||
@ -259,7 +252,7 @@ class Survey(object):
|
|||||||
# progress = float(count) / float(len(self.getShotDict())) * 100
|
# progress = float(count) / float(len(self.getShotDict())) * 100
|
||||||
# self._update_progress(shot.getShotname(), tend, progress)
|
# self._update_progress(shot.getShotname(), tend, progress)
|
||||||
|
|
||||||
self.setSNR()
|
self.filterSNR()
|
||||||
self.setEarllate()
|
self.setEarllate()
|
||||||
|
|
||||||
print('\npickAllShots: Finished\n')
|
print('\npickAllShots: Finished\n')
|
||||||
@ -269,15 +262,19 @@ class Survey(object):
|
|||||||
% (pickedtraces, ntraces,
|
% (pickedtraces, ntraces,
|
||||||
float(pickedtraces) / float(ntraces) * 100.))
|
float(pickedtraces) / float(ntraces) * 100.))
|
||||||
|
|
||||||
def setSNR(self):
|
def filterSNR(self):
|
||||||
|
print('Starting filterSNR...')
|
||||||
for shot in self.data.values():
|
for shot in self.data.values():
|
||||||
for traceID in shot.getTraceIDlist():
|
for traceID in shot.getTraceIDlist():
|
||||||
shot.setSNR(traceID)
|
shot.setSNR(traceID)
|
||||||
# if shot.getSNR(traceID)[0] < snrthreshold:
|
# if shot.getSNR(traceID)[0] < snrthreshold:
|
||||||
|
if shot.getPick(traceID) <= 0:
|
||||||
|
shot.removePick(traceID)
|
||||||
if shot.getSNR(traceID)[0] < shot.getSNRthreshold(traceID):
|
if shot.getSNR(traceID)[0] < shot.getSNRthreshold(traceID):
|
||||||
shot.removePick(traceID)
|
shot.removePick(traceID)
|
||||||
|
|
||||||
def setEarllate(self):
|
def setEarllate(self):
|
||||||
|
print('Starting setEarllate...')
|
||||||
for shot in self.data.values():
|
for shot in self.data.values():
|
||||||
for traceID in shot.getTraceIDlist():
|
for traceID in shot.getTraceIDlist():
|
||||||
# set epp and lpp if SNR > 1 (else earllatepicker cant set values)
|
# set epp and lpp if SNR > 1 (else earllatepicker cant set values)
|
||||||
|
@ -383,6 +383,9 @@ class SeismicShot(object):
|
|||||||
setHosAic = {'hos': hoscftime,
|
setHosAic = {'hos': hoscftime,
|
||||||
'aic': aiccftime}
|
'aic': aiccftime}
|
||||||
|
|
||||||
|
if aiccftime < self.getPickwindow(traceID)[0] and 'aic' in self.getMethod():
|
||||||
|
return 0
|
||||||
|
|
||||||
return setHosAic[self.getMethod()]
|
return setHosAic[self.getMethod()]
|
||||||
|
|
||||||
def setEarllatepick(self, traceID, nfac=1.5):
|
def setEarllatepick(self, traceID, nfac=1.5):
|
||||||
@ -397,9 +400,6 @@ class SeismicShot(object):
|
|||||||
self.getPickIncludeRemoved(traceID),
|
self.getPickIncludeRemoved(traceID),
|
||||||
stealth_mode=True)
|
stealth_mode=True)
|
||||||
|
|
||||||
if self.picks[traceID]['epp'] < 0:
|
|
||||||
self.picks[traceID]['epp']
|
|
||||||
|
|
||||||
def threshold(self, hoscf, aiccf, windowsize, pickwindow, folm):
|
def threshold(self, hoscf, aiccf, windowsize, pickwindow, folm):
|
||||||
'''
|
'''
|
||||||
Threshold picker, using the local maximum in a pickwindow to find the time at
|
Threshold picker, using the local maximum in a pickwindow to find the time at
|
||||||
|
Loading…
Reference in New Issue
Block a user