plotting scheme restructured: the same widgets are used for plotting the overview and the station plots, the plotting method has been moved to the widget side which makes more sense than having it on the data side;

new functions in utils module: prepTimeAxis returns a proper time axis array for a given start time and an obspy trace; getGlobalTimes returns the minimum start time and the maximum end time (edges) of a given obspy stream object
This commit is contained in:
2015-03-29 08:07:46 +02:00
parent ae57381733
commit 27ecdb899b
5 changed files with 105 additions and 66 deletions

View File

@@ -104,7 +104,7 @@ class MainWindow(QMainWindow):
self.setWindowTitle("PyLoT - do seismic processing the python way")
self.setWindowIcon(QIcon(":/icon.ico"))
xlab = self.startTime.strftime('seconds since %d %b %Y %H:%M:%S (%Z)')
xlab = self.startTime.strftime('seconds since %Y/%m/%d %H:%M:%S (%Z)')
_widget = QWidget()
_widget.setCursor(Qt.CrossCursor)
@@ -365,7 +365,11 @@ class MainWindow(QMainWindow):
self.plotWaveformData()
def plotWaveformData(self):
self.getData().plotWFData(self.getPlotWidget())
zne_text = {'Z': 'vertical', 'N': 'north-south', 'E': 'east-west'}
comp = self.getComponent()
title = 'overview: {0} components'.format(zne_text[comp])
wfst = self.getData().getWFData().select(component=comp)
self.getPlotWidget().plotWFData(wfdata=wfst, title=title)
def filterWaveformData(self):
if self.getData():
@@ -455,10 +459,14 @@ class MainWindow(QMainWindow):
wfID = self.getWFID(event)
station = self.getStationName(wfID)
data = self.getData().getWFData()
pickDlg = PickDlg(self, data.select(station=station), station)
print 'picking on station {0}'.format(station)
pickDlg.exec_()
data = self.getData().getWFData()
pickDlg = PickDlg(self, data=data.select(station=station),
station=station)
if pickDlg.exec_():
print 'picks accepted'
else:
print 'picks not saved and closed dialog'
def updateStatus(self, message):