From ef8bd6572eef2466fd57363bd149fd7f7230d678 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Mon, 8 Dec 2014 10:26:14 +0100 Subject: [PATCH 1/8] create a working MainWindow --- QtPyLoT.py | 68 ++++++++++++++++++++++++++--------------- pylot/RELEASE-VERSION | 2 +- pylot/core/read/data.py | 7 ++++- qrc_resources.py | 8 ++--- 4 files changed, 55 insertions(+), 30 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index bc537888..70bd2c9b 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -23,6 +23,7 @@ https://www.iconfinder.com/iconsets/flavour (http://www.gnu.org/copyleft/lesser.html) """ +import os import sys from PySide.QtCore import * @@ -35,6 +36,7 @@ from pylot.core.read import (Data, from pylot.core.util import FILTERDEFAULTS from pylot.core.util import fnConstructor from pylot.core.util import checkurl +from pylot.core.util import layoutStationButtons from pylot.core.util import (FilterOptionsDialog, MPLWidget, HelpForm) @@ -46,31 +48,39 @@ __version__ = _getVersionString() class MainWindow(QMainWindow): + closing = Signal() + def __init__(self, parent=None): super(MainWindow, self).__init__(parent) settings = QSettings() - self.recentEvents = settings.value("recentEvents", []) - self.setWindowTitle("PyLoT - do seismic processing the pythonic way") + if settings.value("user/FullName", None) is None: + fulluser = QInputDialog.getText(self, "Enter Name:", "Full name") + settings.setValue("user/FullName", fulluser) + settings.setValue("user/Login", os.getlogin()) + settings.sync() + self.recentEvents = settings.value("data/recentEvents", []) + self.setWindowTitle("PyLoT - do seismic processing the python way") self.setWindowIcon(QIcon(":/icon.ico")) self.seismicPhase = str(settings.value("phase", "P")) - if settings.value("dataRoot", None) is None: - dirname = QFileDialog().getExistingDirectory() - settings.setValue("dataRoot", dirname) + if settings.value("data/dataRoot", None) is None: + dirname = QFileDialog().getExistingDirectory(caption = 'Choose data root ...') + settings.setValue("data/dataRoot", dirname) settings.sync() # initialize filter parameter filterOptionsP = FILTERDEFAULTS['P'] filterOptionsS = FILTERDEFAULTS['S'] - print filterOptionsP, "\n", filterOptionsS + # print filterOptionsP, "\n", filterOptionsS self.filterOptionsP = FilterOptions(**filterOptionsP) self.filterOptionsS = FilterOptions(**filterOptionsS) # initialize data self.data = None + self.dirty = False self.loadData() self.updateFilterOptions() - print self.filteroptions + # print self.filteroptions try: self.startTime = min([tr.stats.starttime for tr in self.data.wfdata]) except: @@ -103,7 +113,7 @@ class MainWindow(QMainWindow): self.fileMenu.clear() self.addActions(self.fileMenu, self.fileMenuActions[:-1]) - current = self.data.evtdata.getEventID() + current = self.data.evtdata.getID() recentEvents = [] for eventID in self.recentEvents: fname = fnConstructor(eventID) @@ -141,7 +151,7 @@ class MainWindow(QMainWindow): self.data = Data(evtdata=fname) def saveData(self): - pass + return True def getComponent(self): return self @@ -158,13 +168,19 @@ class MainWindow(QMainWindow): xlab = self.startTime.strftime('seconds since %d %b %Y %H:%M:%S (%Z)') plottitle = self._getCurrentPlotType() + _widget = QWidget() + _layout = QHBoxLayout() + # create central matplotlib figure widget self.DataPlot = MPLWidget(parent=self, xlabel=xlab, ylabel=None, title=plottitle) - - self.setCentralWidget(self.getDataWidget()) + statsButtons = layoutStationButtons(self.getData(), self.getComponent()) + _layout.addLayout(statsButtons) + _layout.addWidget(self.DataPlot) + self.setLayout(_layout) + self.setCentralWidget(_widget) openIcon = self.style().standardIcon(QStyle.SP_DirOpenIcon) quitIcon = self.style().standardIcon(QStyle.SP_MediaStop) @@ -219,15 +235,6 @@ class MainWindow(QMainWindow): status.addPermanentWidget(self.eventLabel) status.showMessage("Ready", 500) -# statLayout = layoutStationButtons(self.getData(), self.getComponent()) -# dataLayout = self.getDataWidget() - -# maingrid = QGridLayout() -# maingrid.setSpacing(10) -# maingrid.addLayout(statLayout, 0, 0) -# maingrid.addWidget(self.getDataWidget(), 0, 1) -# self.setLayout(maingrid) - def okToContinue(self): if self.dirty: return self.saveData() @@ -283,12 +290,25 @@ class MainWindow(QMainWindow): def updateStatus(self, message): self.statusBar().showMessage(message, 5000) + if self.getData() is not None: + if not self.getData().isNew(): + self.setWindowTitle("PyLoT - processing event %s[*]" % self.getData().getID()) + elif self.getData().isNew(): + self.setWindowTitle("PyLoT - New event [*]") + else: + self.setWindowTitle("PyLoT - seismic processing the python way[*]") + self.setWindowTitle("PyLoT - seismic processing the python way[*]") + self.setWindowModified(self.dirty) + + self.statusBar().showMessage(message, 5000) def printEvent(self): pass - def closeEvent(self): - return self.saveData() + def closeEvent(self, event): + if self.okToContinue(): + self.closing.emit() + QMainWindow.closeEvent(self, event) def helpHelp(self): if checkurl(): @@ -313,7 +333,7 @@ def main(): # Show main window and run the app pylot_form.show() - sys.exit(pylot_app.exec_()) + pylot_app.exec_() if __name__ == "__main__": - main() + sys.exit(main()) diff --git a/pylot/RELEASE-VERSION b/pylot/RELEASE-VERSION index 3830bb1d..0b303821 100644 --- a/pylot/RELEASE-VERSION +++ b/pylot/RELEASE-VERSION @@ -1 +1 @@ -e6ac-dirty +9603-dirty diff --git a/pylot/core/read/data.py b/pylot/core/read/data.py index db6b898c..5b9250f1 100644 --- a/pylot/core/read/data.py +++ b/pylot/core/read/data.py @@ -44,14 +44,19 @@ class Data(object): self.wfdata = Stream() else: self.wfdata = Stream() + self.newevent = False if evtdata is not None and isinstance(evtdata, Event): self.evtdata = evtdata elif evtdata is not None: cat = readEvents(evtdata) self.evtdata = cat[0] else: # create an empty Event object + self.newevent = True self.evtdata = Event() + def isNew(self): + return self.newevent + def exportEvent(self, fnout=None, evtformat='QUAKEML'): if fnout is None: @@ -75,7 +80,7 @@ class Data(object): pass #axes = widget.axes - def getEventID(self): + def getID(self): try: return self.evtdata.get('resource_id').id except: diff --git a/qrc_resources.py b/qrc_resources.py index cb089909..9ee115e0 100644 --- a/qrc_resources.py +++ b/qrc_resources.py @@ -2,16 +2,16 @@ # Resource object code # -# Created: Di. Nov. 25 10:10:42 2014 +# Created: Mo. Dez. 8 09:32:58 2014 # by: The Resource Compiler for PySide (Qt v4.8.6) # # WARNING! All changes made in this file will be lost! from PySide import QtCore -qt_resource_data = "\x00\x00\x02\xf9PyLoT - the Python picking and Localisation Tool\x0a\x0a

