Flexible handling of individual input-file names.
This commit is contained in:
parent
39748ca7c2
commit
842de86544
@ -509,10 +509,11 @@ class WaveformWidget(FigureCanvas):
|
|||||||
|
|
||||||
class PickDlg(QDialog):
|
class PickDlg(QDialog):
|
||||||
def __init__(self, parent=None, data=None, station=None, picks=None,
|
def __init__(self, parent=None, data=None, station=None, picks=None,
|
||||||
rotate=False):
|
rotate=False, infile=None):
|
||||||
super(PickDlg, self).__init__(parent)
|
super(PickDlg, self).__init__(parent)
|
||||||
|
|
||||||
# initialize attributes
|
# initialize attributes
|
||||||
|
self.infile = infile
|
||||||
self.station = station
|
self.station = station
|
||||||
self.rotate = rotate
|
self.rotate = rotate
|
||||||
self.components = 'ZNE'
|
self.components = 'ZNE'
|
||||||
@ -709,6 +710,9 @@ class PickDlg(QDialog):
|
|||||||
self.cidrelease = self.connectReleaseEvent(self.panRelease)
|
self.cidrelease = self.connectReleaseEvent(self.panRelease)
|
||||||
self.cidscroll = self.connectScrollEvent(self.scrollZoom)
|
self.cidscroll = self.connectScrollEvent(self.scrollZoom)
|
||||||
|
|
||||||
|
def getinfile(self):
|
||||||
|
return self.infile
|
||||||
|
|
||||||
def getStartTime(self):
|
def getStartTime(self):
|
||||||
return self.stime
|
return self.stime
|
||||||
|
|
||||||
@ -812,9 +816,9 @@ class PickDlg(QDialog):
|
|||||||
self.cidpress = self.connectPressEvent(self.setPick)
|
self.cidpress = self.connectPressEvent(self.setPick)
|
||||||
|
|
||||||
if self.selectPhase.currentText().upper().startswith('P'):
|
if self.selectPhase.currentText().upper().startswith('P'):
|
||||||
self.setIniPickP(gui_event, wfdata, trace_number)
|
self.setIniPickP(self.getinfile(), gui_event, wfdata, trace_number)
|
||||||
elif self.selectPhase.currentText().upper().startswith('S'):
|
elif self.selectPhase.currentText().upper().startswith('S'):
|
||||||
self.setIniPickS(gui_event, wfdata)
|
self.setIniPickS(self.getinfile(), gui_event, wfdata)
|
||||||
|
|
||||||
self.zoomAction.setEnabled(False)
|
self.zoomAction.setEnabled(False)
|
||||||
|
|
||||||
@ -822,9 +826,9 @@ class PickDlg(QDialog):
|
|||||||
self.setPlotLabels()
|
self.setPlotLabels()
|
||||||
self.draw()
|
self.draw()
|
||||||
|
|
||||||
def setIniPickP(self, gui_event, wfdata, trace_number):
|
def setIniPickP(self, infile, gui_event, wfdata, trace_number):
|
||||||
|
|
||||||
infile = os.path.join(os.path.expanduser('~'), '.pylot', 'pylot.in')
|
#infile = os.path.join(os.path.expanduser('~'), '.pylot', 'pylot.in')
|
||||||
parameter = AutoPickParameter(infile)
|
parameter = AutoPickParameter(infile)
|
||||||
ini_pick = gui_event.xdata
|
ini_pick = gui_event.xdata
|
||||||
|
|
||||||
@ -872,9 +876,9 @@ class PickDlg(QDialog):
|
|||||||
noiselevel=(trace_number + noiselevel,
|
noiselevel=(trace_number + noiselevel,
|
||||||
trace_number - noiselevel))
|
trace_number - noiselevel))
|
||||||
|
|
||||||
def setIniPickS(self, gui_event, wfdata):
|
def setIniPickS(self, infile, gui_event, wfdata):
|
||||||
|
|
||||||
infile = os.path.join(os.path.expanduser('~'), '.pylot', 'pylot.in')
|
#infile = os.path.join(os.path.expanduser('~'), '.pylot', 'pylot.in')
|
||||||
parameter = AutoPickParameter(infile)
|
parameter = AutoPickParameter(infile)
|
||||||
ini_pick = gui_event.xdata
|
ini_pick = gui_event.xdata
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user