commit after recover of scripts from .pyc:
repick button for .plot_traces implemented
This commit is contained in:
parent
2b3e40b3b6
commit
52e304b0af
@ -34,7 +34,8 @@ class SeismicShot(object):
|
|||||||
self.snr = {}
|
self.snr = {}
|
||||||
self.snrthreshold = {}
|
self.snrthreshold = {}
|
||||||
self.timeArray = {}
|
self.timeArray = {}
|
||||||
self.paras = {'shotname': obsfile}
|
self.paras = {}
|
||||||
|
self.paras['shotname'] = obsfile
|
||||||
|
|
||||||
def removeEmptyTraces(self):
|
def removeEmptyTraces(self):
|
||||||
traceIDs = []
|
traceIDs = []
|
||||||
@ -262,23 +263,19 @@ class SeismicShot(object):
|
|||||||
traces = [trace for trace in self.traces if int(trace.stats.channel) == traceID]
|
traces = [trace for trace in self.traces if int(trace.stats.channel) == traceID]
|
||||||
if len(traces) == 1:
|
if len(traces) == 1:
|
||||||
return Stream(traces)
|
return Stream(traces)
|
||||||
else:
|
self.setPick(traceID, None)
|
||||||
self.setPick(traceID, None)
|
print 'Warning: ambigious or empty traceID: %s' % traceID
|
||||||
print('Warning: ambigious or empty traceID: %s' % traceID)
|
|
||||||
|
|
||||||
#raise ValueError('ambigious or empty traceID: %s' % traceID)
|
#raise ValueError('ambigious or empty traceID: %s' % traceID)
|
||||||
|
|
||||||
def pickTraces(self, traceID, pickmethod, windowsize, folm = 0.6, HosAic = 'hos'): ########## input variables ##########
|
def pickTraces(self, traceID, windowsize, folm = 0.6, HosAic = 'hos'): ########## input variables ##########
|
||||||
# LOCALMAX NOT IMPLEMENTED!
|
# LOCALMAX NOT IMPLEMENTED!
|
||||||
'''
|
'''
|
||||||
Intitiate picking for a trace.
|
Intitiate picking for a trace.
|
||||||
|
|
||||||
:param: traceID
|
:param: traceID
|
||||||
:type: int
|
:type: int
|
||||||
|
|
||||||
:param: pickmethod, use either 'threshold' or 'localmax' method. (localmax not yet implemented 04_08_15)
|
|
||||||
:type: string
|
|
||||||
|
|
||||||
:param: cutwindow (equals HOScf 'cut' variable)
|
:param: cutwindow (equals HOScf 'cut' variable)
|
||||||
:type: tuple
|
:type: tuple
|
||||||
|
|
||||||
@ -301,15 +298,7 @@ class SeismicShot(object):
|
|||||||
aiccf = self.getAICcf(traceID)
|
aiccf = self.getAICcf(traceID)
|
||||||
|
|
||||||
self.timeArray[traceID] = hoscf.getTimeArray()
|
self.timeArray[traceID] = hoscf.getTimeArray()
|
||||||
|
aiccftime, hoscftime = self.threshold(hoscf, aiccf, windowsize, self.getPickwindow(traceID), folm)
|
||||||
if pickmethod == 'threshold':
|
|
||||||
aiccftime, hoscftime = self.threshold(hoscf, aiccf, windowsize, self.getPickwindow(traceID), folm)
|
|
||||||
|
|
||||||
#setpick = {'threshold':self.threshold,
|
|
||||||
# 'localmax':self.localmax}
|
|
||||||
|
|
||||||
#aiccftime, hoscftime = setpick[pickmethod](hoscf, aiccf, windowsize, pickwindow)
|
|
||||||
|
|
||||||
setHosAic = {'hos': hoscftime,
|
setHosAic = {'hos': hoscftime,
|
||||||
'aic': aiccftime}
|
'aic': aiccftime}
|
||||||
|
|
||||||
@ -621,13 +610,13 @@ class SeismicShot(object):
|
|||||||
button.on_clicked(connectButton)
|
button.on_clicked(connectButton)
|
||||||
|
|
||||||
self.traces4plot = {}
|
self.traces4plot = {}
|
||||||
if not traceID in self.traces4plot.keys():
|
if traceID not in self.traces4plot.keys():
|
||||||
self.traces4plot[traceID] = {'fig': fig,
|
self.traces4plot[traceID] = {'fig': fig,
|
||||||
'ax1': ax1,
|
'ax1': ax1,
|
||||||
'ax2': ax2,
|
'ax2': ax2,
|
||||||
'axb': axb,
|
'axb': axb,
|
||||||
'button': button,
|
'button': button,
|
||||||
'cid': None,}
|
'cid': None}
|
||||||
|
|
||||||
self._drawStream(traceID)
|
self._drawStream(traceID)
|
||||||
self._drawCFs(traceID, folm)
|
self._drawCFs(traceID, folm)
|
||||||
|
Loading…
Reference in New Issue
Block a user