PyLoT is a program which is capable of picking seismic phases,\x0aexporting these as numerous standard phase format and localize the corresponding\x0aseismic event with external software as, e.g.:

\x0a\x0a

Read more on the\x0aPyLoT WikiPage.

\x0a

Bug reports are very much appreciated and can also be delivered on our\x0aPyLoT TracPage after\x0asuccessful registration.

\x0a\x0a\x00\x00\x08\xbe\x00\x00\x01\x00\x01\x00 \x00\x00\x01\x00\x08\x00\xa8\x08\x00\x00\x16\x00\x00\x00(\x00\x00\x00 \x00\x00\x00@\x00\x00\x00\x01\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x0f\x0f\x00\x13\x13\x13\x00\x14\x14\x14\x00\x15\x15\x15\x00\x16\x16\x16\x00\x17\x17\x17\x00\x19\x19\x19\x00\x1b\x1b\x1b\x00\x1c\x1c\x1c\x00\x1e\x1e\x1e\x00\x1f\x1f\x1f\x00 \x00!!!\x00\x22\x22\x22\x00#\x22#\x00$$$\x00%%%\x00'''\x00)))\x00+++\x00,,,\x00---\x00...\x00///\x00000\x00111\x00333\x00555\x00666\x00888\x00999\x00:::\x00;;;\x00<<<\x00>>>\x00???\x00AAA\x00BBB\x00CCC\x00DDD\x00FFF\x00GGG\x00HHH\x00III\x00JJJ\x00KKK\x00LLL\x00MMM\x00NNN\x00PPP\x00QQQ\x00RRR\x00SSS\x00TTT\x00VVV\x00WWW\x00YYY\x00ZZZ\x00[[[\x00\x5c\x5c\x5c\x00]]]\x00^^^\x00___\x00```\x00aaa\x00bbb\x00ccc\x00ddd\x00eee\x00fff\x00hhh\x00iii\x00jjj\x00kkk\x00lll\x00nnn\x00ooo\x00ppp\x00qqq\x00rrr\x00sss\x00uuu\x00vvv\x00www\x00xxx\x00yyy\x00yzy\x00zzz\x00{{{\x00|||\x00}}}\x00\x7f\x7f\x7f\x00\x81\x81\x81\x00\x82\x82\x82\x00\x85\x85\x85\x00\x86\x86\x86\x00\x87\x87\x87\x00\x88\x88\x88\x00\x89\x89\x89\x00\x8a\x8a\x8a\x00\xaeh\xf1\x00\x8c\x8c\x8c\x00\x8d\x8d\x8d\x00\x8e\x8e\x8e\x00\x8f\x8f\x8f\x00\x90\x90\x90\x00\x92\x92\x92\x00\x93\x93\x93\x00\x94\x94\x94\x00\x95\x95\x95\x00\xb2{\xe6\x00\x96\x96\x96\x00\x97\x97\x97\x00\x98\x98\x98\x00\x99\x99\x99\x00\x9a\x9a\x9a\x00\x9b\x9b\x9b\x00\xba~\xf3\x00\xbd|\xfa\x00\x9c\x9c\x9c\x00\x9d\x9d\x9d\x00\x9e\x9e\x9e\x00\x9f\x9f\x9f\x00\xa0\xa0\xa0\x00\xa1\xa1\xa1\x00\xa2\xa2\xa2\x00\xa3\xa3\xa3\x00\xa4\xa4\xa4\x00\xa5\xa5\xa5\x00\xa6\xa6\xa6\x00\xa7\xa7\xa7\x00\xa8\xa8\xa8\x00\xa9\xa9\xa9\x00\xab\xab\xab\x00\xac\xac\xac\x00\xad\xad\xad\x00\xae\xae\xae\x00\xaf\xaf\xaf\x00\xaf\xb0\xaf\x00\xb0\xb0\xb0\x00\xb1\xb1\xb1\x00\xb2\xb2\xb2\x00\xb3\xb3\xb3\x00\xb4\xb4\xb4\x00\xb5\xb5\xb5\x00\xcf\x9d\xfe\x00\xb6\xb6\xb6\x00\xb7\xb7\xb7\x00\xb8\xb8\xb8\x00\xb9\xb9\xb9\x00\xba\xba\xba\x00\xbb\xbb\xbb\x00\xca\xad\xe7\x00\xbc\xbc\xbc\x00\xbc\xbc\xbd\x00\xd5\xa6\xff\x00\xbd\xbd\xbd\x00\xbe\xbe\xbe\x00\xbe\xbf\xbd\x00\xbf\xbf\xbf\x00\xc8\xb8\xd7\x00\xc0\xc0\xc0\x00\xd2\xb1\xf1\x00\xc1\xc1\xc1\x00\xc2\xc2\xc2\x00\xc1\xc4\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xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xd9Z\x1dr\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xd6q\x8c\xd1\xb3\xe2\xf4\x96\xe6\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xe6\x87&$\x83\xf4\xf4\xf4\xf4\xf4\xf4\xe0\xa7\xc7\xdf\xb1\xe1\xf4\xc7\xee\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf0\xd3w%\x079k\x94\xae\xc3\xe7\xa1\xc2\xdf\xb3\xe1\xf4\xee\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xec\xdf\xb7h>#\x14A\xf4\xa3\xc1\xf0\xd8\xec\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf0\xee\xec\xeb\xf0\xe1\xa7\xc3\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" -qt_resource_name = "\x00\x09\x034&\xbc\x00h\x00e\x00l\x00p\x00.\x00h\x00t\x00m\x00l\x00\x08\x0aaB\x7f\x00i\x00c\x00o\x00n\x00.\x00i\x00c\x00o" -qt_resource_struct = "\x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x18\x00\x00\x00\x00\x00\x01\x00\x00\x02\xfd" +qt_resource_data = "\x00\x00\x02\xa2\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x000\x00\x00\x000\x08\x06\x00\x00\x00W\x02\xf9\x87\x00\x00\x02iIDATx^\xedYM\x8b\xc20\x10\x9d\x96\xbd(\xa8\xa8\x08\xa27\xaf\xfe\x01\xf5\xa8\xff\xdb\xbb\x07\xaf\x1e\x14\xc4\x83\x17\x11\x05\x11?@\xa1K\x02sI\x98}\xc9NYYHaH\xda\xa6\x9d\xf7\xe6\xcd\xb4i\x9a\x15EA\xffy\xcb?\xe8;\x11H\x04\x12\x81D \x11H\x04\x12\x81\xaf\x90A\xdb\xed\xb6\xe0~\x96e\xdc\x8a}n\xdd\xad(\x0a\xb7\x95\xfa\xb6\x1d\x0c\x06\x19\xc2\xc6s!\x08\xbeV\xab10\xdc\xca\x1b\x03\x84\xed\xf5z\x0d\x22\xf1\x15\x0a\xbe\xd3\xe9\xd0\x1fo\x86\x84\xc5 \x90\xc0\x04\x18|\xb5Z\xa5\xdb\xed\xc6\xd1\x95\x22\x1e\xa7\x80\xac\x881\x0e\x18+\xa1.b\x00\xde\xf6\xfd}6\xff\x9c2\x18\x98\x00p&\x163\x9b|/\x7f\xbc\x8aD\x1e\x10u\x09\xbcD\x0c\x19R\xd4%\xa8R \xc6Ih\x0a\xc5(PN\x0aE\xa4\x99\x00\x16\x8c\xf3M\xa9\x00\x96\x16\x83\xc3\xfb\xc0\x8fB\x01l\xb2\xb3\xe7\xf3I\xa7\xd3\x89\x0e\x87\x03m6\x1b:\x9f\xcf\xe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x82\x00\x00\x00\x00IEND\xaeB`\x82\x00\x00\x02\xf9PyLoT - the Python picking and Localisation Tool\x0a\x0a

PyLoT is a program which is capable of picking seismic phases,\x0aexporting these as numerous standard phase format and localize the corresponding\x0aseismic event with external software as, e.g.:

\x0a\x0a

Read more on the\x0aPyLoT WikiPage.

\x0a

Bug reports are very much appreciated and can also be delivered on our\x0aPyLoT TracPage after\x0asuccessful registration.

\x0a\x0a\x00\x00\x08\xbe\x00\x00\x01\x00\x01\x00 \x00\x00\x01\x00\x08\x00\xa8\x08\x00\x00\x16\x00\x00\x00(\x00\x00\x00 \x00\x00\x00@\x00\x00\x00\x01\x00\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0f\x0f\x0f\x00\x13\x13\x13\x00\x14\x14\x14\x00\x15\x15\x15\x00\x16\x16\x16\x00\x17\x17\x17\x00\x19\x19\x19\x00\x1b\x1b\x1b\x00\x1c\x1c\x1c\x00\x1e\x1e\x1e\x00\x1f\x1f\x1f\x00 \x00!!!\x00\x22\x22\x22\x00#\x22#\x00$$$\x00%%%\x00'''\x00)))\x00+++\x00,,,\x00---\x00...\x00///\x00000\x00111\x00333\x00555\x00666\x00888\x00999\x00:::\x00;;;\x00<<<\x00>>>\x00???\x00AAA\x00BBB\x00CCC\x00DDD\x00FFF\x00GGG\x00HHH\x00III\x00JJJ\x00KKK\x00LLL\x00MMM\x00NNN\x00PPP\x00QQQ\x00RRR\x00SSS\x00TTT\x00VVV\x00WWW\x00YYY\x00ZZZ\x00[[[\x00\x5c\x5c\x5c\x00]]]\x00^^^\x00___\x00```\x00aaa\x00bbb\x00ccc\x00ddd\x00eee\x00fff\x00hhh\x00iii\x00jjj\x00kkk\x00lll\x00nnn\x00ooo\x00ppp\x00qqq\x00rrr\x00sss\x00uuu\x00vvv\x00www\x00xxx\x00yyy\x00yzy\x00zzz\x00{{{\x00|||\x00}}}\x00\x7f\x7f\x7f\x00\x81\x81\x81\x00\x82\x82\x82\x00\x85\x85\x85\x00\x86\x86\x86\x00\x87\x87\x87\x00\x88\x88\x88\x00\x89\x89\x89\x00\x8a\x8a\x8a\x00\xaeh\xf1\x00\x8c\x8c\x8c\x00\x8d\x8d\x8d\x00\x8e\x8e\x8e\x00\x8f\x8f\x8f\x00\x90\x90\x90\x00\x92\x92\x92\x00\x93\x93\x93\x00\x94\x94\x94\x00\x95\x95\x95\x00\xb2{\xe6\x00\x96\x96\x96\x00\x97\x97\x97\x00\x98\x98\x98\x00\x99\x99\x99\x00\x9a\x9a\x9a\x00\x9b\x9b\x9b\x00\xba~\xf3\x00\xbd|\xfa\x00\x9c\x9c\x9c\x00\x9d\x9d\x9d\x00\x9e\x9e\x9e\x00\x9f\x9f\x9f\x00\xa0\xa0\xa0\x00\xa1\xa1\xa1\x00\xa2\xa2\xa2\x00\xa3\xa3\xa3\x00\xa4\xa4\xa4\x00\xa5\xa5\xa5\x00\xa6\xa6\xa6\x00\xa7\xa7\xa7\x00\xa8\xa8\xa8\x00\xa9\xa9\xa9\x00\xab\xab\xab\x00\xac\xac\xac\x00\xad\xad\xad\x00\xae\xae\xae\x00\xaf\xaf\xaf\x00\xaf\xb0\xaf\x00\xb0\xb0\xb0\x00\xb1\xb1\xb1\x00\xb2\xb2\xb2\x00\xb3\xb3\xb3\x00\xb4\xb4\xb4\x00\xb5\xb5\xb5\x00\xcf\x9d\xfe\x00\xb6\xb6\xb6\x00\xb7\xb7\xb7\x00\xb8\xb8\xb8\x00\xb9\xb9\xb9\x00\xba\xba\xba\x00\xbb\xbb\xbb\x00\xca\xad\xe7\x00\xbc\xbc\xbc\x00\xbc\xbc\xbd\x00\xd5\xa6\xff\x00\xbd\xbd\xbd\x00\xbe\xbe\xbe\x00\xbe\xbf\xbd\x00\xbf\xbf\xbf\x00\xc8\xb8\xd7\x00\xc0\xc0\xc0\x00\xd2\xb1\xf1\x00\xc1\xc1\xc1\x00\xc2\xc2\xc2\x00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9\xec\xe7\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xd9Z\x1dr\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xd6q\x8c\xd1\xb3\xe2\xf4\x96\xe6\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xe6\x87&$\x83\xf4\xf4\xf4\xf4\xf4\xf4\xe0\xa7\xc7\xdf\xb1\xe1\xf4\xc7\xee\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf0\xd3w%\x079k\x94\xae\xc3\xe7\xa1\xc2\xdf\xb3\xe1\xf4\xee\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xec\xdf\xb7h>#\x14A\xf4\xa3\xc1\xf0\xd8\xec\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf0\xee\xec\xeb\xf0\xe1\xa7\xc3\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\xf4\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x03\xa9\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x00 \x00\x00\x00 \x08\x06\x00\x00\x00szz\xf4\x00\x00\x00\x19tEXtSoftware\x00Adobe ImageReadyq\xc9e<\x00\x00\x03KIDATx\xda\xd4W\xcdk\x13A\x14\x7f\x93\x9d\xcdWs\xc8\xc1\xe6RZAj\x03\xb6H\xdb`\x9b\xda\xd8\x8f\x80\x0azmZ\xfc\x0b\xbc+\x88\xff\x83\xf4PDA\xf0\x1f\x90\xeaE\xb1\xa0B/F\x1b?\xaa=\xa8\xa0\xf6b\xa1XTj\x0e%i\xd2d\xc7\xf7\xa6\xd9\xb8\x99\xec\x96\xacn+\xbee\x98\xccn\xe6\xfd~\xf3\xe6\xbd7o\xd8\xf7\x9f\xdf`\xe0\xf8 XE\xd34\xd0u]P\xef\x85T\xabU\xd8\xd9\xd9a\xd4\xab\xc2\xed& 8D\xa3Q\x08\x06\x83\x9e\x10\xd8\xde\xde\x86|>\x0f\xce\x04D\xe3K\x9f\xcf\x07\xc1@\x10\xc2\xe1\xb0'\x04H?\xe9Tq\x1c-@\x7f\x14\xf4\x08\xe1\x11\xbe\xb0\x05\xaf\x13\x10\xcaW\x13\xdc3\x02B\x80\xf9\xb4\xb4\x05\x92\xb0\xc7\x04$\x86\xf8_,@\xde\xfa`\xe1>x)C\x89ag\x0b\xa0\x87vh\x5c\x9b\xd5|Z\x8a1\xd6A\xf1?\x9e\x9a\x00\x1c{\x93\x07\x8c*\xe8\x5c\x17\xbe\x90\x8f\xac\xb1\x8e\xe3l\xb5R\xbdl\x18\xc6:\xeb\xec\xec\x8cc\xb8\xe5\xfc\x01\x7f\xd4\xef\xf7\xcbpa\xf8\xec\x87\xd0\x16 (\x94\xcbe(\x97\xca\xf9B\xa1\x90\xe4\xed\xb1\xf69d\x15\x0d\x85B2\x03\xa2\x05`?\x85\xfc!\x10\x08@\x91\x17\xa3m\x91\xb69\x8e\x80is\xe5^:\xde^BXD\x02\xd3s\x9a\xa3\xc3\xe948\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xf7\xf6V\xed\xd3\x0a\xb6E\xc4\xfcHz%\x81\x9e#qi~\xb3\xc9\xf8\xc4}\x8cD\x22u\x02\xb4\x127\x16 \xcb\x99\x04\xb6\xb6\xb6\x18\xf9\x0f\x95z\xaaoqk\xe2\xb1V\xad\x5c\xe3\x8d\xe1\xa2s\xc0\xc2\xb5\xe5s\xbe\xa1\xb4\x13\xe0H\xde\xfeb\xa2\xdc\x0d$\x01\xce\xff\xec>P[\xe9\x9eW3\xdb\xc9\x98\xa7_\xbc\xceyR\x0b\x90\x8f9\xc9/\x01\x06\x00oO\x87\x87}~\xb3\xc0\x00\x00\x00\x00IEND\xaeB`\x82\x00\x00\x02\xd6\x89PNG\x0d\x0a\x1a\x0a\x00\x00\x00\x0dIHDR\x00\x00\x000\x00\x00\x000\x08\x06\x00\x00\x00W\x02\xf9\x87\x00\x00\x02\x9dIDATx^\xedY\xc1\xebqA\x14\xbdOoC\xa1H\x14\xa5\xec\xec\xac\x84\x85\x85\x7f\x5c$v\xb2S\x14\x16\x16J,\x08%\xf5\xbe\xee\xab[\xfa\xee\xef}\xc74\xd3\xa7_\xcd\xa9i\xe65c\xe6\x9c{\xee\xbc\xf7\xe6\x09\xa2(\xa2\xdf\x8c\x14}\x0f^\x80\x17\xe0\x05x\x01^\x80\x17\xe0\x05\x84\x84A\x9b\xcd&\x92v\x10\x04R'\xb6\xa5\xfe\x1bQ\x14\xa9:\xa9\xcdh4\x1a\x01\x01\x042\x18\x91\xcff\xb3B\x0c\xd6\x00L\x10\xd6\xd7\xeb\xf5#\x11\xe1\xa7\xe4K\xa5\x12\xfdo\xb0\x08\xe6 \x22\x8c\x05\x08\xf9L&C\xb7\xdbM\xa2\x9b\x14q3\x07\x92\x1dap\xc0D\x84\x93M\x8c\xc8s[_K\xd1}N\x82\x81\x05\xe0\xc5\xa4_\x91N\x9eK\x8f\xc7\x22\xcc\x05$M\xa6k\xdd\x87\x0arT\x09t\x98B\xd8\x01\x9cBd\xe2\x80\x9b\x14\x02PD\x14Y4N\xc3\xd2\x01l-&\x87\xaf\xc1:\x16\x0e`\xe0M\xf7x\xd3v\xbb\xa5~\xbfO\xb9\x5c\x8e\x04\xf7\xfb\x9d\xd2\xe9\xb4<\xb0x|\x5c#`\x07\x8c\x80\xa3\xc4Q\xafT*B^\xc0OsM\xc6<\xe2\xf6\x02\x0c\x9f\x1b \x0d\xed\x91rM\xbcX,\xd2\xe1p`'\x0c\x04\x7fY\x80\xe4\xb2\x08\xa8\xd5j4\x9b\xcdh\xb1X\xf0\x06\x06\xbf\xfb\x82\x00D\xa8\xd5jQ\xb7\xdb\x8d7\xeeh4\xa2\xe9t\xcamD\xdc\xbd\x00\x1c9i\xeb~v\x82E\x0c\x06\x03b\x8c\xc7c\x16\x81\xe6r+\x00\xdb\x8d\x8f\x8b|\xeb\xect:\x94\xcf\xe7i\xb5Z\xa9q\x16\xebB\x01B\x02FL\xd7\xfaw\x85B\x81\x1dH\x1a\x0f\x1c\xb1p\x008\x82\x04J18\x8d\xb9u\x00\xd4\x8a,\xdfu\x14\xf1\xe7\xf3I\xfb\xfd\x9e\xca\xe5\xb2r\x08\xcc\x0b\x11\xda\xe6\xa0\x8c\x91\xfb\xfa|>'F\xb5Z%\xc6\xeb\xf5b\xf2\xf1\x93\xb9^\xaf\x9b\x90\x14\xa1.71\xfe\xb6\xd3\xeb\xf5\x98(\xbf\x8d\xf2{Q\xdc\xd7l6\xa9\xddn\xff4\x17\x88>Fh\x10}y\x09S\xf5{_\x18\x86,\x00\xce\x85S\xc8\xdc\x01l#v@\xca\xbf\xe62q\xc0y\x0a\x81M\xac\xae\xa5\x80\xb1\x98 Date: Mon, 8 Dec 2014 11:38:24 +0100 Subject: [PATCH 2/8] create a working MainWindow --- QtPyLoT.py | 11 +++++++---- pylot/RELEASE-VERSION | 2 +- pylot/core/util/layouts.py | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index 70bd2c9b..1caf4cd8 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -133,7 +133,6 @@ class MainWindow(QMainWindow): self.fileMenu.addAction(action) self.fileMenu.addSeparator() self.fileMenu.addAction(self.fileMenuActions[-1]) - def loadData(self, fname=None): if fname is None: @@ -179,9 +178,7 @@ class MainWindow(QMainWindow): statsButtons = layoutStationButtons(self.getData(), self.getComponent()) _layout.addLayout(statsButtons) _layout.addWidget(self.DataPlot) - self.setLayout(_layout) - self.setCentralWidget(_widget) - + openIcon = self.style().standardIcon(QStyle.SP_DirOpenIcon) quitIcon = self.style().standardIcon(QStyle.SP_MediaStop) saveIcon = self.style().standardIcon(QStyle.SP_DriveHDIcon) @@ -235,6 +232,12 @@ class MainWindow(QMainWindow): status.addPermanentWidget(self.eventLabel) status.showMessage("Ready", 500) + statsButtons = layoutStationButtons(self.getData(), self.getComponent()) + _layout.addLayout(statsButtons) + _layout.addWidget(self.DataPlot) + _widget.setLayout(_layout) + self.setCentralWidget(_widget) + def okToContinue(self): if self.dirty: return self.saveData() diff --git a/pylot/RELEASE-VERSION b/pylot/RELEASE-VERSION index 0b303821..c5affb8d 100644 --- a/pylot/RELEASE-VERSION +++ b/pylot/RELEASE-VERSION @@ -1 +1 @@ -9603-dirty +ef8b-dirty diff --git a/pylot/core/util/layouts.py b/pylot/core/util/layouts.py index 632c2473..c9011a66 100644 --- a/pylot/core/util/layouts.py +++ b/pylot/core/util/layouts.py @@ -21,7 +21,7 @@ def layoutStationButtons(data, comp): stationButtons.append(QPushButton('%s'.format(stat))) except: for n in range(5): - stationButtons.append(QPushButton('ST%02d'.format(n))) + stationButtons.append(QPushButton('ST{0:02d}'.format(n+1))) for button in stationButtons: layout.addWidget(button) return layout \ No newline at end of file From d665e47d02be89968ac5d6b4a71a918ad30189af Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Tue, 9 Dec 2014 05:25:43 +0100 Subject: [PATCH 3/8] get values for filter parameters from widget --- QtPyLoT.py | 20 +++++++++++++++----- pylot/core/read/data.py | 7 +++++-- pylot/core/read/inputs.py | 27 +++++++++++++++------------ pylot/core/util/widgets.py | 4 ++-- 4 files changed, 37 insertions(+), 21 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index 1caf4cd8..1855e491 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -247,19 +247,29 @@ class MainWindow(QMainWindow): pass #self.data.plotData(self.DataPlot) def filterData(self): - pass + if self.getData(): + kwargs = {} + freq = self.filteroptions.getFreq() + if len(freq) > 1: + kwargs['freqmin'] = freq[0] + kwargs['freqmax'] = freq[1] + else: + kwargs['freq'] = freq + kwargs['type'] = self.filteroptions.getFilterType() + #kwargs['order'] = self.filteroptions.getOrder() + self.data.filter(**kwargs) def adjustFilterOptions(self): - filterOptions = None + filteroptions = None fstring = "Filter Options ({0})".format(self.getSeismicPhase()) filterDlg = FilterOptionsDialog(titleString=fstring, parent=self, filterOptions=self.getFilterOptions()) if filterDlg.exec_(): - filterOptions = filterDlg.getFilterOptions() + filteroptions = filterDlg.getFilterOptions() - assert isinstance(filterOptions, FilterOptions) - self.setFilterOptions(filterOptions) + assert isinstance(filteroptions, FilterOptions) + self.setFilterOptions(filteroptions) def getFilterOptions(self): return self.filteroptions diff --git a/pylot/core/read/data.py b/pylot/core/read/data.py index 5b9250f1..8331c6a6 100644 --- a/pylot/core/read/data.py +++ b/pylot/core/read/data.py @@ -27,7 +27,10 @@ class Data(object): def __init__(self, parent=None, evtdata=None): try: - self.wfdata = read() + if parent: + self.wfdata = read(parent.fnames) + else: + self.wfdata = read() except IOError, e: msg = 'An I/O error occured while loading data!' inform = 'Variable wfdata will be empty.' @@ -53,6 +56,7 @@ class Data(object): else: # create an empty Event object self.newevent = True self.evtdata = Event() + self.orig = self.wfdata.copy() def isNew(self): return self.newevent @@ -77,7 +81,6 @@ class Data(object): not implemented: {1}'''.format(evtformat, e)) def plotData(self, widget): - pass #axes = widget.axes def getID(self): diff --git a/pylot/core/read/inputs.py b/pylot/core/read/inputs.py index ee840b8f..57999fb8 100644 --- a/pylot/core/read/inputs.py +++ b/pylot/core/read/inputs.py @@ -165,34 +165,37 @@ class FilterOptions(object): ''' def __init__(self, filtertype='bandpass', freq=[2., 5.], order=3, **kwargs): - self.setFilterType(filtertype) - self.setFreq(freq) - self.setOrder(order) + self._order = order + self._filtertype = filtertype + self._freq = freq def __str__(self): hrs = '''\n\tFilter parameter:\n Type:\t\t{ftype}\n Frequencies:\t{freq}\n Order:\t\t{order}\n - '''.format(ftype=self.getFilterType(), - freq=self.getFreq(), - order=self.getOrder()) + '''.format(ftype=self.getFilterType, + freq=self.getFreq, + order=self.getOrder) return hrs + @property def getFreq(self): - return self.freq + return self.__getattribute__('_freq') def setFreq(self, freq): - self.freq = freq + self.__setattr__('_freq', freq) + @property def getOrder(self): - return self.order + return self.__getattribute__('_order') def setOrder(self, order): - self.order = order + self.__setattr__('_order', order) + @property def getFilterType(self): - return self.filterType + return self.__getattribute__('_filtertype') def setFilterType(self, filtertype): - self.filterType = filtertype + self.__setattr__('_filtertype', filtertype) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index a6376f73..e937f2cf 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -166,7 +166,7 @@ class FilterOptionsDialog(QDialog): self.freqminSpinBox.setRange(5e-7, 1e6) self.freqminSpinBox.setDecimals(2) self.freqminSpinBox.setSuffix(' Hz') - self.freqminSpinBox.setValue(self.getFilterOptions().getFreq()[0]) + self.freqminSpinBox.setValue(self.getFilterOptions().getFreq[0]) self.freqmaxLabel = QLabel() self.freqmaxLabel.setText("maximum:") self.freqmaxSpinBox = QDoubleSpinBox() @@ -174,7 +174,7 @@ class FilterOptionsDialog(QDialog): self.freqmaxSpinBox.setDecimals(2) self.freqmaxSpinBox.setSuffix(' Hz') if self.filterOptions.filterType in ['bandpass', 'bandstop']: - self.freqmaxSpinBox.setValue(self.getFilterOptions().getFreq()[1]) + self.freqmaxSpinBox.setValue(self.getFilterOptions().getFreq[1]) typeOptions = ["bandpass", "bandstop", "lowpass", "highpass"] From 3c9865c767f2344aa1a4a5e815ffd3cd07374e7e Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Thu, 11 Dec 2014 09:43:59 +0100 Subject: [PATCH 4/8] add station selection --- pylot/core/read/__init__.py | 11 ++++---- pylot/core/read/data.py | 56 +++++++++++++++++++++---------------- pylot/core/read/inputs.py | 3 -- 3 files changed, 38 insertions(+), 32 deletions(-) diff --git a/pylot/core/read/__init__.py b/pylot/core/read/__init__.py index 70fee522..beb833f8 100644 --- a/pylot/core/read/__init__.py +++ b/pylot/core/read/__init__.py @@ -1,5 +1,6 @@ -from pylot.core.read.data import (Data, - GenericDataStructure, - SeiscompDataStructure) -from pylot.core.read.inputs import (AutoPickParameter, - FilterOptions) +from pylot.core.read.inputs import AutoPickParameter +from pylot.core.read.inputs import FilterOptions +from pylot.core.read.data import Data +from pylot.core.read.data import GenericDataStructure +from pylot.core.read.data import SeiscompDataStructure + diff --git a/pylot/core/read/data.py b/pylot/core/read/data.py index 8331c6a6..07b8a10f 100644 --- a/pylot/core/read/data.py +++ b/pylot/core/read/data.py @@ -126,10 +126,19 @@ class SeiscompDataStructure(object): :type sdate, edate: str or UTCDateTime or None ''' + # Data type options + __typeOptions = {'waveform': 'D', # Waveform data + 'detect': 'E', # Detection data + 'log': 'L', # Log data + 'timing': 'T', # Timing data + 'calib': 'C', # Calibration data + 'resp': 'R', # Response data + 'opaque': 'O' # Opaque data + } + def __init__(self, dataType='waveform', sdate=None, edate=None, **kwargs): # imports from obspy.core import UTCDateTime - import numpy as np def checkDate(date): if not isinstance(date, UTCDateTime): @@ -143,7 +152,9 @@ class SeiscompDataStructure(object): edate = UTCDateTime(edate) except TypeError: edate = UTCDateTime() - sdate = edate - np.pi*1e7/2 + halfyear = UTCDateTime('1970-07-01') + sdate = UTCDateTime(edate - halfyear) + del halfyear year = '' if not edate.year == sdate.year: @@ -152,17 +163,7 @@ class SeiscompDataStructure(object): year += '{0:04d},'.format(sdate.year+yr) year = '{'+year[:-1]+'}' else: - year = '{0:04d},'.format(sdate.year) - - # Data type options - self.__typeOptions = {'waveform': 'D', # Waveform data - 'detect': 'E', # Detection data - 'log': 'L', # Log data - 'timing': 'T', # Timing data - 'calib': 'C', # Calibration data - 'resp': 'R', # Response data - 'opaque': 'O' # Opaque data - } + year = '{0:04d}'.format(sdate.year) if dataType in self.__typeOptions.keys(): self.dataType = dataType @@ -180,7 +181,7 @@ class SeiscompDataStructure(object): 'NET': '??', # up to 8 characters 'STA': '????', # up to 8 characters 'CHAN': 'HH?', # up to 8 characters - 'TYPE': self._getType(), # 1 character + 'TYPE': self.getType(), # 1 character 'LOC': '', # up to 8 characters 'DAY': '{0:03d}'.format(sdate.julday) # 3 digits } @@ -190,10 +191,14 @@ class SeiscompDataStructure(object): if kwargs and isinstance(kwargs, dict): for key, value in kwargs.iteritems(): key = str(key) - value = str(value) + if type(value) not in (str, int, float): + for n, val in enumerate(value): + value[n] = str(val) + else: + value = str(value) try: - if key in self.__sdsFields.keys(): - self.__sdsFields[key] = str(value) + if key in self.getSDSFields().keys(): + self.getSDSFields()[key] = value else: raise KeyError('unknown SDS wildcard: %s.' % key) except KeyError, e: @@ -203,16 +208,19 @@ class SeiscompDataStructure(object): errmsg += '%s; desired value was: %s\n' % (e, value) print errmsg - def _getType(self): + def getType(self): return self.__typeOptions[self.dataType] + def getSDSFields(self): + return self.__sdsFields + def expandDataPath(self): - fullChan = '{0}.{1}'.format(self.__sdsFields['CHAN'], self._getType()) - dataPath = os.path.join(self.__sdsFields['SDSdir'], - self.__sdsFields['YEAR'], - self.__sdsFields['NET'], - self.__sdsFields['STA'], + fullChan = '{0}.{1}'.format(self.getSDSFields()['CHAN'], self.getType()) + dataPath = os.path.join(self.getSDSFields()['SDSdir'], + self.getSDSFields()['YEAR'], + self.getSDSFields()['NET'], + self.getSDSFields()['STA'], fullChan, - '*{0}'.format(self.__sdsFields['DAY']) + '*{0}'.format(self.getSDSFields()['DAY']) ) return dataPath diff --git a/pylot/core/read/inputs.py b/pylot/core/read/inputs.py index 57999fb8..87cd16c3 100644 --- a/pylot/core/read/inputs.py +++ b/pylot/core/read/inputs.py @@ -179,21 +179,18 @@ class FilterOptions(object): order=self.getOrder) return hrs - @property def getFreq(self): return self.__getattribute__('_freq') def setFreq(self, freq): self.__setattr__('_freq', freq) - @property def getOrder(self): return self.__getattribute__('_order') def setOrder(self, order): self.__setattr__('_order', order) - @property def getFilterType(self): return self.__getattribute__('_filtertype') From 0749420f9aaa9e94700e329565f307da1c2c0ebd Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Wed, 17 Dec 2014 06:30:03 +0100 Subject: [PATCH 5/8] filter possible event format file extension for selection from file dialog --- QtPyLoT.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index 1855e491..83cd356b 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -139,7 +139,11 @@ class MainWindow(QMainWindow): action = self.sender() if isinstance(action, QAction): if action.data() is None: - fname = QFileDialog() + filt = """Supported event formats (*.mat *.qml *.xml *.kor + *.evt)""" + caption = 'Select event to open' + fname = QFileDialog().getOpenFileName(self, caption=caption, + filter=filt) else: fname = unicode(action.data().toString()) if not self.okToContinue(): From 8213cdc575d2c47cd389b1a8d222aec2c870dc01 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Wed, 17 Dec 2014 06:33:34 +0100 Subject: [PATCH 6/8] PropertiesDlg added to the MainWindow (not tested yet) --- QtPyLoT.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/QtPyLoT.py b/QtPyLoT.py index 83cd356b..22579058 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -39,6 +39,7 @@ from pylot.core.util import checkurl from pylot.core.util import layoutStationButtons from pylot.core.util import (FilterOptionsDialog, MPLWidget, + PropertiesDlg, HelpForm) @@ -193,6 +194,9 @@ class MainWindow(QMainWindow): saveEventAction = self.createAction("&Save event ...", self.saveData, QKeySequence.Save, saveIcon, "Save actual event data.") + prefsEventAction = self.createAction("Preferences", self.PyLoTprefs, + QKeySequence.Preferences, None, + "Edit PyLoT app preferences.") quitAction = self.createAction("&Quit", QCoreApplication.instance().quit, QKeySequence.Close, quitIcon, @@ -218,6 +222,7 @@ class MainWindow(QMainWindow): "Print waveform overview.") self.fileMenu = self.menuBar().addMenu('&File') self.fileMenuActions = (openEventAction, saveEventAction, None, + prefsEventAction, None, quitAction) self.fileMenu.aboutToShow.connect(self.updateFileMenu) @@ -327,6 +332,11 @@ class MainWindow(QMainWindow): self.closing.emit() QMainWindow.closeEvent(self, event) + def PyLoTprefs(self): + props = PropertiesDlg(self) + if props.exec_(): + return + def helpHelp(self): if checkurl(): form = HelpForm('https://ariadne.geophysik.ruhr-uni-bochum.de/trac/PyLoT/wiki') From 3fe1e3906e66cfb02f9432cbf4a39d04d7273141 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Wed, 17 Dec 2014 06:35:12 +0100 Subject: [PATCH 7/8] OUTPUTFORMATS in defaults defined; manage available formats just from here --- pylot/core/read/data.py | 9 +++++++-- pylot/core/util/defaults.py | 2 ++ pylot/core/util/widgets.py | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/pylot/core/read/data.py b/pylot/core/read/data.py index 07b8a10f..de4f24b6 100644 --- a/pylot/core/read/data.py +++ b/pylot/core/read/data.py @@ -63,10 +63,15 @@ class Data(object): def exportEvent(self, fnout=None, evtformat='QUAKEML'): + from pylot.core.util.defaults import OUTPUTFORMATS + + if evtformat.strip() not in OUTPUTFORMATS.values(): + evtformat = OUTPUTFORMATS.values()[0] + if fnout is None: - fnout = self.evtdata.getEventID() + ID = self.evtdata.getEventID() # handle forbidden filenames especially on windows systems - fnout = fnConstructor(fnout) + fnout = fnConstructor(ID) evtformat = evtformat.upper().strip() diff --git a/pylot/core/util/defaults.py b/pylot/core/util/defaults.py index b9642d4a..b9815b45 100644 --- a/pylot/core/util/defaults.py +++ b/pylot/core/util/defaults.py @@ -12,3 +12,5 @@ FILTERDEFAULTS = {'P': {'filtertype': None, 'S': {'filtertype': 'bandpass', 'order': '4', 'freq': [.5, 5]}} + +OUTPUTFORMATS = {'QuakeML':'QUAKEML', 'VelEst':'VELEST'} \ No newline at end of file diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index e937f2cf..b6a5ec5b 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -37,6 +37,7 @@ from PySide.QtCore import (Qt, SLOT) from PySide.QtWebKit import QWebView from pylot.core.read import FilterOptions +from pylot.core.util.defaults import OUTPUTFORMATS class MPLWidget(FigureCanvasQTAgg): @@ -119,7 +120,7 @@ class OutputsTab(QWidget): eventOutputLabel = QLabel("event ouput format") eventOutputComboBox = QComboBox() - eventoutputformats = ["QuakeML", "VelEst"] + eventoutputformats = OUTPUTFORMATS.keys() eventOutputComboBox.addItems(eventoutputformats) layout = QGridLayout() From 9d1a78222ed6c88f426a93bc3e835e4260808d63 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Wed, 17 Dec 2014 07:52:55 +0100 Subject: [PATCH 8/8] PropertiesDlg changed: retrieve additional information about the user, use QSettings to store the derived parameters --- pylot/core/util/widgets.py | 42 +++++++++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index b6a5ec5b..2026de57 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -31,7 +31,8 @@ from PySide.QtGui import (QAction, QToolBar, QVBoxLayout, QWidget) -from PySide.QtCore import (Qt, +from PySide.QtCore import (QSettings, + Qt, QUrl, SIGNAL, SLOT) @@ -72,17 +73,17 @@ class PropertiesDlg(QDialog): self.setWindowTitle("{0} Properties".format(appName)) - tabWidget = QTabWidget() - tabWidget.addTab(InputsTab(self), "Inputs") - tabWidget.addTab(OutputsTab(self), "Outputs") - tabWidget.addTab(PhasesTab(self), "Phases") - tabWidget.addTab(GraphicsTab(self), "Graphics") + self.tabWidget = QTabWidget() + self.tabWidget.addTab(InputsTab(self), "Inputs") + self.tabWidget.addTab(OutputsTab(self), "Outputs") + self.tabWidget.addTab(PhasesTab(self), "Phases") + self.tabWidget.addTab(GraphicsTab(self), "Graphics") self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Apply | QDialogButtonBox.Close) layout = QVBoxLayout() - layout.addWidget(tabWidget) + layout.addWidget(self.tabWidget) layout.addWidget(self.buttonBox) self.setLayout(layout) @@ -92,23 +93,40 @@ class PropertiesDlg(QDialog): SIGNAL("clicked()"), self.apply) self.connect(self.buttonBox, SIGNAL("rejected()"), self, SLOT("reject()")) - pass def apply(self): - pass + settings = QSettings() + for widint in range(self.tabWidget.count()): + curwid = self.tabWidget.widget(widint) + values = self.getValues(curwid) + settings.setValue() class InputsTab(QWidget): - def __init__(self, parent=None): + def __init__(self, parent): super(InputsTab, self).__init__(parent) + settings = QSettings() + fulluser = settings.value("user/FullName") + login = settings.value("user/Login") + + fullNameLabel = QLabel("Full name for user '{0}'".format(login)) + + parent.fullNameEdit = QLineEdit() + parent.fullNameEdit.setText(fulluser) + + dataroot = settings.value("data/dataRoot") dataDirLabel = QLabel("data directory:") - dataDirEdit = QLineEdit() + parent.dataDirEdit = QLineEdit() + parent.dataDirEdit.setText(dataroot) + parent.dataDirEdit.selectAll() layout = QGridLayout() layout.addWidget(dataDirLabel, 0, 0) - layout.addWidget(dataDirEdit, 0, 1) + layout.addWidget(parent.dataDirEdit, 0, 1) + layout.addWidget(fullNameLabel, 1, 0) + layout.addWidget(parent.fullNameEdit, 1, 1) self.setLayout(layout)