From facffa1bf26ea79cb1a9f985a4cf516a0b236dbc Mon Sep 17 00:00:00 2001 From: Sebastianw Wehling-Benatelli Date: Wed, 31 Aug 2016 12:16:48 +0200 Subject: [PATCH] [refs #200] started to implement magnitude determination from QtPyLoT --- QtPyLoT.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/QtPyLoT.py b/QtPyLoT.py index 689e6988..8c8f9926 100755 --- a/QtPyLoT.py +++ b/QtPyLoT.py @@ -337,8 +337,8 @@ class MainWindow(QMainWindow): # pickToolBar.setObjectName("PickTools") # self.addActions(pickToolBar, pickToolActions) - locateEvent = self.createAction(parent=self, text='locateEvent', - slot=self.locateEvent, + locateEvent = self.createAction(parent=self, text='locate_event', + slot=self.locate_event, shortcut='Alt+Ctrl+L', icon=locate_icon, tip='Locate the event using ' @@ -891,7 +891,7 @@ class MainWindow(QMainWindow): else: raise TypeError('Unknow picktype {0}'.format(picktype)) - def locateEvent(self): + def locate_event(self): """ locate event using the manually picked phases :return: @@ -906,7 +906,7 @@ class MainWindow(QMainWindow): locroot = settings.value("{0}/rootPath".format(loctool), None) if locroot is None: self.PyLoTprefs() - self.locateEvent() + self.locate_event() infile = settings.value("{0}/inputFile".format(loctool), None) @@ -946,6 +946,13 @@ class MainWindow(QMainWindow): self.getData().applyEVTData(lt.read_location(locpath), type='event') + def calc_magnitude(self): + if self.getData().getEvtData().origins: + mag = None + return mag + else: + return + def check4Loc(self): return self.picksNum() > 4