new local variable reused in plotting command for noise level positioning while plotting

This commit is contained in:
Sebastian Wehling-Benatelli 2015-06-23 13:12:20 +02:00
parent c1818622de
commit f1c7f00193

View File

@ -381,10 +381,11 @@ class PickDlg(QDialog):
def getPicks(self): def getPicks(self):
return self.picks return self.picks
def setIniPick(self, gui_event): def setIniPick(self, gui_event):
channel = self.getChannelID(round(gui_event.ydata))
trace_number = round(gui_event.ydata)
channel = self.getChannelID(trace_number)
wfdata = self.selectWFData(channel) wfdata = self.selectWFData(channel)
self.disconnectScrollEvent() self.disconnectScrollEvent()
@ -430,13 +431,13 @@ class PickDlg(QDialog):
self.setXLims([ini_pick - x_res, ini_pick + x_res]) self.setXLims([ini_pick - x_res, ini_pick + x_res])
self.setYLims(np.array([-noiselevel * 2.5, noiselevel * 2.5]) + self.setYLims(np.array([-noiselevel * 2.5, noiselevel * 2.5]) +
trace_number) trace_number)
self.getPlotWidget().plotWFData(wfdata=data,
title=self.getStation() + title=self.getStation() +
' picking mode', ' picking mode',
zoomx=zoomx,
zoomy=zoomy,
noiselevel=noiselevel)
zoomx=self.getXLims(), zoomx=self.getXLims(),
zoomy=self.getYLims(), zoomy=self.getYLims(),
noiselevel=(trace_number + noiselevel,
trace_number - noiselevel))
self.zoomAction.setEnabled(False) self.zoomAction.setEnabled(False)