From 69011f13ac3f5519f900fcdc50ec0d6dee6f9a8b Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Fri, 13 Nov 2015 14:05:29 +0100 Subject: [PATCH 1/2] [new] started to incorporate NLLoc into manualPyLoT --- QtPyLoT.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index 57bd17fe..80627ca2 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -41,6 +41,7 @@ from obspy import UTCDateTime, readEvents from pylot.core.read.data import Data from pylot.core.read.inputs import FilterOptions, AutoPickParameter from pylot.core.pick.autopick import autopickevent +from pylot.core.loc.nll import locate as locateNll from pylot.core.util.defaults import FILTERDEFAULTS from pylot.core.util.errors import FormatError, DatastructureError,\ OverwriteError @@ -54,6 +55,7 @@ from pylot.core.util.thread import AutoPickThread from pylot.core.util.version import get_git_version as _getVersionString import icons_rc +locateTool = dict(nll=locateNll) class MainWindow(QMainWindow): __version__ = _getVersionString() @@ -765,7 +767,12 @@ class MainWindow(QMainWindow): self.draw() def locateEvent(self): - pass + settings = QSettings() + loctool = settings.value("loc/tool", "nll") + extlocpath = settings.value("%s/binPath".format(loctool), None) + locroot = settings.value("%s/rootPath".format(loctool), None) + if extlocpath is None or locroot is None: + pass def check4Loc(self): return self.picksNum() > 4 From ed1727299911da3b55acc05b674ca9a8ed47008b Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Sat, 14 Nov 2015 11:46:46 +0100 Subject: [PATCH 2/2] [bugfix] attribute was unset before using property setter --- QtPyLoT.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index 80627ca2..02b0dd1d 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -92,7 +92,7 @@ class MainWindow(QMainWindow): self.filteroptions = {} self.pickDlgs = {} self.picks = {} - self.locflag(False) + self.loc = False # UI has to be set up before(!) children widgets are about to show up self.setupUi()