Merge branch 'develop' of ariadne.geophysik.rub.de:/data/git/pylot into develop

This commit is contained in:
Ludger Küperkoch 2017-08-15 16:56:17 +02:00
commit 4d8dc912ac
3 changed files with 21 additions and 15 deletions

View File

@ -353,7 +353,7 @@ class MainWindow(QMainWindow):
# self.createNewEvent, # self.createNewEvent,
# QKeySequence.New, newIcon, # QKeySequence.New, newIcon,
# "Create a new event.") # "Create a new event.")
self.openEventAction = self.createAction(self, "Load event ...", self.openEventAction = self.createAction(self, "Load event information...",
self.load_data, self.load_data,
"Ctrl+M", "Ctrl+M",
openEventIcon, openEventIcon,
@ -503,7 +503,7 @@ class MainWindow(QMainWindow):
' the complete project on grid engine.') ' the complete project on grid engine.')
self.auto_pick_sge.setEnabled(False) self.auto_pick_sge.setEnabled(False)
autoPickActions = (self.auto_tune, self.auto_pick, self.compare_action) pickActions = (self.auto_tune, self.auto_pick, self.compare_action)
# pickToolBar = self.addToolBar("PickTools") # pickToolBar = self.addToolBar("PickTools")
# pickToolActions = (selectStation, ) # pickToolActions = (selectStation, )
@ -521,34 +521,38 @@ class MainWindow(QMainWindow):
# add top menu # add top menu
self.fileMenu = self.menuBar().addMenu('&File') self.fileMenu = self.menuBar().addMenu('&File')
self.fileMenuActions = (self.newProjectAction, self.addEventDataAction, self.fileMenuActions = (self.newProjectAction,
self.openProjectAction, self.saveProjectAction, self.openProjectAction, self.saveProjectAction,
self.saveProjectAsAction, self.saveProjectAsAction, None,
self.addEventDataAction,
self.openEventAction, self.saveEventAction, None, self.openEventAction, self.saveEventAction, None,
prefsEventAction, self.parameterAction, quitAction) quitAction)
self.fileMenu.aboutToShow.connect(self.updateFileMenu) self.fileMenu.aboutToShow.connect(self.updateFileMenu)
self.updateFileMenu() self.updateFileMenu()
self.editMenu = self.menuBar().addMenu('&Edit') self.editMenu = self.menuBar().addMenu('&Edit')
editActions = (self.filterAction, filterEditAction, None, editActions = (self.filterAction, filterEditAction, None,
self.selectPAction, self.selectSAction, None, self.selectPAction, self.selectSAction, None,
printAction) prefsEventAction)
#printAction) #TODO: print event?
pickMenuActions = (self.parameterAction,)
self.pickMenu = self.menuBar().addMenu('&Picking') self.pickMenu = self.menuBar().addMenu('&Picking')
self.autoPickMenu = self.pickMenu.addMenu('Automatic picking') self.autoPickMenu = self.pickMenu.addMenu('Automatic picking')
self.autoPickMenu.setEnabled(False) self.autoPickMenu.setEnabled(False)
pickActions = (self.auto_pick, self.auto_pick_local, self.auto_pick_sge) autoPickActions = (self.auto_pick, self.auto_pick_local, self.auto_pick_sge)
self.helpMenu = self.menuBar().addMenu('&Help') self.helpMenu = self.menuBar().addMenu('&Help')
helpActions = (helpAction,) helpActions = (helpAction,)
fileToolActions = (self.newProjectAction, self.addEventDataAction, fileToolActions = (self.newProjectAction,
self.openProjectAction, self.saveProjectAction, self.openProjectAction, self.saveProjectAction,
self.saveProjectAsAction) self.saveProjectAsAction)
eventToolActions = (self.openEventAction, self.openEventsAutoAction, eventToolActions = (self.addEventDataAction,
self.openEventAction, self.openEventsAutoAction,
self.saveEventAction, self.loadlocationaction, self.saveEventAction, self.loadlocationaction,
self.loadpilotevent) self.loadpilotevent)
@ -566,13 +570,14 @@ class MainWindow(QMainWindow):
locationToolBar.setObjectName("LocationTools") locationToolBar.setObjectName("LocationTools")
self.addActions(self.editMenu, editActions) self.addActions(self.editMenu, editActions)
self.addActions(self.autoPickMenu, pickActions) self.addActions(self.autoPickMenu, autoPickActions)
self.addActions(self.pickMenu, pickMenuActions)
self.addActions(self.helpMenu, helpActions) self.addActions(self.helpMenu, helpActions)
self.addActions(fileToolBar, fileToolActions) self.addActions(fileToolBar, fileToolActions)
self.addActions(eventToolBar, eventToolActions) self.addActions(eventToolBar, eventToolActions)
self.addActions(componentToolBar, componentActions) self.addActions(componentToolBar, componentActions)
self.addActions(autoPickToolBar, autoPickActions) self.addActions(autoPickToolBar, pickActions)
self.addActions(locationToolBar, locationToolActions) self.addActions(locationToolBar, locationToolActions)
self.eventLabel = QLabel() self.eventLabel = QLabel()

View File

@ -476,7 +476,7 @@ def getsignalwin(t, t1, tsignal):
''' '''
# get signal window # get signal window
isignal, = np.where((t <= min([t1 + tsignal, len(t)])) \ isignal, = np.where((t <= min([t1 + tsignal, t[-1]])) \
& (t >= t1)) & (t >= t1))
if np.size(isignal) < 1: if np.size(isignal) < 1:
print("getsignalwin: Empty array isignal, check signal window!") print("getsignalwin: Empty array isignal, check signal window!")

View File

@ -560,8 +560,9 @@ class WaveformWidgetPG(QtGui.QWidget):
vb.setYRange(float(lims[0]), float(lims[1]), padding=0) vb.setYRange(float(lims[0]), float(lims[1]), padding=0)
def setYTickLabels(self, pos, labels): def setYTickLabels(self, pos, labels):
ticks = zip(pos, labels) pos = list(pos)
minorTicks = [(0, 0) for item in labels] ticks = list(zip(pos, labels))
minorTicks = [(0, 0) for _ in labels]
# leftAx.tickLength = 5 # leftAx.tickLength = 5
# leftAx.orientation = 'right' # leftAx.orientation = 'right'
self.getAxItem('left').setTicks([ticks, minorTicks]) self.getAxItem('left').setTicks([ticks, minorTicks])
@ -2452,7 +2453,7 @@ class PylotParaBox(QtGui.QWidget):
self.add_special_pick_parameters_tab() self.add_special_pick_parameters_tab()
self.params_to_gui() self.params_to_gui()
self._toggle_advanced_settings() self._toggle_advanced_settings()
self.resize(720, 1280) self.resize(720, 860)
self.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal) self.setWindowModality(QtCore.Qt.WindowModality.ApplicationModal)
self.accepted.connect(self.params_from_gui) self.accepted.connect(self.params_from_gui)
self.rejected.connect(self.params_to_gui) self.rejected.connect(self.params_to_gui)