Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
10fbfe5554
@ -1 +1 @@
|
|||||||
8714-dirty
|
55a58-dirty
|
||||||
|
@ -1,19 +1,17 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import matplotlib
|
import matplotlib
|
||||||
matplotlib.use('Qt4Agg')
|
matplotlib.use('Qt4Agg')
|
||||||
matplotlib.rcParams['backend.qt4']='PySide'
|
matplotlib.rcParams['backend.qt4']='PySide'
|
||||||
|
|
||||||
from PySide import QtCore, QtGui, QtCore
|
from PySide import QtCore, QtGui
|
||||||
from asp3d_layout import *
|
|
||||||
from fmtomo_parameters_layout import *
|
|
||||||
from generate_survey_layout import *
|
|
||||||
from generate_survey_layout_minimal import *
|
|
||||||
from generate_seisarray_layout import *
|
|
||||||
from picking_parameters_layout import *
|
|
||||||
from vtk_tools_layout import *
|
|
||||||
from pylot.core.active import activeSeismoPick, surveyUtils, fmtomoUtils, seismicArrayPreparation
|
from pylot.core.active import activeSeismoPick, surveyUtils, fmtomoUtils, seismicArrayPreparation
|
||||||
|
from pylot.core.active.gui.asp3d_layout import *
|
||||||
|
from pylot.core.active.gui.vtk_tools_layout import *
|
||||||
|
from pylot.core.active.gui.windows import Gen_SeisArray, Gen_Survey_from_SA, Gen_Survey_from_SR, Call_autopicker, Call_FMTOMO
|
||||||
|
from pylot.core.active.gui.windows import openFile, saveFile, browseDir, getMaxCPU
|
||||||
|
|
||||||
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
|
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
|
||||||
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
|
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
|
||||||
@ -37,6 +35,14 @@ class gui_control(object):
|
|||||||
self.mainUI.progressBar.setVisible(False)
|
self.mainUI.progressBar.setVisible(False)
|
||||||
self.printSurveyTextbox()
|
self.printSurveyTextbox()
|
||||||
self.printSeisArrayTextbox()
|
self.printSeisArrayTextbox()
|
||||||
|
self.initWindowObjects()
|
||||||
|
|
||||||
|
def initWindowObjects(self):
|
||||||
|
self.gsa = None
|
||||||
|
self.gssa = None
|
||||||
|
self.gssr = None
|
||||||
|
self.autopicker = None
|
||||||
|
self.fmtomo = None
|
||||||
|
|
||||||
def setInitStates(self):
|
def setInitStates(self):
|
||||||
self.setPickState(False)
|
self.setPickState(False)
|
||||||
@ -45,18 +51,19 @@ class gui_control(object):
|
|||||||
self.setConnected2SurveyState(False)
|
self.setConnected2SurveyState(False)
|
||||||
|
|
||||||
def connectButtons(self):
|
def connectButtons(self):
|
||||||
QtCore.QObject.connect(self.mainUI.gen_new_seisarray, QtCore.SIGNAL("clicked()"), self.gen_seisarray)
|
QtCore.QObject.connect(self.mainUI.actionGenerate_new_Seismic_Array, QtCore.SIGNAL("triggered()"), self.gen_seisarray)
|
||||||
QtCore.QObject.connect(self.mainUI.load_seisarray, QtCore.SIGNAL("clicked()"), self.load_seisarray)
|
QtCore.QObject.connect(self.mainUI.actionLoad_Seismic_Array, QtCore.SIGNAL("triggered()"), self.load_seisarray)
|
||||||
QtCore.QObject.connect(self.mainUI.save_seisarray, QtCore.SIGNAL("clicked()"), self.save_seisarray)
|
QtCore.QObject.connect(self.mainUI.actionSave_Seismic_Array, QtCore.SIGNAL("triggered()"), self.save_seisarray)
|
||||||
QtCore.QObject.connect(self.mainUI.connect_to_survey, QtCore.SIGNAL("clicked()"), self.connect2Survey)
|
QtCore.QObject.connect(self.mainUI.actionLoad_Survey, QtCore.SIGNAL("triggered()"), self.load_survey)
|
||||||
QtCore.QObject.connect(self.mainUI.interpolate_receivers, QtCore.SIGNAL("clicked()"), self.interpolate_receivers)
|
QtCore.QObject.connect(self.mainUI.actionSave_Survey, QtCore.SIGNAL("triggered()"), self.save_survey)
|
||||||
QtCore.QObject.connect(self.mainUI.gen_new_survey, QtCore.SIGNAL("clicked()"), self.gen_survey)
|
QtCore.QObject.connect(self.mainUI.actionConnect_to_Survey, QtCore.SIGNAL("triggered()"), self.connect2Survey)
|
||||||
QtCore.QObject.connect(self.mainUI.load_survey, QtCore.SIGNAL("clicked()"), self.load_survey)
|
QtCore.QObject.connect(self.mainUI.actionInterpolate_Receivers, QtCore.SIGNAL("triggered()"), self.interpolate_receivers)
|
||||||
QtCore.QObject.connect(self.mainUI.save_survey, QtCore.SIGNAL("clicked()"), self.save_survey)
|
QtCore.QObject.connect(self.mainUI.actionGenerate_new_Survey, QtCore.SIGNAL("triggered()"), self.gen_survey)
|
||||||
QtCore.QObject.connect(self.mainUI.picker, QtCore.SIGNAL("clicked()"), self.callPicker)
|
QtCore.QObject.connect(self.mainUI.actionAutomatic_Picking, QtCore.SIGNAL("triggered()"), self.startPicker)
|
||||||
QtCore.QObject.connect(self.mainUI.postprocessing, QtCore.SIGNAL("clicked()"), self.postprocessing)
|
QtCore.QObject.connect(self.mainUI.actionPostprocessing, QtCore.SIGNAL("triggered()"), self.postprocessing)
|
||||||
QtCore.QObject.connect(self.mainUI.fmtomo, QtCore.SIGNAL("clicked()"), self.startFMTOMO)
|
QtCore.QObject.connect(self.mainUI.actionStart_FMTOMO_Simulation, QtCore.SIGNAL("triggered()"), self.startFMTOMO)
|
||||||
QtCore.QObject.connect(self.mainUI.vtk_tools, QtCore.SIGNAL("clicked()"), self.startVTKtools)
|
QtCore.QObject.connect(self.mainUI.actionVTK_Visualization, QtCore.SIGNAL("triggered()"), self.startVTKtools)
|
||||||
|
QtCore.QObject.connect(self.mainUI.actionExit, QtCore.SIGNAL("triggered()"), self.exitApp)
|
||||||
QtCore.QObject.connect(self.mainUI.comboBox_stats, QtCore.SIGNAL("activated(int)"), self.refreshPickedWidgets)
|
QtCore.QObject.connect(self.mainUI.comboBox_stats, QtCore.SIGNAL("activated(int)"), self.refreshPickedWidgets)
|
||||||
QtCore.QObject.connect(self.mainUI.shot_left, QtCore.SIGNAL("clicked()"), self.decreaseShotnumber)
|
QtCore.QObject.connect(self.mainUI.shot_left, QtCore.SIGNAL("clicked()"), self.decreaseShotnumber)
|
||||||
QtCore.QObject.connect(self.mainUI.shot_right, QtCore.SIGNAL("clicked()"), self.increaseShotnumber)
|
QtCore.QObject.connect(self.mainUI.shot_right, QtCore.SIGNAL("clicked()"), self.increaseShotnumber)
|
||||||
@ -74,81 +81,57 @@ class gui_control(object):
|
|||||||
else:
|
else:
|
||||||
self.survey.seisarray = None
|
self.survey.seisarray = None
|
||||||
disconnect = True
|
disconnect = True
|
||||||
qdialog = QtGui.QDialog(self.mainwindow)
|
|
||||||
ui = Ui_generate_seisarray()
|
if self.gsa is None:
|
||||||
ui.setupUi(qdialog)
|
self.gsa = Gen_SeisArray(self.mainwindow)
|
||||||
self.gen_new_seisarray = ui
|
else:
|
||||||
self.connectButtons_gen_seisarray()
|
self.gsa.start_dialog()
|
||||||
if qdialog.exec_():
|
|
||||||
srcfile = self.gen_new_seisarray.lineEdit_src.text()
|
if self.gsa.executed:
|
||||||
recfile = self.gen_new_seisarray.lineEdit_rec.text()
|
self.seisarray = self.gsa.get_seisarray()
|
||||||
ptsfile = self.gen_new_seisarray.lineEdit_pts.text()
|
|
||||||
if self.gen_new_seisarray.radioButton_interpolatable.isChecked():
|
|
||||||
self.seisarray = seismicArrayPreparation.SeisArray(recfile, True)
|
|
||||||
elif self.gen_new_seisarray.radioButton_normal.isChecked():
|
|
||||||
self.seisarray = seismicArrayPreparation.SeisArray(recfile, False)
|
|
||||||
if len(srcfile) > 0:
|
|
||||||
self.seisarray.addSourceLocations(srcfile)
|
|
||||||
if len(ptsfile) > 0:
|
|
||||||
self.seisarray.addMeasuredTopographyPoints(ptsfile)
|
|
||||||
if disconnect:
|
if disconnect:
|
||||||
self.setConnected2SurveyState(False)
|
self.setConnected2SurveyState(False)
|
||||||
self.setSeisArrayState(True)
|
self.setSeisArrayState(True)
|
||||||
|
|
||||||
|
|
||||||
def gen_survey(self):
|
def gen_survey(self):
|
||||||
if self.checkSurveyState():
|
if self.checkSurveyState():
|
||||||
if not self.continueDialogExists('Survey'):
|
if not self.continueDialogExists('Survey'):
|
||||||
return
|
return
|
||||||
if self.checkSeisArrayState():
|
if self.checkSeisArrayState():
|
||||||
|
if len(self.seisarray.getSourceCoordinates()) > 0:
|
||||||
if self.continueDialogMessage('Use geometry information of active Seismic Array?'):
|
if self.continueDialogMessage('Use geometry information of active Seismic Array?'):
|
||||||
if self.gen_survey_fromSeisArray():
|
if self.gssa is None:
|
||||||
|
self.gssa = Gen_Survey_from_SA(self.mainwindow, self.seisarray)
|
||||||
|
else:
|
||||||
|
self.gssa.start_dialog()
|
||||||
|
if self.gssa.executed:
|
||||||
|
self.survey = self.gssa.get_survey()
|
||||||
self.initNewSurvey()
|
self.initNewSurvey()
|
||||||
|
self.setConnected2SurveyState(True)
|
||||||
|
self.setPickState(False)
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
|
if not self.continueDialogMessage('Can not use current Seismic Array,'
|
||||||
|
' because there are no sources given.'):
|
||||||
return
|
return
|
||||||
if self.gen_survey_fromSRfiles():
|
if self.gssr is None:
|
||||||
|
self.gssr = Gen_Survey_from_SR(self.mainwindow)
|
||||||
|
else:
|
||||||
|
self.gssr.start_dialog()
|
||||||
|
if self.gssr.executed:
|
||||||
|
self.survey = self.gssr.get_survey()
|
||||||
|
self.seisarray = self.survey.seisarray
|
||||||
self.initNewSurvey()
|
self.initNewSurvey()
|
||||||
|
self.setSeisArrayState(True)
|
||||||
|
self.setConnected2SurveyState(True)
|
||||||
|
|
||||||
|
|
||||||
def initNewSurvey(self):
|
def initNewSurvey(self):
|
||||||
self.survey.setArtificialPick(0, 0) # artificial pick at source origin
|
self.survey.setArtificialPick(0, 0) # artificial pick at source origin
|
||||||
surveyUtils.setDynamicFittedSNR(self.survey.getShotDict())
|
|
||||||
self.setSurveyState(True)
|
self.setSurveyState(True)
|
||||||
self.setPickState(False)
|
self.setPickState(False)
|
||||||
|
|
||||||
def gen_survey_fromSeisArray(self):
|
|
||||||
qdialog = QtGui.QDialog(self.mainwindow)
|
|
||||||
ui = Ui_generate_survey_minimal()
|
|
||||||
ui.setupUi(qdialog)
|
|
||||||
self.gen_new_survey_min = ui
|
|
||||||
self.connectButtons_gen_survey_min()
|
|
||||||
if qdialog.exec_():
|
|
||||||
obsdir = self.gen_new_survey_min.lineEdit_obs.text()
|
|
||||||
fstart = self.gen_new_survey_min.fstart.text()
|
|
||||||
fend = self.gen_new_survey_min.fend.text()
|
|
||||||
self.survey = activeSeismoPick.Survey(obsdir, seisArray = self.seisarray,
|
|
||||||
useDefaultParas = True, fstart = fstart,
|
|
||||||
fend = fend)
|
|
||||||
self.setConnected2SurveyState(True)
|
|
||||||
self.setPickState(False)
|
|
||||||
return True
|
|
||||||
|
|
||||||
def gen_survey_fromSRfiles(self):
|
|
||||||
qdialog = QtGui.QDialog(self.mainwindow)
|
|
||||||
ui = Ui_generate_survey()
|
|
||||||
ui.setupUi(qdialog)
|
|
||||||
self.gen_new_survey = ui
|
|
||||||
self.connectButtons_gen_survey()
|
|
||||||
if qdialog.exec_():
|
|
||||||
srcfile = self.gen_new_survey.lineEdit_src.text()
|
|
||||||
recfile = self.gen_new_survey.lineEdit_rec.text()
|
|
||||||
obsdir = self.gen_new_survey.lineEdit_obs.text()
|
|
||||||
fstart = self.gen_new_survey.fstart.text()
|
|
||||||
fend = self.gen_new_survey.fend.text()
|
|
||||||
self.survey = activeSeismoPick.Survey(obsdir, srcfile, recfile,
|
|
||||||
useDefaultParas = True,
|
|
||||||
fstart = fstart, fend = fend)
|
|
||||||
self.setConnected2SurveyState(False)
|
|
||||||
return True
|
|
||||||
|
|
||||||
def addArrayPlot(self):
|
def addArrayPlot(self):
|
||||||
self.seisArrayFigure = Figure()
|
self.seisArrayFigure = Figure()
|
||||||
@ -157,11 +140,13 @@ class gui_control(object):
|
|||||||
self.seisArrayToolbar = NavigationToolbar(self.seisArrayCanvas, self.mainwindow)
|
self.seisArrayToolbar = NavigationToolbar(self.seisArrayCanvas, self.mainwindow)
|
||||||
self.mainUI.verticalLayout_tr1.addWidget(self.seisArrayToolbar)
|
self.mainUI.verticalLayout_tr1.addWidget(self.seisArrayToolbar)
|
||||||
|
|
||||||
|
|
||||||
def addSurfacePlot(self):
|
def addSurfacePlot(self):
|
||||||
self.surfaceFigure = Figure()
|
self.surfaceFigure = Figure()
|
||||||
self.surfaceCanvas = FigureCanvas(self.surfaceFigure)
|
self.surfaceCanvas = FigureCanvas(self.surfaceFigure)
|
||||||
self.mainUI.horizontalLayout_tr.addWidget(self.surfaceCanvas)
|
self.mainUI.horizontalLayout_tr.addWidget(self.surfaceCanvas)
|
||||||
|
|
||||||
|
|
||||||
def addStatPlots(self):
|
def addStatPlots(self):
|
||||||
self.statFigure_left = Figure()
|
self.statFigure_left = Figure()
|
||||||
self.statCanvas_left = FigureCanvas(self.statFigure_left)
|
self.statCanvas_left = FigureCanvas(self.statFigure_left)
|
||||||
@ -178,6 +163,7 @@ class gui_control(object):
|
|||||||
|
|
||||||
self.addItems2StatsComboBox()
|
self.addItems2StatsComboBox()
|
||||||
|
|
||||||
|
|
||||||
def addItems2StatsComboBox(self):
|
def addItems2StatsComboBox(self):
|
||||||
self.mainUI.comboBox_stats.insertItem(0, 'picked traces')
|
self.mainUI.comboBox_stats.insertItem(0, 'picked traces')
|
||||||
self.mainUI.comboBox_stats.insertItem(1, 'mean SNR')
|
self.mainUI.comboBox_stats.insertItem(1, 'mean SNR')
|
||||||
@ -186,6 +172,7 @@ class gui_control(object):
|
|||||||
self.mainUI.comboBox_stats.insertItem(4, 'median SPE')
|
self.mainUI.comboBox_stats.insertItem(4, 'median SPE')
|
||||||
self.enablePickedTools(False)
|
self.enablePickedTools(False)
|
||||||
|
|
||||||
|
|
||||||
def addItems2ShotsComboBox(self):
|
def addItems2ShotsComboBox(self):
|
||||||
shotnumbers = self.survey.data.keys()
|
shotnumbers = self.survey.data.keys()
|
||||||
shotnumbers.sort()
|
shotnumbers.sort()
|
||||||
@ -193,6 +180,7 @@ class gui_control(object):
|
|||||||
self.mainUI.comboBox_shots.insertItem(index, 'Shot: %s'%shotnumber)
|
self.mainUI.comboBox_shots.insertItem(index, 'Shot: %s'%shotnumber)
|
||||||
self.mainUI.comboBox_shots.setMaxCount(len(shotnumbers))
|
self.mainUI.comboBox_shots.setMaxCount(len(shotnumbers))
|
||||||
|
|
||||||
|
|
||||||
def increaseShotnumber(self):
|
def increaseShotnumber(self):
|
||||||
currentIndex = self.mainUI.comboBox_shots.currentIndex()
|
currentIndex = self.mainUI.comboBox_shots.currentIndex()
|
||||||
maxindex = self.mainUI.comboBox_shots.maxCount() - 1
|
maxindex = self.mainUI.comboBox_shots.maxCount() - 1
|
||||||
@ -201,6 +189,7 @@ class gui_control(object):
|
|||||||
else:
|
else:
|
||||||
self.mainUI.comboBox_shots.setCurrentIndex(currentIndex + 1)
|
self.mainUI.comboBox_shots.setCurrentIndex(currentIndex + 1)
|
||||||
|
|
||||||
|
|
||||||
def decreaseShotnumber(self):
|
def decreaseShotnumber(self):
|
||||||
currentIndex = self.mainUI.comboBox_shots.currentIndex()
|
currentIndex = self.mainUI.comboBox_shots.currentIndex()
|
||||||
maxindex = self.mainUI.comboBox_shots.maxCount() - 1
|
maxindex = self.mainUI.comboBox_shots.maxCount() - 1
|
||||||
@ -209,20 +198,25 @@ class gui_control(object):
|
|||||||
else:
|
else:
|
||||||
self.mainUI.comboBox_shots.setCurrentIndex(currentIndex - 1)
|
self.mainUI.comboBox_shots.setCurrentIndex(currentIndex - 1)
|
||||||
|
|
||||||
|
|
||||||
def plotShot(self):
|
def plotShot(self):
|
||||||
shotnumber = int(self.mainUI.comboBox_shots.currentText().split()[1])
|
shotnumber = int(self.mainUI.comboBox_shots.currentText().split()[1])
|
||||||
self.survey.data[shotnumber].matshow()
|
self.survey.data[shotnumber].matshow()
|
||||||
|
|
||||||
|
|
||||||
def addArrayAxes(self):
|
def addArrayAxes(self):
|
||||||
self.seisArrayAx = self.seisArrayFigure.add_subplot(111)
|
self.seisArrayAx = self.seisArrayFigure.add_subplot(111)
|
||||||
|
|
||||||
|
|
||||||
def addSurfaceAxes(self):
|
def addSurfaceAxes(self):
|
||||||
self.surfaceAx = self.surfaceFigure.add_subplot(111, projection = '3d')
|
self.surfaceAx = self.surfaceFigure.add_subplot(111, projection = '3d')
|
||||||
|
|
||||||
|
|
||||||
def addStatAxes(self):
|
def addStatAxes(self):
|
||||||
self.statAx_left = self.statFigure_left.add_subplot(111)
|
self.statAx_left = self.statFigure_left.add_subplot(111)
|
||||||
self.statAx_right = self.statFigure_right.add_subplot(111)
|
self.statAx_right = self.statFigure_right.add_subplot(111)
|
||||||
|
|
||||||
|
|
||||||
def enablePickedTools(self, bool, twoDim = False):
|
def enablePickedTools(self, bool, twoDim = False):
|
||||||
self.mainUI.comboBox_stats.setEnabled(bool)
|
self.mainUI.comboBox_stats.setEnabled(bool)
|
||||||
self.statToolbar_left.setEnabled(bool)
|
self.statToolbar_left.setEnabled(bool)
|
||||||
@ -235,26 +229,40 @@ class gui_control(object):
|
|||||||
if bool == False:
|
if bool == False:
|
||||||
self.mainUI.comboBox_shots.clear()
|
self.mainUI.comboBox_shots.clear()
|
||||||
|
|
||||||
|
|
||||||
def replotArray(self):
|
def replotArray(self):
|
||||||
self.seisArrayFigure.clf()
|
self.seisArrayFigure.clf()
|
||||||
self.addArrayAxes()
|
self.addArrayAxes()
|
||||||
self.plotArray()
|
self.plotArray()
|
||||||
self.seisArrayCanvas.draw()
|
self.seisArrayCanvas.draw()
|
||||||
|
|
||||||
|
|
||||||
def replotSurface(self):
|
def replotSurface(self):
|
||||||
self.surfaceFigure.clf()
|
self.surfaceFigure.clf()
|
||||||
self.addSurfaceAxes()
|
self.addSurfaceAxes()
|
||||||
self.plotSurface()
|
self.plotSurface()
|
||||||
self.surfaceCanvas.draw()
|
self.surfaceCanvas.draw()
|
||||||
|
|
||||||
|
|
||||||
def plotArray(self):
|
def plotArray(self):
|
||||||
self.seisarray.plotArray2D(self.seisArrayAx, highlight_measured = True, plot_topo = True, twoDim = self.seisarray.twoDim)
|
self.seisarray.plotArray2D(self.seisArrayAx, highlight_measured = True, plot_topo = True, twoDim = self.seisarray.twoDim)
|
||||||
|
|
||||||
|
|
||||||
def plotSurface(self):
|
def plotSurface(self):
|
||||||
if not self.seisarray.twoDim:
|
if not self.seisarray.twoDim:
|
||||||
self.seisarray.plotSurface3D(ax = self.surfaceAx, exag = True)
|
self.seisarray.plotSurface3D(ax = self.surfaceAx, exag = True)
|
||||||
self.seisarray.plotArray3D(ax = self.surfaceAx, legend = False, markersize = 3)
|
self.seisarray.plotArray3D(ax = self.surfaceAx, legend = False, markersize = 3)
|
||||||
|
|
||||||
|
|
||||||
|
def InitPickedWidgets(self):
|
||||||
|
if self.checkPickState():
|
||||||
|
surveyUtils.plotScatterStats4Receivers(self.survey, self.mainUI.comboBox_stats.currentText(),
|
||||||
|
self.statAx_left, twoDim = self.survey.twoDim)
|
||||||
|
surveyUtils.plotScatterStats4Shots(self.survey, self.mainUI.comboBox_stats.currentText(),
|
||||||
|
self.statAx_right, twoDim = self.survey.twoDim)
|
||||||
|
self.addItems2ShotsComboBox()
|
||||||
|
|
||||||
|
|
||||||
def refreshPickedWidgets(self):
|
def refreshPickedWidgets(self):
|
||||||
self.statFigure_left.clf()
|
self.statFigure_left.clf()
|
||||||
self.statFigure_right.clf()
|
self.statFigure_right.clf()
|
||||||
@ -263,13 +271,6 @@ class gui_control(object):
|
|||||||
self.statCanvas_left.draw()
|
self.statCanvas_left.draw()
|
||||||
self.statCanvas_right.draw()
|
self.statCanvas_right.draw()
|
||||||
|
|
||||||
def InitPickedWidgets(self):
|
|
||||||
if self.checkPickState():
|
|
||||||
surveyUtils.plotScatterStats4Receivers(self.survey, self.mainUI.comboBox_stats.currentText(),
|
|
||||||
self.statAx_left, twoDim = self.survey.twoDim)
|
|
||||||
surveyUtils.plotScatterStats4Shots(self.survey, self.mainUI.comboBox_stats.currentText(),
|
|
||||||
self.statAx_right, twoDim = self.survey.twoDim)
|
|
||||||
self.addItems2ShotsComboBox()
|
|
||||||
|
|
||||||
def printSurveyTextbox(self, init = True):
|
def printSurveyTextbox(self, init = True):
|
||||||
if init == True:
|
if init == True:
|
||||||
@ -286,6 +287,7 @@ class gui_control(object):
|
|||||||
string = surveyTitle + surveyText
|
string = surveyTitle + surveyText
|
||||||
self.mainUI.textBox_survey.setText(string)
|
self.mainUI.textBox_survey.setText(string)
|
||||||
|
|
||||||
|
|
||||||
def printSeisArrayTextbox(self, init = True):
|
def printSeisArrayTextbox(self, init = True):
|
||||||
if init == True:
|
if init == True:
|
||||||
seistup = (0, 0, 0)
|
seistup = (0, 0, 0)
|
||||||
@ -300,6 +302,7 @@ class gui_control(object):
|
|||||||
string = seisArrayTitle + seisArrayText
|
string = seisArrayTitle + seisArrayText
|
||||||
self.mainUI.textBox_seisarray.setText(string)
|
self.mainUI.textBox_seisarray.setText(string)
|
||||||
|
|
||||||
|
|
||||||
def interpolate_receivers(self):
|
def interpolate_receivers(self):
|
||||||
if not self.checkSeisArrayState():
|
if not self.checkSeisArrayState():
|
||||||
self.printDialogMessage('No Seismic Array defined.')
|
self.printDialogMessage('No Seismic Array defined.')
|
||||||
@ -307,20 +310,12 @@ class gui_control(object):
|
|||||||
self.seisarray.interpolateAll()
|
self.seisarray.interpolateAll()
|
||||||
self.refreshSeisArrayWidgets()
|
self.refreshSeisArrayWidgets()
|
||||||
|
|
||||||
|
|
||||||
def refreshSeisArrayWidgets(self):
|
def refreshSeisArrayWidgets(self):
|
||||||
self.replotArray()
|
self.replotArray()
|
||||||
self.replotSurface()
|
self.replotSurface()
|
||||||
self.printSeisArrayTextbox(init = False)
|
self.printSeisArrayTextbox(init = False)
|
||||||
|
|
||||||
def getPickParameters(self, ui, Picking_parameters):
|
|
||||||
if Picking_parameters.exec_():
|
|
||||||
ncores = int(ui.ncores.value())
|
|
||||||
vmin = float(ui.lineEdit_vmin.text())
|
|
||||||
vmax = float(ui.lineEdit_vmax.text())
|
|
||||||
folm = float(ui.slider_folm.value())/100.
|
|
||||||
AIC = ui.checkBox_AIC.isChecked()
|
|
||||||
aicwindow = (int(ui.lineEdit_aicleft.text()), int(ui.lineEdit_aicright.text()))
|
|
||||||
return ncores, vmin, vmax, folm, AIC, aicwindow
|
|
||||||
|
|
||||||
def connect2Survey(self):
|
def connect2Survey(self):
|
||||||
if not self.checkSurveyState():
|
if not self.checkSurveyState():
|
||||||
@ -338,42 +333,25 @@ class gui_control(object):
|
|||||||
self.printSurveyTextbox(init = False)
|
self.printSurveyTextbox(init = False)
|
||||||
print('Connected Seismic Array to active Survey object.')
|
print('Connected Seismic Array to active Survey object.')
|
||||||
|
|
||||||
def getMaxCPU(self):
|
|
||||||
import multiprocessing
|
|
||||||
return multiprocessing.cpu_count()
|
|
||||||
|
|
||||||
def refreshFolm(self):
|
def startPicker(self):
|
||||||
self.picker_ui.label_folm.setText('%s %%'%self.picker_ui.slider_folm.value())
|
|
||||||
|
|
||||||
def callPicker(self):
|
|
||||||
if not self.checkSurveyState():
|
if not self.checkSurveyState():
|
||||||
self.printDialogMessage('No Survey defined.')
|
self.printDialogMessage('No Survey defined.')
|
||||||
return
|
return
|
||||||
if self.checkPickState():
|
if self.checkPickState():
|
||||||
if not self.continueDialogMessage('Survey already picked. Continue?'):
|
if not self.continueDialogMessage('Survey already picked. Continue?'):
|
||||||
return
|
return
|
||||||
Picking_parameters = QtGui.QDialog(self.mainwindow)
|
|
||||||
ui = Ui_picking_parameters()
|
|
||||||
ui.setupUi(Picking_parameters)
|
|
||||||
ui.ncores.setMaximum(self.getMaxCPU())
|
|
||||||
self.picker_ui = ui
|
|
||||||
QtCore.QObject.connect(self.picker_ui.slider_folm, QtCore.SIGNAL("valueChanged(int)"), self.refreshFolm)
|
|
||||||
try:
|
|
||||||
ncores, vmin, vmax, folm, AIC, aicwindow = self.getPickParameters(ui, Picking_parameters)
|
|
||||||
except TypeError:
|
|
||||||
return
|
|
||||||
|
|
||||||
if AIC == True:
|
if self.autopicker is None:
|
||||||
HosAic = 'aic'
|
self.autopicker = Call_autopicker(self.mainwindow, self.survey)
|
||||||
else:
|
else:
|
||||||
HosAic = 'hos'
|
self.autopicker.start_dialog()
|
||||||
|
|
||||||
self.survey.pickAllShots(vmin = vmin, vmax = vmax,
|
if self.autopicker.executed:
|
||||||
folm = folm, HosAic = HosAic,
|
|
||||||
aicwindow = aicwindow, cores = ncores)
|
|
||||||
self.setPickState(True)
|
self.setPickState(True)
|
||||||
self.printSurveyTextbox(init = False)
|
self.printSurveyTextbox(init = False)
|
||||||
|
|
||||||
|
|
||||||
def startFMTOMO(self):
|
def startFMTOMO(self):
|
||||||
if not self.checkSurveyState():
|
if not self.checkSurveyState():
|
||||||
self.printDialogMessage('No Survey defined.')
|
self.printDialogMessage('No Survey defined.')
|
||||||
@ -381,14 +359,14 @@ class gui_control(object):
|
|||||||
if not self.checkPickState():
|
if not self.checkPickState():
|
||||||
self.printDialogMessage('Survey not picked.')
|
self.printDialogMessage('Survey not picked.')
|
||||||
return
|
return
|
||||||
fmtomo_parameters = QtGui.QDialog(self.mainwindow)
|
|
||||||
ui = Ui_fmtomo_parameters()
|
|
||||||
ui.setupUi(fmtomo_parameters)
|
|
||||||
ui.nproc.setMaximum(self.getMaxCPU())
|
|
||||||
|
|
||||||
self.fmtomo_parameters_ui = ui
|
if self.fmtomo is None:
|
||||||
self.connectButtons_startFMTOMO()
|
self.fmtomo = Call_FMTOMO(self.mainwindow, self.survey)
|
||||||
self.getFMTOMOparameters(ui, fmtomo_parameters)
|
else:
|
||||||
|
self.fmtomo.start_dialog()
|
||||||
|
|
||||||
|
#if self.fmtomo.executed:
|
||||||
|
|
||||||
|
|
||||||
def startVTKtools(self):
|
def startVTKtools(self):
|
||||||
vtk_tools = QtGui.QDialog(self.mainwindow)
|
vtk_tools = QtGui.QDialog(self.mainwindow)
|
||||||
@ -399,45 +377,10 @@ class gui_control(object):
|
|||||||
self.connectButtons_vtk_tools()
|
self.connectButtons_vtk_tools()
|
||||||
self.openVTKdialog(ui, vtk_tools)
|
self.openVTKdialog(ui, vtk_tools)
|
||||||
|
|
||||||
|
|
||||||
def openVTKdialog(self, ui, vtk_tools):
|
def openVTKdialog(self, ui, vtk_tools):
|
||||||
vtk_tools.exec_()
|
vtk_tools.exec_()
|
||||||
|
|
||||||
def getFMTOMOparameters(self, ui, fmtomo_parameters):
|
|
||||||
if fmtomo_parameters.exec_():
|
|
||||||
fmtomo_dir = ui.fmtomo_dir.text()
|
|
||||||
nIter = int(ui.nIter.value())
|
|
||||||
nproc = int(ui.nproc.value())
|
|
||||||
btop = float(ui.btop.text())
|
|
||||||
bbot = float(ui.bbot.text())
|
|
||||||
propgrid = (int(ui.pgrid_x.text()), int(ui.pgrid_y.text()), int(ui.pgrid_z.text()))
|
|
||||||
vgrid = (int(ui.invgrid_x.text()), int(ui.invgrid_y.text()), int(ui.invgrid_z.text()))
|
|
||||||
cushionfactor = float(ui.cushion.text())/100.
|
|
||||||
customgrid = ui.customgrid.text()
|
|
||||||
simuldir = ui.simuldir.text()
|
|
||||||
picks_dir = os.path.join(simuldir, 'picks')
|
|
||||||
|
|
||||||
if not os.path.isdir(picks_dir):
|
|
||||||
err = os.mkdir(picks_dir)
|
|
||||||
|
|
||||||
self.survey.exportFMTOMO(picks_dir)
|
|
||||||
|
|
||||||
cwd = os.getcwd()
|
|
||||||
interpolationMethod = 'linear'
|
|
||||||
os.chdir(simuldir)
|
|
||||||
if self.seisarray.twoDim:
|
|
||||||
interpolationMethod = 'nearest'
|
|
||||||
self.survey.seisarray.generateFMTOMOinputFromArray(propgrid, vgrid, (bbot, btop), cushionfactor,
|
|
||||||
interpolationMethod, customgrid = customgrid,
|
|
||||||
writeVTK = False)
|
|
||||||
os.chdir(cwd)
|
|
||||||
|
|
||||||
tomo = fmtomoUtils.Tomo3d(fmtomo_dir, simuldir)
|
|
||||||
tomo.runTOMO3D(nproc, nIter)
|
|
||||||
|
|
||||||
def connectButtons_startFMTOMO(self):
|
|
||||||
QtCore.QObject.connect(self.fmtomo_parameters_ui.browse_tomodir, QtCore.SIGNAL("clicked()"), self.chooseFMTOMOdir)
|
|
||||||
QtCore.QObject.connect(self.fmtomo_parameters_ui.browse_customgrid, QtCore.SIGNAL("clicked()"), self.chooseCustomgrid)
|
|
||||||
QtCore.QObject.connect(self.fmtomo_parameters_ui.browse_simuldir, QtCore.SIGNAL("clicked()"), self.chooseSimuldir)
|
|
||||||
|
|
||||||
def connectButtons_vtk_tools(self):
|
def connectButtons_vtk_tools(self):
|
||||||
QtCore.QObject.connect(self.vtk_tools_ui.pushButton_vg, QtCore.SIGNAL("clicked()"), self.chooseVgrid)
|
QtCore.QObject.connect(self.vtk_tools_ui.pushButton_vg, QtCore.SIGNAL("clicked()"), self.chooseVgrid)
|
||||||
@ -451,17 +394,21 @@ class gui_control(object):
|
|||||||
QtCore.QObject.connect(self.vtk_tools_ui.radioButton_rel, QtCore.SIGNAL("clicked()"), self.activateVgref)
|
QtCore.QObject.connect(self.vtk_tools_ui.radioButton_rel, QtCore.SIGNAL("clicked()"), self.activateVgref)
|
||||||
QtCore.QObject.connect(self.vtk_tools_ui.radioButton_abs, QtCore.SIGNAL("clicked()"), self.deactivateVgref)
|
QtCore.QObject.connect(self.vtk_tools_ui.radioButton_abs, QtCore.SIGNAL("clicked()"), self.deactivateVgref)
|
||||||
|
|
||||||
|
|
||||||
def openFileParaview(self):
|
def openFileParaview(self):
|
||||||
os.system('paraview %s &'%self.vtk_tools_ui.lineEdit_vgout.text())
|
os.system('paraview %s &'%self.vtk_tools_ui.lineEdit_vgout.text())
|
||||||
|
|
||||||
|
|
||||||
def activateVgref(self):
|
def activateVgref(self):
|
||||||
self.vtk_tools_ui.lineEdit_vgref.setEnabled(True)
|
self.vtk_tools_ui.lineEdit_vgref.setEnabled(True)
|
||||||
self.vtk_tools_ui.pushButton_vgref.setEnabled(True)
|
self.vtk_tools_ui.pushButton_vgref.setEnabled(True)
|
||||||
|
|
||||||
|
|
||||||
def deactivateVgref(self):
|
def deactivateVgref(self):
|
||||||
self.vtk_tools_ui.lineEdit_vgref.setEnabled(False)
|
self.vtk_tools_ui.lineEdit_vgref.setEnabled(False)
|
||||||
self.vtk_tools_ui.pushButton_vgref.setEnabled(False)
|
self.vtk_tools_ui.pushButton_vgref.setEnabled(False)
|
||||||
|
|
||||||
|
|
||||||
def checkVgStartButton(self):
|
def checkVgStartButton(self):
|
||||||
ui = self.vtk_tools_ui
|
ui = self.vtk_tools_ui
|
||||||
if ui.radioButton_rel.isChecked():
|
if ui.radioButton_rel.isChecked():
|
||||||
@ -475,6 +422,7 @@ class gui_control(object):
|
|||||||
else:
|
else:
|
||||||
ui.start_vg.setEnabled(False)
|
ui.start_vg.setEnabled(False)
|
||||||
|
|
||||||
|
|
||||||
def checkRaysStartButton(self):
|
def checkRaysStartButton(self):
|
||||||
ui = self.vtk_tools_ui
|
ui = self.vtk_tools_ui
|
||||||
if ui.lineEdit_rays.text() != '' and ui.lineEdit_raysout.text() != '':
|
if ui.lineEdit_rays.text() != '' and ui.lineEdit_raysout.text() != '':
|
||||||
@ -482,22 +430,27 @@ class gui_control(object):
|
|||||||
else:
|
else:
|
||||||
ui.start_rays.setEnabled(False)
|
ui.start_rays.setEnabled(False)
|
||||||
|
|
||||||
|
|
||||||
def chooseVgrid(self):
|
def chooseVgrid(self):
|
||||||
self.vtk_tools_ui.lineEdit_vg.setText(self.openFile())
|
self.vtk_tools_ui.lineEdit_vg.setText(openFile())
|
||||||
self.checkVgStartButton()
|
self.checkVgStartButton()
|
||||||
|
|
||||||
|
|
||||||
def chooseVgridref(self):
|
def chooseVgridref(self):
|
||||||
self.vtk_tools_ui.lineEdit_vgref.setText(self.openFile())
|
self.vtk_tools_ui.lineEdit_vgref.setText(openFile())
|
||||||
self.checkVgStartButton()
|
self.checkVgStartButton()
|
||||||
|
|
||||||
|
|
||||||
def chooseRaysIn(self):
|
def chooseRaysIn(self):
|
||||||
self.vtk_tools_ui.lineEdit_rays.setText(self.openFile())
|
self.vtk_tools_ui.lineEdit_rays.setText(openFile())
|
||||||
self.checkRaysStartButton()
|
self.checkRaysStartButton()
|
||||||
|
|
||||||
|
|
||||||
def chooseRaysOutDir(self):
|
def chooseRaysOutDir(self):
|
||||||
self.vtk_tools_ui.lineEdit_raysout.setText(self.browseDir())
|
self.vtk_tools_ui.lineEdit_raysout.setText(browseDir())
|
||||||
self.checkRaysStartButton()
|
self.checkRaysStartButton()
|
||||||
|
|
||||||
|
|
||||||
def startvgvtk(self):
|
def startvgvtk(self):
|
||||||
ui = self.vtk_tools_ui
|
ui = self.vtk_tools_ui
|
||||||
if ui.lineEdit_vgout.text() == '':
|
if ui.lineEdit_vgout.text() == '':
|
||||||
@ -513,24 +466,15 @@ class gui_control(object):
|
|||||||
absOrRel='rel',
|
absOrRel='rel',
|
||||||
inputfileref = ui.lineEdit_vgref.text())
|
inputfileref = ui.lineEdit_vgref.text())
|
||||||
|
|
||||||
|
|
||||||
def startraysvtk(self):
|
def startraysvtk(self):
|
||||||
ui = self.vtk_tools_ui
|
ui = self.vtk_tools_ui
|
||||||
fmtomoUtils.rays2VTK(ui.lineEdit_rays.text(), ui.lineEdit_raysout.text())
|
fmtomoUtils.rays2VTK(ui.lineEdit_rays.text(), ui.lineEdit_raysout.text())
|
||||||
|
|
||||||
|
|
||||||
def newFileVTK(self):
|
def newFileVTK(self):
|
||||||
self.vtk_tools_ui.lineEdit_vgout.setText(self.saveFile())
|
self.vtk_tools_ui.lineEdit_vgout.setText(saveFile())
|
||||||
|
|
||||||
def chooseFMTOMOdir(self):
|
|
||||||
self.fmtomo_parameters_ui.fmtomo_dir.setText(self.browseDir())
|
|
||||||
|
|
||||||
def chooseCustomgrid(self):
|
|
||||||
self.fmtomo_parameters_ui.customgrid.setText(self.openFile())
|
|
||||||
|
|
||||||
def chooseSimuldir(self):
|
|
||||||
self.fmtomo_parameters_ui.simuldir.setText(self.browseDir())
|
|
||||||
|
|
||||||
def chooseSeisarray(self):
|
|
||||||
self.fmtomo_parameters_ui.seisarray.setText(self.openFile())
|
|
||||||
|
|
||||||
def postprocessing(self):
|
def postprocessing(self):
|
||||||
if not self.checkSurveyState():
|
if not self.checkSurveyState():
|
||||||
@ -539,11 +483,12 @@ class gui_control(object):
|
|||||||
self.survey.plotAllPicks()
|
self.survey.plotAllPicks()
|
||||||
self.refreshPickedWidgets() # wait until finished
|
self.refreshPickedWidgets() # wait until finished
|
||||||
|
|
||||||
|
|
||||||
def load_survey(self):
|
def load_survey(self):
|
||||||
if self.checkSurveyState():
|
if self.checkSurveyState():
|
||||||
if not self.continueDialogExists('Survey'):
|
if not self.continueDialogExists('Survey'):
|
||||||
return
|
return
|
||||||
filename = self.openFile()
|
filename = openFile()
|
||||||
if filename is None:
|
if filename is None:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
@ -575,6 +520,7 @@ class gui_control(object):
|
|||||||
self.setSeisArrayState(False)
|
self.setSeisArrayState(False)
|
||||||
self.printDialogMessage('Loaded Survey.')
|
self.printDialogMessage('Loaded Survey.')
|
||||||
|
|
||||||
|
|
||||||
def load_seisarray(self):
|
def load_seisarray(self):
|
||||||
disconnect = False
|
disconnect = False
|
||||||
if self.checkSeisArrayState():
|
if self.checkSeisArrayState():
|
||||||
@ -588,7 +534,7 @@ class gui_control(object):
|
|||||||
self.survey.seisarray = None
|
self.survey.seisarray = None
|
||||||
disconnect = True
|
disconnect = True
|
||||||
|
|
||||||
filename = self.openFile()
|
filename = openFile()
|
||||||
if filename is None:
|
if filename is None:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
@ -605,24 +551,27 @@ class gui_control(object):
|
|||||||
self.seisarray = seisarray
|
self.seisarray = seisarray
|
||||||
self.setSeisArrayState(True)
|
self.setSeisArrayState(True)
|
||||||
|
|
||||||
|
|
||||||
def save_seisarray(self):
|
def save_seisarray(self):
|
||||||
if not self.checkSeisArrayState():
|
if not self.checkSeisArrayState():
|
||||||
self.printDialogMessage('No Seismic Array defined.')
|
self.printDialogMessage('No Seismic Array defined.')
|
||||||
return
|
return
|
||||||
filename = self.saveFile()
|
filename = saveFile()
|
||||||
if filename is None:
|
if filename is None:
|
||||||
return
|
return
|
||||||
self.seisarray.saveSeisArray(filename)
|
self.seisarray.saveSeisArray(filename)
|
||||||
|
|
||||||
|
|
||||||
def save_survey(self):
|
def save_survey(self):
|
||||||
if not self.checkSurveyState():
|
if not self.checkSurveyState():
|
||||||
self.printDialogMessage('No Survey defined.')
|
self.printDialogMessage('No Survey defined.')
|
||||||
return
|
return
|
||||||
filename = self.saveFile()
|
filename = saveFile()
|
||||||
if filename is None:
|
if filename is None:
|
||||||
return
|
return
|
||||||
self.survey.saveSurvey(filename)
|
self.survey.saveSurvey(filename)
|
||||||
|
|
||||||
|
|
||||||
def setSurveyState(self, state):
|
def setSurveyState(self, state):
|
||||||
if state == True:
|
if state == True:
|
||||||
self.mainUI.survey_active.setPixmap(self.applypixmap)
|
self.mainUI.survey_active.setPixmap(self.applypixmap)
|
||||||
@ -630,18 +579,21 @@ class gui_control(object):
|
|||||||
elif state == False:
|
elif state == False:
|
||||||
self.mainUI.survey_active.setPixmap(self.cancelpixmap)
|
self.mainUI.survey_active.setPixmap(self.cancelpixmap)
|
||||||
|
|
||||||
|
|
||||||
def checkSurveyState(self):
|
def checkSurveyState(self):
|
||||||
if self.survey == None:
|
if self.survey == None:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def checkSeisArrayState(self):
|
def checkSeisArrayState(self):
|
||||||
if self.seisarray == None:
|
if self.seisarray == None:
|
||||||
return False
|
return False
|
||||||
else:
|
else:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def setPickState(self, state):
|
def setPickState(self, state):
|
||||||
if state == True and self.checkSurveyState():
|
if state == True and self.checkSurveyState():
|
||||||
self.mainUI.picked_active.setPixmap(self.applypixmap)
|
self.mainUI.picked_active.setPixmap(self.applypixmap)
|
||||||
@ -659,6 +611,7 @@ class gui_control(object):
|
|||||||
self.enablePickedTools(False)
|
self.enablePickedTools(False)
|
||||||
self.survey.picked = False
|
self.survey.picked = False
|
||||||
|
|
||||||
|
|
||||||
def setSeisArrayState(self, state):
|
def setSeisArrayState(self, state):
|
||||||
if state == True:
|
if state == True:
|
||||||
self.mainUI.seisarray_active.setPixmap(self.applypixmap)
|
self.mainUI.seisarray_active.setPixmap(self.applypixmap)
|
||||||
@ -670,12 +623,14 @@ class gui_control(object):
|
|||||||
if self.seisArrayFigure is not None:
|
if self.seisArrayFigure is not None:
|
||||||
self.seisArrayFigure.clf()
|
self.seisArrayFigure.clf()
|
||||||
|
|
||||||
|
|
||||||
def setConnected2SurveyState(self, state):
|
def setConnected2SurveyState(self, state):
|
||||||
if state == True:
|
if state == True:
|
||||||
self.mainUI.seisarray_on_survey_active.setPixmap(self.applypixmap)
|
self.mainUI.seisarray_on_survey_active.setPixmap(self.applypixmap)
|
||||||
elif state == False:
|
elif state == False:
|
||||||
self.mainUI.seisarray_on_survey_active.setPixmap(self.cancelpixmap)
|
self.mainUI.seisarray_on_survey_active.setPixmap(self.cancelpixmap)
|
||||||
|
|
||||||
|
|
||||||
def checkConnected2SurveyState(self):
|
def checkConnected2SurveyState(self):
|
||||||
if self.checkSurveyState():
|
if self.checkSurveyState():
|
||||||
if self.survey.seisarray != None:
|
if self.survey.seisarray != None:
|
||||||
@ -683,12 +638,14 @@ class gui_control(object):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def checkPickState(self):
|
def checkPickState(self):
|
||||||
if not self.survey:
|
if not self.survey:
|
||||||
self.printDialogMessage('No Survey defined.')
|
self.printDialogMessage('No Survey defined.')
|
||||||
return
|
return
|
||||||
return self.survey.picked
|
return self.survey.picked
|
||||||
|
|
||||||
|
|
||||||
def printDialogMessage(self, message):
|
def printDialogMessage(self, message):
|
||||||
qmb = QtGui.QMessageBox()
|
qmb = QtGui.QMessageBox()
|
||||||
qmb.setText(message)
|
qmb.setText(message)
|
||||||
@ -696,6 +653,7 @@ class gui_control(object):
|
|||||||
qmb.setIcon(QtGui.QMessageBox.Warning)
|
qmb.setIcon(QtGui.QMessageBox.Warning)
|
||||||
qmb.exec_()
|
qmb.exec_()
|
||||||
|
|
||||||
|
|
||||||
def continueDialogExists(self, name):
|
def continueDialogExists(self, name):
|
||||||
qmb = QtGui.QMessageBox()
|
qmb = QtGui.QMessageBox()
|
||||||
qmb.setText('%s object already exists. Overwrite?'%name)
|
qmb.setText('%s object already exists. Overwrite?'%name)
|
||||||
@ -707,6 +665,7 @@ class gui_control(object):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
||||||
def continueDialogMessage(self, message):
|
def continueDialogMessage(self, message):
|
||||||
qmb = QtGui.QMessageBox()
|
qmb = QtGui.QMessageBox()
|
||||||
qmb.setText(message)
|
qmb.setText(message)
|
||||||
@ -718,63 +677,12 @@ class gui_control(object):
|
|||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def connectButtons_gen_survey(self):
|
|
||||||
QtCore.QObject.connect(self.gen_new_survey.pushButton_rec, QtCore.SIGNAL("clicked()"), self.chooseReceiverfile)
|
|
||||||
QtCore.QObject.connect(self.gen_new_survey.pushButton_src, QtCore.SIGNAL("clicked()"), self.chooseSourcefile)
|
|
||||||
QtCore.QObject.connect(self.gen_new_survey.pushButton_obs, QtCore.SIGNAL("clicked()"), self.chooseObsdir)
|
|
||||||
|
|
||||||
def connectButtons_gen_survey_min(self):
|
def exitApp(self):
|
||||||
QtCore.QObject.connect(self.gen_new_survey_min.pushButton_obs, QtCore.SIGNAL("clicked()"), self.chooseObsdir_min)
|
QtCore.QCoreApplication.instance().quit()
|
||||||
|
|
||||||
def connectButtons_gen_seisarray(self):
|
|
||||||
QtCore.QObject.connect(self.gen_new_seisarray.pushButton_rec, QtCore.SIGNAL("clicked()"), self.chooseMeasuredRec)
|
|
||||||
QtCore.QObject.connect(self.gen_new_seisarray.pushButton_src, QtCore.SIGNAL("clicked()"), self.chooseMeasuredSrc)
|
|
||||||
QtCore.QObject.connect(self.gen_new_seisarray.pushButton_obs, QtCore.SIGNAL("clicked()"), self.chooseMeasuredPts)
|
|
||||||
|
|
||||||
def chooseMeasuredSrc(self):
|
|
||||||
self.gen_new_seisarray.lineEdit_src.setText(self.openFile('Open measured sources file.'))
|
|
||||||
|
|
||||||
def chooseMeasuredRec(self):
|
|
||||||
self.gen_new_seisarray.lineEdit_rec.setText(self.openFile('Open measured receivers file.'))
|
|
||||||
|
|
||||||
def chooseMeasuredPts(self):
|
|
||||||
self.gen_new_seisarray.lineEdit_pts.setText(self.openFile('Open measured points file.'))
|
|
||||||
|
|
||||||
def chooseSourcefile(self):
|
|
||||||
self.gen_new_survey.lineEdit_src.setText(self.openFile('Open sourcefile.'))
|
|
||||||
|
|
||||||
def chooseReceiverfile(self):
|
|
||||||
self.gen_new_survey.lineEdit_rec.setText(self.openFile('Open receiverfile.'))
|
|
||||||
|
|
||||||
def chooseObsdir(self):
|
|
||||||
self.gen_new_survey.lineEdit_obs.setText(self.browseDir('Choose observation directory.'))
|
|
||||||
|
|
||||||
def chooseObsdir_min(self):
|
|
||||||
self.gen_new_survey_min.lineEdit_obs.setText(self.browseDir('Choose observation directory.'))
|
|
||||||
|
|
||||||
def openFile(self, name = 'Open'):
|
|
||||||
dialog = QtGui.QFileDialog()
|
|
||||||
dialog.setWindowTitle(name) #not working yet
|
|
||||||
filename = dialog.getOpenFileName()
|
|
||||||
if len(filename[0]) > 0:
|
|
||||||
return filename[0]
|
|
||||||
|
|
||||||
def saveFile(self, name = 'Save'):
|
|
||||||
dialog = QtGui.QFileDialog()
|
|
||||||
dialog.setWindowTitle(name)
|
|
||||||
filename = dialog.getSaveFileName()
|
|
||||||
if len(filename[0]) > 0:
|
|
||||||
return filename[0]
|
|
||||||
|
|
||||||
def browseDir(self, name = 'Open Directory'):
|
|
||||||
dialog = QtGui.QFileDialog()
|
|
||||||
dialog.setWindowTitle(name)
|
|
||||||
directory = dialog.getExistingDirectory()
|
|
||||||
if len(directory) > 0:
|
|
||||||
return directory
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import sys
|
|
||||||
app = QtGui.QApplication(sys.argv)
|
app = QtGui.QApplication(sys.argv)
|
||||||
MainWindow = QtGui.QMainWindow()
|
MainWindow = QtGui.QMainWindow()
|
||||||
ui = Ui_MainWindow()
|
ui = Ui_MainWindow()
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
__author__ = 'sebastianw'
|
__author__ = 'marcel'
|
||||||
|
@ -1,264 +0,0 @@
|
|||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import sys
|
|
||||||
from PySide import QtCore, QtGui
|
|
||||||
from pylot.core.active import activeSeismoPick
|
|
||||||
|
|
||||||
class Ui_ActiveSeismoPick3D(object):
|
|
||||||
def __init__(self):
|
|
||||||
self.survey = None
|
|
||||||
|
|
||||||
def setupUi(self, MainWindow):
|
|
||||||
MainWindow.setObjectName("MainWindow")
|
|
||||||
MainWindow.resize(550, 350)
|
|
||||||
|
|
||||||
self.centralwidget = QtGui.QWidget(MainWindow)
|
|
||||||
self.centralwidget.setObjectName("centralwidget")
|
|
||||||
self.addBrowseButtons()
|
|
||||||
self.addButtons()
|
|
||||||
self.addLineEdits()
|
|
||||||
self.addLabels()
|
|
||||||
|
|
||||||
MainWindow.setCentralWidget(self.centralwidget)
|
|
||||||
|
|
||||||
self.setMenubar(MainWindow)
|
|
||||||
|
|
||||||
self.menuPreferences = QtGui.QMenu(self.menubar)
|
|
||||||
self.menuPreferences.setObjectName("menuPreferences")
|
|
||||||
MainWindow.setMenuBar(self.menubar)
|
|
||||||
|
|
||||||
self.statusbar = QtGui.QStatusBar(MainWindow)
|
|
||||||
self.statusbar.setObjectName("statusbar")
|
|
||||||
MainWindow.setStatusBar(self.statusbar)
|
|
||||||
self.menubar.addAction(self.menuPreferences.menuAction())
|
|
||||||
|
|
||||||
self.retranslateUi(MainWindow)
|
|
||||||
self.connectButtons()
|
|
||||||
|
|
||||||
def setMenubar(self, window):
|
|
||||||
self.menubar = QtGui.QMenuBar(window)
|
|
||||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 603, 21))
|
|
||||||
self.menubar.setObjectName("menubar")
|
|
||||||
|
|
||||||
def connectButtons(self):
|
|
||||||
QtCore.QObject.connect(self.browseButton_rec, QtCore.SIGNAL("clicked()"), self.chooseReceiverfile)
|
|
||||||
QtCore.QObject.connect(self.browseButton_src, QtCore.SIGNAL("clicked()"), self.chooseSourcefile)
|
|
||||||
QtCore.QObject.connect(self.browseButton_obsdir, QtCore.SIGNAL("clicked()"), self.chooseObsdir)
|
|
||||||
QtCore.QObject.connect(self.start_picking, QtCore.SIGNAL("clicked()"), self.callPicker)
|
|
||||||
QtCore.QObject.connect(self.gen_survey, QtCore.SIGNAL("clicked()"), self.generateSurvey)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
|
||||||
|
|
||||||
def addLabels(self):
|
|
||||||
self.label = QtGui.QLabel(self.centralwidget)
|
|
||||||
self.label.setGeometry(QtCore.QRect(40, 70, 131, 20))
|
|
||||||
self.label.setObjectName("label")
|
|
||||||
|
|
||||||
self.label_2 = QtGui.QLabel(self.centralwidget)
|
|
||||||
self.label_2.setGeometry(QtCore.QRect(40, 110, 131, 20))
|
|
||||||
self.label_2.setObjectName("label_2")
|
|
||||||
|
|
||||||
self.label_3 = QtGui.QLabel(self.centralwidget)
|
|
||||||
self.label_3.setGeometry(QtCore.QRect(40, 150, 131, 20))
|
|
||||||
self.label_3.setObjectName("label_3")
|
|
||||||
|
|
||||||
def addLineEdits(self):
|
|
||||||
self.receiverfile_lineEdit = QtGui.QLineEdit(self.centralwidget)
|
|
||||||
self.receiverfile_lineEdit.setGeometry(QtCore.QRect(192, 70, 231, 20))
|
|
||||||
self.receiverfile_lineEdit.setObjectName("receiverfile_lineEdit")
|
|
||||||
|
|
||||||
self.sourcefile_lineEdit = QtGui.QLineEdit(self.centralwidget)
|
|
||||||
self.sourcefile_lineEdit.setGeometry(QtCore.QRect(192, 110, 231, 20))
|
|
||||||
self.sourcefile_lineEdit.setObjectName("sourcefile_lineEdit")
|
|
||||||
|
|
||||||
self.obsdir_lineEdit = QtGui.QLineEdit(self.centralwidget)
|
|
||||||
self.obsdir_lineEdit.setGeometry(QtCore.QRect(192, 150, 231, 20))
|
|
||||||
self.obsdir_lineEdit.setText("")
|
|
||||||
self.obsdir_lineEdit.setObjectName("obsdir_lineEdit")
|
|
||||||
|
|
||||||
def addBrowseButtons(self):
|
|
||||||
self.browseButton_rec = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.browseButton_rec.setGeometry(QtCore.QRect(440, 70, 75, 23))
|
|
||||||
self.browseButton_rec.setObjectName("browseButton_rec")
|
|
||||||
|
|
||||||
self.browseButton_src = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.browseButton_src.setGeometry(QtCore.QRect(440, 110, 75, 23))
|
|
||||||
self.browseButton_src.setObjectName("browseButton_src")
|
|
||||||
|
|
||||||
self.browseButton_obsdir = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.browseButton_obsdir.setGeometry(QtCore.QRect(440, 150, 75, 23))
|
|
||||||
self.browseButton_obsdir.setObjectName("browseButton_obsdir")
|
|
||||||
|
|
||||||
def addButtons(self):
|
|
||||||
self.gen_survey = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.gen_survey.setGeometry(QtCore.QRect(80, 230, 61, 61))
|
|
||||||
self.gen_survey.setObjectName("gen_survey")
|
|
||||||
|
|
||||||
self.start_picking = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.start_picking.setGeometry(QtCore.QRect(160, 230, 61, 61))
|
|
||||||
self.start_picking.setObjectName("start_picking")
|
|
||||||
|
|
||||||
def addProgressBar(self):
|
|
||||||
self.progressBar = QtGui.QProgressBar(self.centralwidget)
|
|
||||||
self.progressBar.setGeometry(QtCore.QRect(470, 280, 118, 23))
|
|
||||||
self.progressBar.setObjectName("progressBar")
|
|
||||||
|
|
||||||
def updateProgressBar(self):
|
|
||||||
self.progressBar.setProperty("value", 24)
|
|
||||||
|
|
||||||
def browseFile(self):
|
|
||||||
dialog = QtGui.QFileDialog()
|
|
||||||
filename = dialog.getOpenFileName()
|
|
||||||
return filename[0]
|
|
||||||
|
|
||||||
def browseDir(self):
|
|
||||||
dialog = QtGui.QFileDialog()
|
|
||||||
directory = dialog.getExistingDirectory()
|
|
||||||
return directory
|
|
||||||
|
|
||||||
def chooseSourcefile(self):
|
|
||||||
self.sourcefile_lineEdit.setText(self.browseFile())
|
|
||||||
|
|
||||||
def chooseReceiverfile(self):
|
|
||||||
self.receiverfile_lineEdit.setText(self.browseFile())
|
|
||||||
|
|
||||||
def chooseObsdir(self):
|
|
||||||
self.obsdir_lineEdit.setText(self.browseDir())
|
|
||||||
|
|
||||||
def getSourcefile(self):
|
|
||||||
return self.sourcefile_lineEdit.text()
|
|
||||||
|
|
||||||
def getReceiverfile(self):
|
|
||||||
return self.receiverfile_lineEdit.text()
|
|
||||||
|
|
||||||
def getObsdir(self):
|
|
||||||
return self.obsdir_lineEdit.text()
|
|
||||||
|
|
||||||
def retranslateUi(self, MainWindow):
|
|
||||||
MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "ActiveSeismoPick3D", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.browseButton_rec.setText(QtGui.QApplication.translate("MainWindow", "Browse", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.browseButton_src.setText(QtGui.QApplication.translate("MainWindow", "Browse", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label.setText(QtGui.QApplication.translate("MainWindow", "Receiver File", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_2.setText(QtGui.QApplication.translate("MainWindow", "Source File", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.start_picking.setText(QtGui.QApplication.translate("MainWindow", "Start\n"
|
|
||||||
"Picking", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.browseButton_obsdir.setText(QtGui.QApplication.translate("MainWindow", "Browse", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.gen_survey.setText(QtGui.QApplication.translate("MainWindow", "Gemerate\nSurvey", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_3.setText(QtGui.QApplication.translate("MainWindow", "Seismogram Directory", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.menuPreferences.setTitle(QtGui.QApplication.translate("MainWindow", "Preferences", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
|
|
||||||
def generateSurvey(self):
|
|
||||||
obsdir = self.getObsdir()
|
|
||||||
self.survey = activeSeismoPick.Survey(self.getObsdir(), self.getSourcefile(), self.getReceiverfile(),
|
|
||||||
useDefaultParas = True)
|
|
||||||
|
|
||||||
|
|
||||||
def callPicker(self):
|
|
||||||
Picking_parameters = QtGui.QDialog(self.centralwidget)
|
|
||||||
ui = Ui_Picking_parameters()
|
|
||||||
ui.setupUi(Picking_parameters)
|
|
||||||
ncores, vmin, vmax, folm, AIC, aicwindow = ui.getParameters(Picking_parameters)
|
|
||||||
if AIC == True:
|
|
||||||
HosAic = 'aic'
|
|
||||||
else:
|
|
||||||
HosAic = 'hos'
|
|
||||||
if self.survey is None:
|
|
||||||
print('Survey not defined.')
|
|
||||||
return
|
|
||||||
|
|
||||||
self.survey.pickAllShots(vmin = vmin, vmax = vmax,
|
|
||||||
folm = folm, HosAic = HosAic,
|
|
||||||
aicwindow = aicwindow, cores = ncores)
|
|
||||||
|
|
||||||
|
|
||||||
class Ui_Picking_parameters(object):
|
|
||||||
def setupUi(self, Picking_parameters):
|
|
||||||
Picking_parameters.setObjectName("Picking_parameters")
|
|
||||||
Picking_parameters.resize(300, 300)
|
|
||||||
self.gridLayoutWidget = QtGui.QWidget(Picking_parameters)
|
|
||||||
self.gridLayoutWidget.setGeometry(QtCore.QRect(20, 20, 250, 211))
|
|
||||||
self.gridLayoutWidget.setObjectName("gridLayoutWidget")
|
|
||||||
self.gridLayout = QtGui.QGridLayout(self.gridLayoutWidget)
|
|
||||||
self.gridLayout.setContentsMargins(0, 0, 0, 0)
|
|
||||||
self.gridLayout.setObjectName("gridLayout")
|
|
||||||
self.label_cores = QtGui.QLabel(self.gridLayoutWidget)
|
|
||||||
self.label_cores.setObjectName("label_cores")
|
|
||||||
self.gridLayout.addWidget(self.label_cores, 0, 0, 1, 1)
|
|
||||||
self.label_vmax = QtGui.QLabel(self.gridLayoutWidget)
|
|
||||||
self.label_vmax.setObjectName("label_vmax")
|
|
||||||
self.gridLayout.addWidget(self.label_vmax, 2, 0, 1, 1)
|
|
||||||
self.label_vmin = QtGui.QLabel(self.gridLayoutWidget)
|
|
||||||
self.label_vmin.setObjectName("label_vmin")
|
|
||||||
self.gridLayout.addWidget(self.label_vmin, 1, 0, 1, 1)
|
|
||||||
self.lineEdit_ncores = QtGui.QLineEdit(self.gridLayoutWidget)
|
|
||||||
self.lineEdit_ncores.setObjectName("lineEdit_ncores")
|
|
||||||
self.gridLayout.addWidget(self.lineEdit_ncores, 0, 1, 1, 1)
|
|
||||||
self.lineEdit_vmin = QtGui.QLineEdit(self.gridLayoutWidget)
|
|
||||||
self.lineEdit_vmin.setObjectName("lineEdit_vmin")
|
|
||||||
self.gridLayout.addWidget(self.lineEdit_vmin, 1, 1, 1, 1)
|
|
||||||
self.lineEdit_vmax = QtGui.QLineEdit(self.gridLayoutWidget)
|
|
||||||
self.lineEdit_vmax.setObjectName("lineEdit_vmax")
|
|
||||||
self.gridLayout.addWidget(self.lineEdit_vmax, 2, 1, 1, 1)
|
|
||||||
self.checkBox = QtGui.QCheckBox(self.gridLayoutWidget)
|
|
||||||
self.checkBox.setObjectName("checkBox")
|
|
||||||
self.gridLayout.addWidget(self.checkBox, 4, 1, 1, 1)
|
|
||||||
self.label_folm = QtGui.QLabel(self.gridLayoutWidget)
|
|
||||||
self.label_folm.setObjectName("label_folm")
|
|
||||||
self.gridLayout.addWidget(self.label_folm, 3, 0, 1, 1)
|
|
||||||
self.label_aic = QtGui.QLabel(self.gridLayoutWidget)
|
|
||||||
self.label_aic.setObjectName("label_aic")
|
|
||||||
self.gridLayout.addWidget(self.label_aic, 4, 0, 1, 1)
|
|
||||||
self.lineEdit_folm = QtGui.QLineEdit(self.gridLayoutWidget)
|
|
||||||
self.lineEdit_folm.setObjectName("lineEdit_folm")
|
|
||||||
self.gridLayout.addWidget(self.lineEdit_folm, 3, 1, 1, 1)
|
|
||||||
self.label_aicwindow = QtGui.QLabel(self.gridLayoutWidget)
|
|
||||||
self.label_aicwindow.setObjectName("label_aicwindow")
|
|
||||||
self.gridLayout.addWidget(self.label_aicwindow, 5, 0, 1, 1)
|
|
||||||
self.lineEdit_aicwindow = QtGui.QLineEdit(self.gridLayoutWidget)
|
|
||||||
self.lineEdit_aicwindow.setObjectName("lineEdit_aicwindow")
|
|
||||||
self.gridLayout.addWidget(self.lineEdit_aicwindow, 5, 1, 1, 1)
|
|
||||||
self.buttonBox = QtGui.QDialogButtonBox(Picking_parameters)
|
|
||||||
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
|
|
||||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
|
|
||||||
self.buttonBox.setObjectName("buttonBox")
|
|
||||||
self.buttonBox.setGeometry(QtCore.QRect(10, 240, 250, 32))
|
|
||||||
|
|
||||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), Picking_parameters.accept)
|
|
||||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), Picking_parameters.reject)
|
|
||||||
self.retranslateUi(Picking_parameters)
|
|
||||||
QtCore.QMetaObject.connectSlotsByName(Picking_parameters)
|
|
||||||
|
|
||||||
def getParameters(self, Picking_parameters):
|
|
||||||
if Picking_parameters.exec_():
|
|
||||||
ncores = int(self.lineEdit_ncores.text())
|
|
||||||
vmin = float(self.lineEdit_vmin.text())
|
|
||||||
vmax = float(self.lineEdit_vmax.text())
|
|
||||||
folm = float(self.lineEdit_folm.text())
|
|
||||||
AIC = self.checkBox.isChecked()
|
|
||||||
aicwindow = [float(val) for val in self.lineEdit_aicwindow.text().split(',')]
|
|
||||||
|
|
||||||
return ncores, vmin, vmax, folm, AIC, tuple(aicwindow)
|
|
||||||
|
|
||||||
def retranslateUi(self, Picking_parameters):
|
|
||||||
Picking_parameters.setWindowTitle(QtGui.QApplication.translate("Picking_parameters", "Picking_parameters", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_cores.setText(QtGui.QApplication.translate("Picking_parameters", "Number of cores", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_vmax.setText(QtGui.QApplication.translate("Picking_parameters", "Vmax (default = 5000m/s)", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_vmin.setText(QtGui.QApplication.translate("Picking_parameters", "Vmin (default = 333 m/s)", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.lineEdit_ncores.setText(QtGui.QApplication.translate("Picking_parameters", "1", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.lineEdit_vmin.setText(QtGui.QApplication.translate("Picking_parameters", "333", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.lineEdit_vmax.setText(QtGui.QApplication.translate("Picking_parameters", "5000", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_folm.setText(QtGui.QApplication.translate("Picking_parameters", "Fraction of local maximum\n"
|
|
||||||
"(default = 0.6)", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_aic.setText(QtGui.QApplication.translate("Picking_parameters", "AIC", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.lineEdit_folm.setText(QtGui.QApplication.translate("Picking_parameters", "0.6", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_aicwindow.setText(QtGui.QApplication.translate("Picking_parameters", "AIC window (only if AIC\n"
|
|
||||||
" is checked)", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.lineEdit_aicwindow.setText(QtGui.QApplication.translate("Picking_parameters", "15, 0", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
app = QtGui.QApplication(sys.argv)
|
|
||||||
MainWindow = QtGui.QMainWindow()
|
|
||||||
ui = Ui_ActiveSeismoPick3D()
|
|
||||||
ui.setupUi(MainWindow)
|
|
||||||
MainWindow.show()
|
|
||||||
sys.exit(app.exec_())
|
|
||||||
|
|
2
pylot/core/active/gui/__init__.py
Normal file
2
pylot/core/active/gui/__init__.py
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
__author__ = 'marcel'
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'asp3d_layout.ui'
|
# Form implementation generated from reading ui file 'asp3d_layout.ui'
|
||||||
#
|
#
|
||||||
# Created: Tue Jul 12 21:41:12 2016
|
# Created: Wed Jul 27 11:15:05 2016
|
||||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
@ -53,22 +53,6 @@ class Ui_MainWindow(object):
|
|||||||
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
|
self.label_2.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
self.label_2.setObjectName("label_2")
|
self.label_2.setObjectName("label_2")
|
||||||
self.verticalLayout.addWidget(self.label_2)
|
self.verticalLayout.addWidget(self.label_2)
|
||||||
self.gen_new_seisarray = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.gen_new_seisarray.setEnabled(True)
|
|
||||||
self.gen_new_seisarray.setObjectName("gen_new_seisarray")
|
|
||||||
self.verticalLayout.addWidget(self.gen_new_seisarray)
|
|
||||||
self.load_seisarray = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.load_seisarray.setObjectName("load_seisarray")
|
|
||||||
self.verticalLayout.addWidget(self.load_seisarray)
|
|
||||||
self.save_seisarray = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.save_seisarray.setObjectName("save_seisarray")
|
|
||||||
self.verticalLayout.addWidget(self.save_seisarray)
|
|
||||||
self.interpolate_receivers = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.interpolate_receivers.setObjectName("interpolate_receivers")
|
|
||||||
self.verticalLayout.addWidget(self.interpolate_receivers)
|
|
||||||
self.connect_to_survey = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.connect_to_survey.setObjectName("connect_to_survey")
|
|
||||||
self.verticalLayout.addWidget(self.connect_to_survey)
|
|
||||||
self.horizontalLayout_2 = QtGui.QHBoxLayout()
|
self.horizontalLayout_2 = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
|
||||||
self.seisarray_active = QtGui.QLabel(self.centralwidget)
|
self.seisarray_active = QtGui.QLabel(self.centralwidget)
|
||||||
@ -142,15 +126,6 @@ class Ui_MainWindow(object):
|
|||||||
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
|
self.label_3.setAlignment(QtCore.Qt.AlignCenter)
|
||||||
self.label_3.setObjectName("label_3")
|
self.label_3.setObjectName("label_3")
|
||||||
self.verticalLayout_2.addWidget(self.label_3)
|
self.verticalLayout_2.addWidget(self.label_3)
|
||||||
self.gen_new_survey = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.gen_new_survey.setObjectName("gen_new_survey")
|
|
||||||
self.verticalLayout_2.addWidget(self.gen_new_survey)
|
|
||||||
self.load_survey = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.load_survey.setObjectName("load_survey")
|
|
||||||
self.verticalLayout_2.addWidget(self.load_survey)
|
|
||||||
self.save_survey = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.save_survey.setObjectName("save_survey")
|
|
||||||
self.verticalLayout_2.addWidget(self.save_survey)
|
|
||||||
self.horizontalLayout = QtGui.QHBoxLayout()
|
self.horizontalLayout = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||||
self.survey_active = QtGui.QLabel(self.centralwidget)
|
self.survey_active = QtGui.QLabel(self.centralwidget)
|
||||||
@ -202,79 +177,10 @@ class Ui_MainWindow(object):
|
|||||||
self.textBox_survey.setObjectName("textBox_survey")
|
self.textBox_survey.setObjectName("textBox_survey")
|
||||||
self.verticalLayout_2.addWidget(self.textBox_survey)
|
self.verticalLayout_2.addWidget(self.textBox_survey)
|
||||||
self.verticalLayout_5.addLayout(self.verticalLayout_2)
|
self.verticalLayout_5.addLayout(self.verticalLayout_2)
|
||||||
self.line_3 = QtGui.QFrame(self.centralwidget)
|
|
||||||
self.line_3.setMinimumSize(QtCore.QSize(0, 5))
|
|
||||||
self.line_3.setFrameShape(QtGui.QFrame.HLine)
|
|
||||||
self.line_3.setFrameShadow(QtGui.QFrame.Sunken)
|
|
||||||
self.line_3.setObjectName("line_3")
|
|
||||||
self.verticalLayout_5.addWidget(self.line_3)
|
|
||||||
self.verticalLayout_3 = QtGui.QVBoxLayout()
|
self.verticalLayout_3 = QtGui.QVBoxLayout()
|
||||||
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
||||||
self.label_7 = QtGui.QLabel(self.centralwidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.label_7.sizePolicy().hasHeightForWidth())
|
|
||||||
self.label_7.setSizePolicy(sizePolicy)
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily("Sans Serif")
|
|
||||||
font.setPointSize(10)
|
|
||||||
font.setWeight(75)
|
|
||||||
font.setBold(True)
|
|
||||||
self.label_7.setFont(font)
|
|
||||||
self.label_7.setAlignment(QtCore.Qt.AlignCenter)
|
|
||||||
self.label_7.setObjectName("label_7")
|
|
||||||
self.verticalLayout_3.addWidget(self.label_7)
|
|
||||||
self.picker = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.picker.setObjectName("picker")
|
|
||||||
self.verticalLayout_3.addWidget(self.picker)
|
|
||||||
self.postprocessing = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.postprocessing.setObjectName("postprocessing")
|
|
||||||
self.verticalLayout_3.addWidget(self.postprocessing)
|
|
||||||
self.line_2 = QtGui.QFrame(self.centralwidget)
|
|
||||||
self.line_2.setMinimumSize(QtCore.QSize(0, 5))
|
|
||||||
self.line_2.setFrameShape(QtGui.QFrame.HLine)
|
|
||||||
self.line_2.setFrameShadow(QtGui.QFrame.Sunken)
|
|
||||||
self.line_2.setObjectName("line_2")
|
|
||||||
self.verticalLayout_3.addWidget(self.line_2)
|
|
||||||
self.verticalLayout_4 = QtGui.QVBoxLayout()
|
self.verticalLayout_4 = QtGui.QVBoxLayout()
|
||||||
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
||||||
self.label_8 = QtGui.QLabel(self.centralwidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.label_8.sizePolicy().hasHeightForWidth())
|
|
||||||
self.label_8.setSizePolicy(sizePolicy)
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily("Sans Serif")
|
|
||||||
font.setPointSize(10)
|
|
||||||
font.setWeight(75)
|
|
||||||
font.setBold(True)
|
|
||||||
self.label_8.setFont(font)
|
|
||||||
self.label_8.setAlignment(QtCore.Qt.AlignCenter)
|
|
||||||
self.label_8.setObjectName("label_8")
|
|
||||||
self.verticalLayout_4.addWidget(self.label_8)
|
|
||||||
self.fmtomo = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.fmtomo.setObjectName("fmtomo")
|
|
||||||
self.verticalLayout_4.addWidget(self.fmtomo)
|
|
||||||
self.label_9 = QtGui.QLabel(self.centralwidget)
|
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
|
|
||||||
sizePolicy.setHorizontalStretch(0)
|
|
||||||
sizePolicy.setVerticalStretch(0)
|
|
||||||
sizePolicy.setHeightForWidth(self.label_9.sizePolicy().hasHeightForWidth())
|
|
||||||
self.label_9.setSizePolicy(sizePolicy)
|
|
||||||
font = QtGui.QFont()
|
|
||||||
font.setFamily("Sans Serif")
|
|
||||||
font.setPointSize(10)
|
|
||||||
font.setWeight(75)
|
|
||||||
font.setBold(True)
|
|
||||||
self.label_9.setFont(font)
|
|
||||||
self.label_9.setAlignment(QtCore.Qt.AlignCenter)
|
|
||||||
self.label_9.setObjectName("label_9")
|
|
||||||
self.verticalLayout_4.addWidget(self.label_9)
|
|
||||||
self.vtk_tools = QtGui.QPushButton(self.centralwidget)
|
|
||||||
self.vtk_tools.setObjectName("vtk_tools")
|
|
||||||
self.verticalLayout_4.addWidget(self.vtk_tools)
|
|
||||||
self.progressBar = QtGui.QProgressBar(self.centralwidget)
|
self.progressBar = QtGui.QProgressBar(self.centralwidget)
|
||||||
self.progressBar.setEnabled(True)
|
self.progressBar.setEnabled(True)
|
||||||
self.progressBar.setProperty("value", 0)
|
self.progressBar.setProperty("value", 0)
|
||||||
@ -369,10 +275,73 @@ class Ui_MainWindow(object):
|
|||||||
self.menubar = QtGui.QMenuBar(MainWindow)
|
self.menubar = QtGui.QMenuBar(MainWindow)
|
||||||
self.menubar.setGeometry(QtCore.QRect(0, 0, 1029, 23))
|
self.menubar.setGeometry(QtCore.QRect(0, 0, 1029, 23))
|
||||||
self.menubar.setObjectName("menubar")
|
self.menubar.setObjectName("menubar")
|
||||||
|
self.menuFile = QtGui.QMenu(self.menubar)
|
||||||
|
self.menuFile.setObjectName("menuFile")
|
||||||
|
self.menuSeismic_Array = QtGui.QMenu(self.menubar)
|
||||||
|
self.menuSeismic_Array.setObjectName("menuSeismic_Array")
|
||||||
|
self.menuSurvey = QtGui.QMenu(self.menubar)
|
||||||
|
self.menuSurvey.setObjectName("menuSurvey")
|
||||||
|
self.menuPicking = QtGui.QMenu(self.menubar)
|
||||||
|
self.menuPicking.setObjectName("menuPicking")
|
||||||
|
self.menuSimulation = QtGui.QMenu(self.menubar)
|
||||||
|
self.menuSimulation.setObjectName("menuSimulation")
|
||||||
|
self.menuTools = QtGui.QMenu(self.menubar)
|
||||||
|
self.menuTools.setObjectName("menuTools")
|
||||||
MainWindow.setMenuBar(self.menubar)
|
MainWindow.setMenuBar(self.menubar)
|
||||||
self.statusbar = QtGui.QStatusBar(MainWindow)
|
self.statusbar = QtGui.QStatusBar(MainWindow)
|
||||||
self.statusbar.setObjectName("statusbar")
|
self.statusbar.setObjectName("statusbar")
|
||||||
MainWindow.setStatusBar(self.statusbar)
|
MainWindow.setStatusBar(self.statusbar)
|
||||||
|
self.actionLoad_Seismic_Array = QtGui.QAction(MainWindow)
|
||||||
|
self.actionLoad_Seismic_Array.setCheckable(False)
|
||||||
|
self.actionLoad_Seismic_Array.setObjectName("actionLoad_Seismic_Array")
|
||||||
|
self.actionSave_Seismic_Array = QtGui.QAction(MainWindow)
|
||||||
|
self.actionSave_Seismic_Array.setObjectName("actionSave_Seismic_Array")
|
||||||
|
self.actionLoad_Survey = QtGui.QAction(MainWindow)
|
||||||
|
self.actionLoad_Survey.setObjectName("actionLoad_Survey")
|
||||||
|
self.actionSave_Survey = QtGui.QAction(MainWindow)
|
||||||
|
self.actionSave_Survey.setObjectName("actionSave_Survey")
|
||||||
|
self.actionExit = QtGui.QAction(MainWindow)
|
||||||
|
self.actionExit.setObjectName("actionExit")
|
||||||
|
self.actionGenerate_new_Seismic_Array = QtGui.QAction(MainWindow)
|
||||||
|
self.actionGenerate_new_Seismic_Array.setObjectName("actionGenerate_new_Seismic_Array")
|
||||||
|
self.actionInterpolate_Receivers = QtGui.QAction(MainWindow)
|
||||||
|
self.actionInterpolate_Receivers.setObjectName("actionInterpolate_Receivers")
|
||||||
|
self.actionConnect_to_Survey = QtGui.QAction(MainWindow)
|
||||||
|
self.actionConnect_to_Survey.setObjectName("actionConnect_to_Survey")
|
||||||
|
self.actionGenerate_new_Survey = QtGui.QAction(MainWindow)
|
||||||
|
self.actionGenerate_new_Survey.setObjectName("actionGenerate_new_Survey")
|
||||||
|
self.actionAutomatic_Picking = QtGui.QAction(MainWindow)
|
||||||
|
self.actionAutomatic_Picking.setObjectName("actionAutomatic_Picking")
|
||||||
|
self.actionPostprocessing = QtGui.QAction(MainWindow)
|
||||||
|
self.actionPostprocessing.setObjectName("actionPostprocessing")
|
||||||
|
self.actionStart_FMTOMO_Simulation = QtGui.QAction(MainWindow)
|
||||||
|
self.actionStart_FMTOMO_Simulation.setObjectName("actionStart_FMTOMO_Simulation")
|
||||||
|
self.actionVTK_Visualization = QtGui.QAction(MainWindow)
|
||||||
|
self.actionVTK_Visualization.setObjectName("actionVTK_Visualization")
|
||||||
|
self.actionSeismic_Array = QtGui.QAction(MainWindow)
|
||||||
|
self.actionSeismic_Array.setEnabled(False)
|
||||||
|
self.actionSeismic_Array.setObjectName("actionSeismic_Array")
|
||||||
|
self.menuFile.addSeparator()
|
||||||
|
self.menuFile.addAction(self.actionExit)
|
||||||
|
self.menuSeismic_Array.addAction(self.actionGenerate_new_Seismic_Array)
|
||||||
|
self.menuSeismic_Array.addAction(self.actionLoad_Seismic_Array)
|
||||||
|
self.menuSeismic_Array.addAction(self.actionSave_Seismic_Array)
|
||||||
|
self.menuSeismic_Array.addSeparator()
|
||||||
|
self.menuSeismic_Array.addAction(self.actionInterpolate_Receivers)
|
||||||
|
self.menuSeismic_Array.addAction(self.actionConnect_to_Survey)
|
||||||
|
self.menuSurvey.addAction(self.actionGenerate_new_Survey)
|
||||||
|
self.menuSurvey.addAction(self.actionLoad_Survey)
|
||||||
|
self.menuSurvey.addAction(self.actionSave_Survey)
|
||||||
|
self.menuPicking.addAction(self.actionAutomatic_Picking)
|
||||||
|
self.menuPicking.addAction(self.actionPostprocessing)
|
||||||
|
self.menuSimulation.addAction(self.actionStart_FMTOMO_Simulation)
|
||||||
|
self.menuTools.addAction(self.actionVTK_Visualization)
|
||||||
|
self.menubar.addAction(self.menuFile.menuAction())
|
||||||
|
self.menubar.addAction(self.menuSurvey.menuAction())
|
||||||
|
self.menubar.addAction(self.menuSeismic_Array.menuAction())
|
||||||
|
self.menubar.addAction(self.menuPicking.menuAction())
|
||||||
|
self.menubar.addAction(self.menuSimulation.menuAction())
|
||||||
|
self.menubar.addAction(self.menuTools.menuAction())
|
||||||
|
|
||||||
self.retranslateUi(MainWindow)
|
self.retranslateUi(MainWindow)
|
||||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||||
@ -380,41 +349,34 @@ class Ui_MainWindow(object):
|
|||||||
def retranslateUi(self, MainWindow):
|
def retranslateUi(self, MainWindow):
|
||||||
MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "ActiveSeismoPick 3D", None, QtGui.QApplication.UnicodeUTF8))
|
MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "ActiveSeismoPick 3D", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_2.setText(QtGui.QApplication.translate("MainWindow", "Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_2.setText(QtGui.QApplication.translate("MainWindow", "Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.gen_new_seisarray.setToolTip(QtGui.QApplication.translate("MainWindow", "Generate a new Seismic Array object.", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.gen_new_seisarray.setText(QtGui.QApplication.translate("MainWindow", "Create new Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.load_seisarray.setToolTip(QtGui.QApplication.translate("MainWindow", "Load an existing Seismic Array object saved as \'.pickle\' file.", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.load_seisarray.setText(QtGui.QApplication.translate("MainWindow", "Load Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.save_seisarray.setToolTip(QtGui.QApplication.translate("MainWindow", "Save current Seismic Array object to \'.pickle\' file.", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.save_seisarray.setText(QtGui.QApplication.translate("MainWindow", "Save Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.interpolate_receivers.setToolTip(QtGui.QApplication.translate("MainWindow", "Interpolate positions of receivers in between that were not manually measured.", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.interpolate_receivers.setText(QtGui.QApplication.translate("MainWindow", "Interpolate Receivers", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.connect_to_survey.setToolTip(QtGui.QApplication.translate("MainWindow", "Save the current Seismic Array to the current Survey object.", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.connect_to_survey.setText(QtGui.QApplication.translate("MainWindow", "Connect to Survey", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_5.setText(QtGui.QApplication.translate("MainWindow", "active", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_5.setText(QtGui.QApplication.translate("MainWindow", "active", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_6.setText(QtGui.QApplication.translate("MainWindow", "connected to Survey", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_6.setText(QtGui.QApplication.translate("MainWindow", "connected to Survey", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_3.setText(QtGui.QApplication.translate("MainWindow", "Survey", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_3.setText(QtGui.QApplication.translate("MainWindow", "Survey", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.gen_new_survey.setToolTip(QtGui.QApplication.translate("MainWindow", "Generate a new Survey object.", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.gen_new_survey.setText(QtGui.QApplication.translate("MainWindow", "Generate new Survey", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.load_survey.setToolTip(QtGui.QApplication.translate("MainWindow", "Load an existing Survey object from a \'.pickle\' file.", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.load_survey.setText(QtGui.QApplication.translate("MainWindow", "Load Survey", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.save_survey.setToolTip(QtGui.QApplication.translate("MainWindow", "Save current Survey object to \'.pickle\' file.", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.save_survey.setText(QtGui.QApplication.translate("MainWindow", "Save Survey", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_4.setText(QtGui.QApplication.translate("MainWindow", "active", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_4.setText(QtGui.QApplication.translate("MainWindow", "active", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label.setText(QtGui.QApplication.translate("MainWindow", "picked", None, QtGui.QApplication.UnicodeUTF8))
|
self.label.setText(QtGui.QApplication.translate("MainWindow", "picked", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_7.setText(QtGui.QApplication.translate("MainWindow", "Picking", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_11.setText(QtGui.QApplication.translate("MainWindow", "Plot Receiver and Shots of the Array colored by:", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.picker.setToolTip(QtGui.QApplication.translate("MainWindow", "Choose parameters and call automatic picking routines.", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.picker.setText(QtGui.QApplication.translate("MainWindow", "Automatic Picking", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.postprocessing.setToolTip(QtGui.QApplication.translate("MainWindow", "Manual control and postprocessing of a picked Survey.", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.postprocessing.setText(QtGui.QApplication.translate("MainWindow", "Postprocessing", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_8.setText(QtGui.QApplication.translate("MainWindow", "Simulation", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.fmtomo.setToolTip(QtGui.QApplication.translate("MainWindow", "Set parameters and call Fast Marching Tomography algorithm.", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.fmtomo.setText(QtGui.QApplication.translate("MainWindow", "FMTOMO Simulation", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_9.setText(QtGui.QApplication.translate("MainWindow", "Visualization", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.vtk_tools.setToolTip(QtGui.QApplication.translate("MainWindow", "Set parameters and call Fast Marching Tomography algorithm.", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.vtk_tools.setText(QtGui.QApplication.translate("MainWindow", "VTK tools", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_11.setText(QtGui.QApplication.translate("MainWindow", "Plot Receiver and Shots of the Array colord by:", None, QtGui.QApplication.UnicodeUTF8))
|
|
||||||
self.label_10.setText(QtGui.QApplication.translate("MainWindow", "Plot a single Shot:", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_10.setText(QtGui.QApplication.translate("MainWindow", "Plot a single Shot:", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.shot_left.setText(QtGui.QApplication.translate("MainWindow", "<", None, QtGui.QApplication.UnicodeUTF8))
|
self.shot_left.setText(QtGui.QApplication.translate("MainWindow", "<", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.shot_right.setText(QtGui.QApplication.translate("MainWindow", ">", None, QtGui.QApplication.UnicodeUTF8))
|
self.shot_right.setText(QtGui.QApplication.translate("MainWindow", ">", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.plot_shot.setText(QtGui.QApplication.translate("MainWindow", "Plot", None, QtGui.QApplication.UnicodeUTF8))
|
self.plot_shot.setText(QtGui.QApplication.translate("MainWindow", "Plot", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.menuSeismic_Array.setTitle(QtGui.QApplication.translate("MainWindow", "Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.menuSurvey.setTitle(QtGui.QApplication.translate("MainWindow", "Survey", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.menuPicking.setTitle(QtGui.QApplication.translate("MainWindow", "Picking", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.menuSimulation.setTitle(QtGui.QApplication.translate("MainWindow", "Inversion", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.menuTools.setTitle(QtGui.QApplication.translate("MainWindow", "Tools", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionLoad_Seismic_Array.setText(QtGui.QApplication.translate("MainWindow", "Load Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionSave_Seismic_Array.setText(QtGui.QApplication.translate("MainWindow", "Save Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionLoad_Survey.setText(QtGui.QApplication.translate("MainWindow", "Load Survey", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionSave_Survey.setText(QtGui.QApplication.translate("MainWindow", "Save Survey", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionExit.setText(QtGui.QApplication.translate("MainWindow", "Exit", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionGenerate_new_Seismic_Array.setText(QtGui.QApplication.translate("MainWindow", "Generate new Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionInterpolate_Receivers.setText(QtGui.QApplication.translate("MainWindow", "Interpolate Receivers", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionConnect_to_Survey.setText(QtGui.QApplication.translate("MainWindow", "Connect to Survey", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionGenerate_new_Survey.setText(QtGui.QApplication.translate("MainWindow", "Generate new Survey", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionAutomatic_Picking.setText(QtGui.QApplication.translate("MainWindow", "Automatic Picking", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionPostprocessing.setText(QtGui.QApplication.translate("MainWindow", "Postprocessing", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionStart_FMTOMO_Simulation.setText(QtGui.QApplication.translate("MainWindow", "Start FMTOMO Simulation", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionVTK_Visualization.setText(QtGui.QApplication.translate("MainWindow", "VTK Visualization", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.actionSeismic_Array.setText(QtGui.QApplication.translate("MainWindow", "Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'fmtomo_parameters_layout.ui'
|
# Form implementation generated from reading ui file 'fmtomo_parameters_layout.ui'
|
||||||
#
|
#
|
||||||
# Created: Tue Jul 12 21:41:12 2016
|
# Created: Wed Jul 27 11:15:05 2016
|
||||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
@ -270,7 +270,7 @@ class Ui_fmtomo_parameters(object):
|
|||||||
"Too low values will cause error.", None, QtGui.QApplication.UnicodeUTF8))
|
"Too low values will cause error.", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_13.setText(QtGui.QApplication.translate("fmtomo_parameters", "Cushion factor [?]", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_13.setText(QtGui.QApplication.translate("fmtomo_parameters", "Cushion factor [?]", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_12.setText(QtGui.QApplication.translate("fmtomo_parameters", "%", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_12.setText(QtGui.QApplication.translate("fmtomo_parameters", "%", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_4.setText(QtGui.QApplication.translate("fmtomo_parameters", "Number of Ponts", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_4.setText(QtGui.QApplication.translate("fmtomo_parameters", "Number of Points", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_5.setText(QtGui.QApplication.translate("fmtomo_parameters", "X", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_5.setText(QtGui.QApplication.translate("fmtomo_parameters", "X", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_6.setText(QtGui.QApplication.translate("fmtomo_parameters", "Y", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_6.setText(QtGui.QApplication.translate("fmtomo_parameters", "Y", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_7.setText(QtGui.QApplication.translate("fmtomo_parameters", "Z", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_7.setText(QtGui.QApplication.translate("fmtomo_parameters", "Z", None, QtGui.QApplication.UnicodeUTF8))
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'generate_seisarray_layout.ui'
|
# Form implementation generated from reading ui file 'generate_seisarray_layout.ui'
|
||||||
#
|
#
|
||||||
# Created: Tue Jul 12 21:41:13 2016
|
# Created: Wed Jul 27 11:15:06 2016
|
||||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
@ -138,7 +138,7 @@ class Ui_generate_seisarray(object):
|
|||||||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Third geophone on the second receiver line with the trace ID 50 and the coordinates (10.5 [m], 20.4 [m], 30.3 [m]).</p>\n"
|
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Third geophone on the second receiver line with the trace ID 50 and the coordinates (10.5 [m], 20.4 [m], 30.3 [m]).</p>\n"
|
||||||
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p>\n"
|
"<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p>\n"
|
||||||
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">50 2 3 10.5 20.4 30.3</p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
|
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">50 2 3 10.5 20.4 30.3</p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.radioButton_interpolatable.setText(QtGui.QApplication.translate("generate_seisarray", "interpolatable [?]", None, QtGui.QApplication.UnicodeUTF8))
|
self.radioButton_interpolatable.setText(QtGui.QApplication.translate("generate_seisarray", "interpolation [?]", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.pushButton_rec.setText(QtGui.QApplication.translate("generate_seisarray", "Browse", None, QtGui.QApplication.UnicodeUTF8))
|
self.pushButton_rec.setText(QtGui.QApplication.translate("generate_seisarray", "Browse", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_src.setToolTip(QtGui.QApplication.translate("generate_seisarray", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
self.label_src.setToolTip(QtGui.QApplication.translate("generate_seisarray", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
|
||||||
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'generate_survey_layout.ui'
|
# Form implementation generated from reading ui file 'generate_survey_layout.ui'
|
||||||
#
|
#
|
||||||
# Created: Tue Jul 12 21:41:13 2016
|
# Created: Wed Jul 27 11:15:06 2016
|
||||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
@ -12,7 +12,7 @@ from PySide import QtCore, QtGui
|
|||||||
class Ui_generate_survey(object):
|
class Ui_generate_survey(object):
|
||||||
def setupUi(self, generate_survey):
|
def setupUi(self, generate_survey):
|
||||||
generate_survey.setObjectName("generate_survey")
|
generate_survey.setObjectName("generate_survey")
|
||||||
generate_survey.resize(382, 211)
|
generate_survey.resize(382, 220)
|
||||||
icon = QtGui.QIcon()
|
icon = QtGui.QIcon()
|
||||||
icon.addPixmap(QtGui.QPixmap("../asp3d_icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
icon.addPixmap(QtGui.QPixmap("../asp3d_icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
||||||
generate_survey.setWindowIcon(icon)
|
generate_survey.setWindowIcon(icon)
|
||||||
@ -50,6 +50,11 @@ class Ui_generate_survey(object):
|
|||||||
self.verticalLayout_2.addLayout(self.gridLayout)
|
self.verticalLayout_2.addLayout(self.gridLayout)
|
||||||
self.verticalLayout = QtGui.QVBoxLayout()
|
self.verticalLayout = QtGui.QVBoxLayout()
|
||||||
self.verticalLayout.setObjectName("verticalLayout")
|
self.verticalLayout.setObjectName("verticalLayout")
|
||||||
|
self.line_2 = QtGui.QFrame(generate_survey)
|
||||||
|
self.line_2.setFrameShape(QtGui.QFrame.HLine)
|
||||||
|
self.line_2.setFrameShadow(QtGui.QFrame.Sunken)
|
||||||
|
self.line_2.setObjectName("line_2")
|
||||||
|
self.verticalLayout.addWidget(self.line_2)
|
||||||
self.label = QtGui.QLabel(generate_survey)
|
self.label = QtGui.QLabel(generate_survey)
|
||||||
self.label.setObjectName("label")
|
self.label.setObjectName("label")
|
||||||
self.verticalLayout.addWidget(self.label)
|
self.verticalLayout.addWidget(self.label)
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'generate_survey_layout_minimal.ui'
|
# Form implementation generated from reading ui file 'generate_survey_layout_minimal.ui'
|
||||||
#
|
#
|
||||||
# Created: Tue Jul 12 21:41:13 2016
|
# Created: Wed Jul 27 11:15:06 2016
|
||||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'picking_parameters_layout.ui'
|
# Form implementation generated from reading ui file 'picking_parameters_layout.ui'
|
||||||
#
|
#
|
||||||
# Created: Tue Jul 12 21:41:13 2016
|
# Created: Wed Jul 27 11:15:06 2016
|
||||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
@ -12,10 +12,10 @@ from PySide import QtCore, QtGui
|
|||||||
class Ui_picking_parameters(object):
|
class Ui_picking_parameters(object):
|
||||||
def setupUi(self, picking_parameters):
|
def setupUi(self, picking_parameters):
|
||||||
picking_parameters.setObjectName("picking_parameters")
|
picking_parameters.setObjectName("picking_parameters")
|
||||||
picking_parameters.resize(321, 254)
|
picking_parameters.resize(400, 700)
|
||||||
picking_parameters.setMinimumSize(QtCore.QSize(0, 0))
|
picking_parameters.setMinimumSize(QtCore.QSize(0, 700))
|
||||||
self.verticalLayout_3 = QtGui.QVBoxLayout(picking_parameters)
|
self.verticalLayout_4 = QtGui.QVBoxLayout(picking_parameters)
|
||||||
self.verticalLayout_3.setObjectName("verticalLayout_3")
|
self.verticalLayout_4.setObjectName("verticalLayout_4")
|
||||||
self.label_7 = QtGui.QLabel(picking_parameters)
|
self.label_7 = QtGui.QLabel(picking_parameters)
|
||||||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
|
||||||
sizePolicy.setHorizontalStretch(0)
|
sizePolicy.setHorizontalStretch(0)
|
||||||
@ -28,7 +28,7 @@ class Ui_picking_parameters(object):
|
|||||||
font.setBold(True)
|
font.setBold(True)
|
||||||
self.label_7.setFont(font)
|
self.label_7.setFont(font)
|
||||||
self.label_7.setObjectName("label_7")
|
self.label_7.setObjectName("label_7")
|
||||||
self.verticalLayout_3.addWidget(self.label_7)
|
self.verticalLayout_4.addWidget(self.label_7)
|
||||||
self.horizontalLayout = QtGui.QHBoxLayout()
|
self.horizontalLayout = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout.setObjectName("horizontalLayout")
|
self.horizontalLayout.setObjectName("horizontalLayout")
|
||||||
self.label = QtGui.QLabel(picking_parameters)
|
self.label = QtGui.QLabel(picking_parameters)
|
||||||
@ -45,7 +45,7 @@ class Ui_picking_parameters(object):
|
|||||||
self.ncores.setMaximum(10000)
|
self.ncores.setMaximum(10000)
|
||||||
self.ncores.setObjectName("ncores")
|
self.ncores.setObjectName("ncores")
|
||||||
self.horizontalLayout.addWidget(self.ncores)
|
self.horizontalLayout.addWidget(self.ncores)
|
||||||
self.verticalLayout_3.addLayout(self.horizontalLayout)
|
self.verticalLayout_4.addLayout(self.horizontalLayout)
|
||||||
self.horizontalLayout_3 = QtGui.QHBoxLayout()
|
self.horizontalLayout_3 = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
||||||
self.verticalLayout_2 = QtGui.QVBoxLayout()
|
self.verticalLayout_2 = QtGui.QVBoxLayout()
|
||||||
@ -78,7 +78,7 @@ class Ui_picking_parameters(object):
|
|||||||
self.lineEdit_vmax.setObjectName("lineEdit_vmax")
|
self.lineEdit_vmax.setObjectName("lineEdit_vmax")
|
||||||
self.verticalLayout.addWidget(self.lineEdit_vmax)
|
self.verticalLayout.addWidget(self.lineEdit_vmax)
|
||||||
self.horizontalLayout_3.addLayout(self.verticalLayout)
|
self.horizontalLayout_3.addLayout(self.verticalLayout)
|
||||||
self.verticalLayout_3.addLayout(self.horizontalLayout_3)
|
self.verticalLayout_4.addLayout(self.horizontalLayout_3)
|
||||||
self.horizontalLayout_4 = QtGui.QHBoxLayout()
|
self.horizontalLayout_4 = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
|
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
|
||||||
self.label_4 = QtGui.QLabel(picking_parameters)
|
self.label_4 = QtGui.QLabel(picking_parameters)
|
||||||
@ -110,7 +110,7 @@ class Ui_picking_parameters(object):
|
|||||||
self.label_folm.setObjectName("label_folm")
|
self.label_folm.setObjectName("label_folm")
|
||||||
self.horizontalLayout_2.addWidget(self.label_folm)
|
self.horizontalLayout_2.addWidget(self.label_folm)
|
||||||
self.horizontalLayout_4.addLayout(self.horizontalLayout_2)
|
self.horizontalLayout_4.addLayout(self.horizontalLayout_2)
|
||||||
self.verticalLayout_3.addLayout(self.horizontalLayout_4)
|
self.verticalLayout_4.addLayout(self.horizontalLayout_4)
|
||||||
self.horizontalLayout_5 = QtGui.QHBoxLayout()
|
self.horizontalLayout_5 = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
self.horizontalLayout_5.setObjectName("horizontalLayout_5")
|
||||||
self.label_5 = QtGui.QLabel(picking_parameters)
|
self.label_5 = QtGui.QLabel(picking_parameters)
|
||||||
@ -126,7 +126,7 @@ class Ui_picking_parameters(object):
|
|||||||
self.checkBox_AIC.setChecked(True)
|
self.checkBox_AIC.setChecked(True)
|
||||||
self.checkBox_AIC.setObjectName("checkBox_AIC")
|
self.checkBox_AIC.setObjectName("checkBox_AIC")
|
||||||
self.horizontalLayout_5.addWidget(self.checkBox_AIC)
|
self.horizontalLayout_5.addWidget(self.checkBox_AIC)
|
||||||
self.verticalLayout_3.addLayout(self.horizontalLayout_5)
|
self.verticalLayout_4.addLayout(self.horizontalLayout_5)
|
||||||
self.horizontalLayout_6 = QtGui.QHBoxLayout()
|
self.horizontalLayout_6 = QtGui.QHBoxLayout()
|
||||||
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
|
self.horizontalLayout_6.setObjectName("horizontalLayout_6")
|
||||||
self.label_6 = QtGui.QLabel(picking_parameters)
|
self.label_6 = QtGui.QLabel(picking_parameters)
|
||||||
@ -148,12 +148,67 @@ class Ui_picking_parameters(object):
|
|||||||
self.lineEdit_aicright.setObjectName("lineEdit_aicright")
|
self.lineEdit_aicright.setObjectName("lineEdit_aicright")
|
||||||
self.horizontalLayout_7.addWidget(self.lineEdit_aicright)
|
self.horizontalLayout_7.addWidget(self.lineEdit_aicright)
|
||||||
self.horizontalLayout_6.addLayout(self.horizontalLayout_7)
|
self.horizontalLayout_6.addLayout(self.horizontalLayout_7)
|
||||||
self.verticalLayout_3.addLayout(self.horizontalLayout_6)
|
self.verticalLayout_4.addLayout(self.horizontalLayout_6)
|
||||||
|
self.verticalLayout_snr = QtGui.QVBoxLayout()
|
||||||
|
self.verticalLayout_snr.setObjectName("verticalLayout_snr")
|
||||||
|
self.line = QtGui.QFrame(picking_parameters)
|
||||||
|
self.line.setFrameShape(QtGui.QFrame.HLine)
|
||||||
|
self.line.setFrameShadow(QtGui.QFrame.Sunken)
|
||||||
|
self.line.setObjectName("line")
|
||||||
|
self.verticalLayout_snr.addWidget(self.line)
|
||||||
|
self.label_8 = QtGui.QLabel(picking_parameters)
|
||||||
|
self.label_8.setObjectName("label_8")
|
||||||
|
self.verticalLayout_snr.addWidget(self.label_8)
|
||||||
|
self.gridLayout_2 = QtGui.QGridLayout()
|
||||||
|
self.gridLayout_2.setObjectName("gridLayout_2")
|
||||||
|
self.label_9 = QtGui.QLabel(picking_parameters)
|
||||||
|
self.label_9.setObjectName("label_9")
|
||||||
|
self.gridLayout_2.addWidget(self.label_9, 1, 0, 1, 1)
|
||||||
|
self.label_10 = QtGui.QLabel(picking_parameters)
|
||||||
|
self.label_10.setObjectName("label_10")
|
||||||
|
self.gridLayout_2.addWidget(self.label_10, 2, 0, 1, 1)
|
||||||
|
self.p1 = QtGui.QDoubleSpinBox(picking_parameters)
|
||||||
|
self.p1.setDecimals(6)
|
||||||
|
self.p1.setMinimum(-100.0)
|
||||||
|
self.p1.setMaximum(100.0)
|
||||||
|
self.p1.setSingleStep(0.0001)
|
||||||
|
self.p1.setProperty("value", 0.004)
|
||||||
|
self.p1.setObjectName("p1")
|
||||||
|
self.gridLayout_2.addWidget(self.p1, 2, 1, 1, 1)
|
||||||
|
self.label_11 = QtGui.QLabel(picking_parameters)
|
||||||
|
self.label_11.setObjectName("label_11")
|
||||||
|
self.gridLayout_2.addWidget(self.label_11, 1, 2, 1, 1)
|
||||||
|
self.label_12 = QtGui.QLabel(picking_parameters)
|
||||||
|
self.label_12.setObjectName("label_12")
|
||||||
|
self.gridLayout_2.addWidget(self.label_12, 2, 2, 1, 1)
|
||||||
|
self.p2 = QtGui.QDoubleSpinBox(picking_parameters)
|
||||||
|
self.p2.setDecimals(6)
|
||||||
|
self.p2.setMinimum(-100.0)
|
||||||
|
self.p2.setMaximum(100.0)
|
||||||
|
self.p2.setSingleStep(0.0001)
|
||||||
|
self.p2.setProperty("value", -0.0007)
|
||||||
|
self.p2.setObjectName("p2")
|
||||||
|
self.gridLayout_2.addWidget(self.p2, 2, 3, 1, 1)
|
||||||
|
self.shift_dist = QtGui.QSpinBox(picking_parameters)
|
||||||
|
self.shift_dist.setMaximum(10000)
|
||||||
|
self.shift_dist.setProperty("value", 30)
|
||||||
|
self.shift_dist.setObjectName("shift_dist")
|
||||||
|
self.gridLayout_2.addWidget(self.shift_dist, 1, 1, 1, 1)
|
||||||
|
self.shift_snr = QtGui.QSpinBox(picking_parameters)
|
||||||
|
self.shift_snr.setMaximum(10000)
|
||||||
|
self.shift_snr.setProperty("value", 100)
|
||||||
|
self.shift_snr.setObjectName("shift_snr")
|
||||||
|
self.gridLayout_2.addWidget(self.shift_snr, 1, 3, 1, 1)
|
||||||
|
self.verticalLayout_snr.addLayout(self.gridLayout_2)
|
||||||
|
self.verticalLayout_4.addLayout(self.verticalLayout_snr)
|
||||||
|
self.vlayout_plot = QtGui.QVBoxLayout()
|
||||||
|
self.vlayout_plot.setObjectName("vlayout_plot")
|
||||||
|
self.verticalLayout_4.addLayout(self.vlayout_plot)
|
||||||
self.buttonBox = QtGui.QDialogButtonBox(picking_parameters)
|
self.buttonBox = QtGui.QDialogButtonBox(picking_parameters)
|
||||||
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
|
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
|
||||||
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
|
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
|
||||||
self.buttonBox.setObjectName("buttonBox")
|
self.buttonBox.setObjectName("buttonBox")
|
||||||
self.verticalLayout_3.addWidget(self.buttonBox)
|
self.verticalLayout_4.addWidget(self.buttonBox)
|
||||||
|
|
||||||
self.retranslateUi(picking_parameters)
|
self.retranslateUi(picking_parameters)
|
||||||
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), picking_parameters.accept)
|
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), picking_parameters.accept)
|
||||||
@ -167,7 +222,7 @@ class Ui_picking_parameters(object):
|
|||||||
self.label.setText(QtGui.QApplication.translate("picking_parameters", "nproc [?]", None, QtGui.QApplication.UnicodeUTF8))
|
self.label.setText(QtGui.QApplication.translate("picking_parameters", "nproc [?]", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_2.setToolTip(QtGui.QApplication.translate("picking_parameters", "Minimum permitted direct velocity (apparent velocity!).", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_2.setToolTip(QtGui.QApplication.translate("picking_parameters", "Minimum permitted direct velocity (apparent velocity!).", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_2.setText(QtGui.QApplication.translate("picking_parameters", "vmin [m/s] [?]", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_2.setText(QtGui.QApplication.translate("picking_parameters", "vmin [m/s] [?]", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.lineEdit_vmin.setText(QtGui.QApplication.translate("picking_parameters", "333", None, QtGui.QApplication.UnicodeUTF8))
|
self.lineEdit_vmin.setText(QtGui.QApplication.translate("picking_parameters", "100", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_3.setToolTip(QtGui.QApplication.translate("picking_parameters", "Maximum permitted direct velocity (apparent velocity!).", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_3.setToolTip(QtGui.QApplication.translate("picking_parameters", "Maximum permitted direct velocity (apparent velocity!).", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.label_3.setText(QtGui.QApplication.translate("picking_parameters", "vmax [m/s] [?]", None, QtGui.QApplication.UnicodeUTF8))
|
self.label_3.setText(QtGui.QApplication.translate("picking_parameters", "vmax [m/s] [?]", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.lineEdit_vmax.setText(QtGui.QApplication.translate("picking_parameters", "5000", None, QtGui.QApplication.UnicodeUTF8))
|
self.lineEdit_vmax.setText(QtGui.QApplication.translate("picking_parameters", "5000", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
@ -181,4 +236,9 @@ class Ui_picking_parameters(object):
|
|||||||
"(only if AIC checked)", None, QtGui.QApplication.UnicodeUTF8))
|
"(only if AIC checked)", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.lineEdit_aicleft.setText(QtGui.QApplication.translate("picking_parameters", "15", None, QtGui.QApplication.UnicodeUTF8))
|
self.lineEdit_aicleft.setText(QtGui.QApplication.translate("picking_parameters", "15", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
self.lineEdit_aicright.setText(QtGui.QApplication.translate("picking_parameters", "0", None, QtGui.QApplication.UnicodeUTF8))
|
self.lineEdit_aicright.setText(QtGui.QApplication.translate("picking_parameters", "0", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.label_8.setText(QtGui.QApplication.translate("picking_parameters", "SNR threshold (advanced)", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.label_9.setText(QtGui.QApplication.translate("picking_parameters", "Shift distance", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.label_10.setText(QtGui.QApplication.translate("picking_parameters", "p1", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.label_11.setText(QtGui.QApplication.translate("picking_parameters", "Shift SNR", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
self.label_12.setText(QtGui.QApplication.translate("picking_parameters", "p2", None, QtGui.QApplication.UnicodeUTF8))
|
||||||
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'vtk_tools_layout.ui'
|
# Form implementation generated from reading ui file 'vtk_tools_layout.ui'
|
||||||
#
|
#
|
||||||
# Created: Tue Jul 12 21:41:13 2016
|
# Created: Wed Jul 27 11:15:06 2016
|
||||||
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
# by: pyside-uic 0.2.15 running on PySide 1.2.2
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
460
pylot/core/active/gui/windows.py
Normal file
460
pylot/core/active/gui/windows.py
Normal file
@ -0,0 +1,460 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
import os
|
||||||
|
from PySide import QtCore, QtGui
|
||||||
|
from pylot.core.active import surveyUtils, activeSeismoPick, seismicArrayPreparation, fmtomoUtils
|
||||||
|
from generate_survey_layout import Ui_generate_survey
|
||||||
|
from generate_survey_layout_minimal import Ui_generate_survey_minimal
|
||||||
|
from generate_seisarray_layout import Ui_generate_seisarray
|
||||||
|
from picking_parameters_layout import Ui_picking_parameters
|
||||||
|
from fmtomo_parameters_layout import Ui_fmtomo_parameters
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
import matplotlib
|
||||||
|
matplotlib.use('Qt4Agg')
|
||||||
|
matplotlib.rcParams['backend.qt4']='PySide'
|
||||||
|
|
||||||
|
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
|
||||||
|
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
|
||||||
|
from matplotlib.figure import Figure
|
||||||
|
|
||||||
|
def openFile(name = 'Open'):
|
||||||
|
dialog = QtGui.QFileDialog()
|
||||||
|
dialog.setWindowTitle(name) #not working yet
|
||||||
|
filename = dialog.getOpenFileName()
|
||||||
|
if len(filename[0]) > 0:
|
||||||
|
return filename[0]
|
||||||
|
|
||||||
|
def saveFile(name = 'Save'):
|
||||||
|
dialog = QtGui.QFileDialog()
|
||||||
|
dialog.setWindowTitle(name)
|
||||||
|
filename = dialog.getSaveFileName()
|
||||||
|
if len(filename[0]) > 0:
|
||||||
|
return filename[0]
|
||||||
|
|
||||||
|
def browseDir(name = 'Open Directory'):
|
||||||
|
dialog = QtGui.QFileDialog()
|
||||||
|
dialog.setWindowTitle(name)
|
||||||
|
directory = dialog.getExistingDirectory()
|
||||||
|
if len(directory) > 0:
|
||||||
|
return directory
|
||||||
|
|
||||||
|
def getMaxCPU():
|
||||||
|
import multiprocessing
|
||||||
|
return multiprocessing.cpu_count()
|
||||||
|
|
||||||
|
class Gen_SeisArray(object):
|
||||||
|
def __init__(self, mainwindow):
|
||||||
|
self.mainwindow = mainwindow
|
||||||
|
self.seisarray = None
|
||||||
|
self.srcfile = None
|
||||||
|
self.recfile = None
|
||||||
|
self.ptsfile = None
|
||||||
|
self.init_dialog()
|
||||||
|
self.start_dialog()
|
||||||
|
|
||||||
|
def init_dialog(self):
|
||||||
|
qdialog = QtGui.QDialog(self.mainwindow)
|
||||||
|
ui = Ui_generate_seisarray()
|
||||||
|
ui.setupUi(qdialog)
|
||||||
|
self.ui = ui
|
||||||
|
self.qdialog = qdialog
|
||||||
|
self.connectButtons()
|
||||||
|
|
||||||
|
def start_dialog(self):
|
||||||
|
self.init_last_selection()
|
||||||
|
if self.qdialog.exec_():
|
||||||
|
self.refresh_selection()
|
||||||
|
if self.ui.radioButton_interpolatable.isChecked():
|
||||||
|
self.seisarray = seismicArrayPreparation.SeisArray(self.recfile, True)
|
||||||
|
elif self.ui.radioButton_normal.isChecked():
|
||||||
|
self.seisarray = seismicArrayPreparation.SeisArray(self.recfile, False)
|
||||||
|
if len(self.srcfile) > 0:
|
||||||
|
self.seisarray.addSourceLocations(self.srcfile)
|
||||||
|
if len(self.ptsfile) > 0:
|
||||||
|
self.seisarray.addMeasuredTopographyPoints(self.ptsfile)
|
||||||
|
self.executed = True
|
||||||
|
else:
|
||||||
|
self.refresh_selection()
|
||||||
|
self.executed = False
|
||||||
|
|
||||||
|
def refresh_selection(self):
|
||||||
|
self.srcfile = self.ui.lineEdit_src.text()
|
||||||
|
self.recfile = self.ui.lineEdit_rec.text()
|
||||||
|
self.ptsfile = self.ui.lineEdit_pts.text()
|
||||||
|
|
||||||
|
def init_last_selection(self):
|
||||||
|
self.ui.lineEdit_src.setText(self.srcfile)
|
||||||
|
self.ui.lineEdit_rec.setText(self.recfile)
|
||||||
|
self.ui.lineEdit_pts.setText(self.ptsfile)
|
||||||
|
|
||||||
|
def get_seisarray(self):
|
||||||
|
if self.seisarray is not None:
|
||||||
|
return self.seisarray
|
||||||
|
|
||||||
|
def connectButtons(self):
|
||||||
|
QtCore.QObject.connect(self.ui.pushButton_rec, QtCore.SIGNAL("clicked()"), self.chooseMeasuredRec)
|
||||||
|
QtCore.QObject.connect(self.ui.pushButton_src, QtCore.SIGNAL("clicked()"), self.chooseMeasuredSrc)
|
||||||
|
QtCore.QObject.connect(self.ui.pushButton_obs, QtCore.SIGNAL("clicked()"), self.chooseMeasuredPts)
|
||||||
|
|
||||||
|
def chooseMeasuredSrc(self):
|
||||||
|
self.ui.lineEdit_src.setText(openFile('Open measured sources file.'))
|
||||||
|
|
||||||
|
def chooseMeasuredRec(self):
|
||||||
|
self.ui.lineEdit_rec.setText(openFile('Open measured receivers file.'))
|
||||||
|
|
||||||
|
def chooseMeasuredPts(self):
|
||||||
|
self.ui.lineEdit_pts.setText(openFile('Open measured points file.'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Gen_Survey_from_SA(object):
|
||||||
|
def __init__(self, mainwindow, seisarray):
|
||||||
|
self.mainwindow = mainwindow
|
||||||
|
self.seisarray = seisarray
|
||||||
|
self.survey = None
|
||||||
|
self.obsdir = None
|
||||||
|
self.fstart = 'shot'
|
||||||
|
self.fend = '.dat'
|
||||||
|
self.init_dialog()
|
||||||
|
self.start_dialog()
|
||||||
|
|
||||||
|
def init_dialog(self):
|
||||||
|
qdialog = QtGui.QDialog(self.mainwindow)
|
||||||
|
ui = Ui_generate_survey_minimal()
|
||||||
|
ui.setupUi(qdialog)
|
||||||
|
self.ui = ui
|
||||||
|
self.qdialog = qdialog
|
||||||
|
self.connectButtons()
|
||||||
|
|
||||||
|
def start_dialog(self):
|
||||||
|
self.init_last_selection()
|
||||||
|
if self.qdialog.exec_():
|
||||||
|
self.refresh_selection()
|
||||||
|
self.survey = activeSeismoPick.Survey(self.obsdir, seisArray = self.seisarray,
|
||||||
|
useDefaultParas = True, fstart = self.fstart,
|
||||||
|
fend = self.fend)
|
||||||
|
self.executed = True
|
||||||
|
else:
|
||||||
|
self.refresh_selection()
|
||||||
|
self.executed = False
|
||||||
|
|
||||||
|
def refresh_selection(self):
|
||||||
|
self.obsdir = self.ui.lineEdit_obs.text()
|
||||||
|
self.fstart = self.ui.fstart.text()
|
||||||
|
self.fend = self.ui.fend.text()
|
||||||
|
|
||||||
|
def init_last_selection(self):
|
||||||
|
self.ui.lineEdit_obs.setText(self.obsdir)
|
||||||
|
self.ui.fstart.setText(self.fstart)
|
||||||
|
self.ui.fend.setText(self.fend)
|
||||||
|
|
||||||
|
def get_survey(self):
|
||||||
|
return self.survey
|
||||||
|
|
||||||
|
def connectButtons(self):
|
||||||
|
QtCore.QObject.connect(self.ui.pushButton_obs, QtCore.SIGNAL("clicked()"), self.chooseObsdir)
|
||||||
|
|
||||||
|
def chooseObsdir(self):
|
||||||
|
self.ui.lineEdit_obs.setText(browseDir('Choose observation directory.'))
|
||||||
|
|
||||||
|
|
||||||
|
class Gen_Survey_from_SR(object):
|
||||||
|
def __init__(self, mainwindow):
|
||||||
|
self.mainwindow = mainwindow
|
||||||
|
self.survey = None
|
||||||
|
self.obsdir = None
|
||||||
|
self.srcfile = None
|
||||||
|
self.recfile = None
|
||||||
|
self.fstart = 'shot'
|
||||||
|
self.fend = '.dat'
|
||||||
|
self.init_dialog()
|
||||||
|
self.start_dialog()
|
||||||
|
|
||||||
|
def init_dialog(self):
|
||||||
|
qdialog = QtGui.QDialog(self.mainwindow)
|
||||||
|
ui = Ui_generate_survey()
|
||||||
|
ui.setupUi(qdialog)
|
||||||
|
self.ui = ui
|
||||||
|
self.qdialog = qdialog
|
||||||
|
self.connectButtons()
|
||||||
|
|
||||||
|
def start_dialog(self):
|
||||||
|
self.init_last_selection()
|
||||||
|
if self.qdialog.exec_():
|
||||||
|
self.refresh_selection()
|
||||||
|
self.survey = activeSeismoPick.Survey(self.obsdir, self.srcfile, self.recfile,
|
||||||
|
useDefaultParas = True,
|
||||||
|
fstart = self.fstart, fend = self.fend)
|
||||||
|
self.executed = True
|
||||||
|
else:
|
||||||
|
self.refresh_selection()
|
||||||
|
self.executed = False
|
||||||
|
|
||||||
|
def refresh_selection(self):
|
||||||
|
self.obsdir = self.ui.lineEdit_obs.text()
|
||||||
|
self.srcfile = self.ui.lineEdit_src.text()
|
||||||
|
self.recfile = self.ui.lineEdit_rec.text()
|
||||||
|
self.fstart = self.ui.fstart.text()
|
||||||
|
self.fend = self.ui.fend.text()
|
||||||
|
|
||||||
|
def init_last_selection(self):
|
||||||
|
self.ui.lineEdit_obs.setText(self.obsdir)
|
||||||
|
self.ui.lineEdit_src.setText(self.srcfile)
|
||||||
|
self.ui.lineEdit_rec.setText(self.recfile)
|
||||||
|
self.ui.fstart.setText(self.fstart)
|
||||||
|
self.ui.fend.setText(self.fend)
|
||||||
|
|
||||||
|
def get_survey(self):
|
||||||
|
return self.survey
|
||||||
|
|
||||||
|
def connectButtons(self):
|
||||||
|
QtCore.QObject.connect(self.ui.pushButton_obs, QtCore.SIGNAL("clicked()"), self.chooseObsdir)
|
||||||
|
QtCore.QObject.connect(self.ui.pushButton_src, QtCore.SIGNAL("clicked()"), self.chooseSourcefile)
|
||||||
|
QtCore.QObject.connect(self.ui.pushButton_rec, QtCore.SIGNAL("clicked()"), self.chooseRecfile)
|
||||||
|
|
||||||
|
def chooseObsdir(self):
|
||||||
|
self.ui.lineEdit_obs.setText(browseDir('Choose observation directory.'))
|
||||||
|
|
||||||
|
def chooseSourcefile(self):
|
||||||
|
self.ui.lineEdit_src.setText(openFile('Open sourcefile.'))
|
||||||
|
|
||||||
|
def chooseRecfile(self):
|
||||||
|
self.ui.lineEdit_rec.setText(openFile('Open receiverfile.'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Call_autopicker(object):
|
||||||
|
def __init__(self, mainwindow, survey):
|
||||||
|
self.mainwindow = mainwindow
|
||||||
|
self.survey = survey
|
||||||
|
self.maxSRdist = None
|
||||||
|
self.init_dialog()
|
||||||
|
self.refresh_selection()
|
||||||
|
self.start_dialog()
|
||||||
|
|
||||||
|
def init_dialog(self):
|
||||||
|
qdialog = QtGui.QDialog(self.mainwindow)
|
||||||
|
ui = Ui_picking_parameters()
|
||||||
|
ui.setupUi(qdialog)
|
||||||
|
ui.ncores.setMaximum(getMaxCPU())
|
||||||
|
self.ui = ui
|
||||||
|
self.qdialog = qdialog
|
||||||
|
self.initDynSNRplot()
|
||||||
|
self.connectButtons()
|
||||||
|
|
||||||
|
def getMaxSRdist(self):
|
||||||
|
if self.maxSRdist is not None:
|
||||||
|
return self.maxSRdist
|
||||||
|
else:
|
||||||
|
SRdists = []
|
||||||
|
for shot in self.survey.data.values():
|
||||||
|
for traceID in shot.getTraceIDlist():
|
||||||
|
SRdists.append(shot.getDistance(traceID))
|
||||||
|
self.maxSRdist = max(SRdists)
|
||||||
|
return self.maxSRdist
|
||||||
|
|
||||||
|
def initDynSNRplot(self):
|
||||||
|
self.snrFig = Figure()
|
||||||
|
self.snrCanvas = FigureCanvas(self.snrFig)
|
||||||
|
self.ui.vlayout_plot.addWidget(self.snrCanvas)
|
||||||
|
self.snrToolbar = NavigationToolbar(self.snrCanvas, self.mainwindow)
|
||||||
|
self.ui.vlayout_plot.addWidget(self.snrToolbar)
|
||||||
|
|
||||||
|
def plotDynSNR(self):
|
||||||
|
fig = self.snrFig
|
||||||
|
if fig.axes == []:
|
||||||
|
ax = fig.add_subplot(111)
|
||||||
|
xlim = None
|
||||||
|
ylim = None
|
||||||
|
else:
|
||||||
|
ax = fig.axes[0]
|
||||||
|
xlim = ax.get_xlim()
|
||||||
|
ylim = ax.get_ylim()
|
||||||
|
ax.clear()
|
||||||
|
snrthresholds = []
|
||||||
|
dists_p = []; snr_p = []
|
||||||
|
shiftSNR = float(self.ui.shift_snr.value())
|
||||||
|
shiftDist = float(self.ui.shift_dist.value())
|
||||||
|
p1 = float(self.ui.p1.value())
|
||||||
|
p2 = float(self.ui.p2.value())
|
||||||
|
dists = np.arange(0, self.getMaxSRdist() + 1, 1)
|
||||||
|
if self.survey.picked:
|
||||||
|
for shot in self.survey.data.values():
|
||||||
|
for traceID in shot.getTraceIDlist():
|
||||||
|
dists_p.append(shot.getDistance(traceID))
|
||||||
|
snr_p.append(shot.getSNR(traceID)[0])
|
||||||
|
|
||||||
|
ax.scatter(dists_p, snr_p, s = 0.5, c='k')
|
||||||
|
|
||||||
|
for dist in dists:
|
||||||
|
dist += shiftDist
|
||||||
|
snrthresholds.append(surveyUtils.snr_fit_func(surveyUtils.get_fit_fn(p1, p2), dist, shiftSNR))
|
||||||
|
ax.plot(dists, snrthresholds)
|
||||||
|
ax.set_xlabel('Distance [m]')
|
||||||
|
ax.set_ylabel('SNR')
|
||||||
|
ax.set_xlim(xlim)
|
||||||
|
ax.set_ylim(ylim)
|
||||||
|
self.snrCanvas.draw()
|
||||||
|
|
||||||
|
def start_dialog(self):
|
||||||
|
self.init_last_selection()
|
||||||
|
self.plotDynSNR()
|
||||||
|
if self.qdialog.exec_():
|
||||||
|
self.refresh_selection()
|
||||||
|
|
||||||
|
if self.AIC == True:
|
||||||
|
HosAic = 'aic'
|
||||||
|
else:
|
||||||
|
HosAic = 'hos'
|
||||||
|
|
||||||
|
surveyUtils.setDynamicFittedSNR(self.survey.getShotDict(), shiftdist = self.shiftDist,
|
||||||
|
shiftSNR = self.shiftSNR, p1 = self.p1, p2 = self.p2)
|
||||||
|
|
||||||
|
self.survey.pickAllShots(vmin = self.vmin, vmax = self.vmax,
|
||||||
|
folm = self.folm/100., HosAic = HosAic,
|
||||||
|
aicwindow = self.aicwindow, cores = self.ncores)
|
||||||
|
|
||||||
|
#QtGui.qApp.processEvents() # test
|
||||||
|
self.executed = True
|
||||||
|
else:
|
||||||
|
self.refresh_selection()
|
||||||
|
self.executed = False
|
||||||
|
|
||||||
|
def refreshFolm(self):
|
||||||
|
self.ui.label_folm.setText('%s %%'%self.ui.slider_folm.value())
|
||||||
|
|
||||||
|
def refresh_selection(self):
|
||||||
|
self.ncores = int(self.ui.ncores.value())
|
||||||
|
self.vmin = float(self.ui.lineEdit_vmin.text())
|
||||||
|
self.vmax = float(self.ui.lineEdit_vmax.text())
|
||||||
|
self.folm = float(self.ui.slider_folm.value())
|
||||||
|
self.AIC = self.ui.checkBox_AIC.isChecked()
|
||||||
|
self.aicwindow = (int(self.ui.lineEdit_aicleft.text()), int(self.ui.lineEdit_aicright.text()))
|
||||||
|
self.shiftSNR = float(self.ui.shift_snr.value())
|
||||||
|
self.shiftDist = float(self.ui.shift_dist.value())
|
||||||
|
self.p1 = float(self.ui.p1.value())
|
||||||
|
self.p2 = float(self.ui.p2.value())
|
||||||
|
|
||||||
|
def init_last_selection(self):
|
||||||
|
self.ui.ncores.setValue(self.ncores)
|
||||||
|
self.ui.lineEdit_vmin.setText(str(self.vmin))
|
||||||
|
self.ui.lineEdit_vmax.setText(str(self.vmax))
|
||||||
|
self.ui.slider_folm.setValue(self.folm)
|
||||||
|
self.ui.checkBox_AIC.setChecked(self.AIC)
|
||||||
|
self.ui.lineEdit_aicleft.setText(str(self.aicwindow[0]))
|
||||||
|
self.ui.lineEdit_aicright.setText(str(self.aicwindow[1]))
|
||||||
|
self.ui.shift_snr.setValue(self.shiftSNR)
|
||||||
|
self.ui.shift_snr.setValue(self.shiftDist)
|
||||||
|
self.ui.p1.setValue(self.p1)
|
||||||
|
self.ui.p2.setValue(self.p2)
|
||||||
|
|
||||||
|
def connectButtons(self):
|
||||||
|
QtCore.QObject.connect(self.ui.slider_folm, QtCore.SIGNAL("valueChanged(int)"), self.refreshFolm)
|
||||||
|
QtCore.QObject.connect(self.ui.shift_snr, QtCore.SIGNAL("valueChanged(int)"), self.plotDynSNR)
|
||||||
|
QtCore.QObject.connect(self.ui.shift_dist, QtCore.SIGNAL("valueChanged(int)"), self.plotDynSNR)
|
||||||
|
QtCore.QObject.connect(self.ui.p1, QtCore.SIGNAL("valueChanged(double)"), self.plotDynSNR)
|
||||||
|
QtCore.QObject.connect(self.ui.p2, QtCore.SIGNAL("valueChanged(double)"), self.plotDynSNR)
|
||||||
|
|
||||||
|
def chooseObsdir(self):
|
||||||
|
self.ui.lineEdit_obs.setText(browseDir('Choose observation directory.'))
|
||||||
|
|
||||||
|
def chooseSourcefile(self):
|
||||||
|
self.ui.lineEdit_src.setText(openFile('Open sourcefile.'))
|
||||||
|
|
||||||
|
def chooseRecfile(self):
|
||||||
|
self.ui.lineEdit_rec.setText(openFile('Open receiverfile.'))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Call_FMTOMO(object):
|
||||||
|
def __init__(self, mainwindow, survey):
|
||||||
|
self.mainwindow = mainwindow
|
||||||
|
self.survey = survey
|
||||||
|
self.init_dialog()
|
||||||
|
self.refresh_selection()
|
||||||
|
self.start_dialog()
|
||||||
|
|
||||||
|
def init_dialog(self):
|
||||||
|
qdialog = QtGui.QDialog(self.mainwindow)
|
||||||
|
ui = Ui_fmtomo_parameters()
|
||||||
|
ui.setupUi(qdialog)
|
||||||
|
ui.nproc.setMaximum(getMaxCPU())
|
||||||
|
self.ui = ui
|
||||||
|
self.qdialog = qdialog
|
||||||
|
self.connectButtons()
|
||||||
|
|
||||||
|
def start_dialog(self):
|
||||||
|
self.init_last_selection()
|
||||||
|
if self.qdialog.exec_():
|
||||||
|
self.refresh_selection()
|
||||||
|
|
||||||
|
if not os.path.isdir(self.picks_dir):
|
||||||
|
err = os.mkdir(self.picks_dir) # error not handled yet
|
||||||
|
|
||||||
|
self.survey.exportFMTOMO(self.picks_dir)
|
||||||
|
|
||||||
|
cwd = os.getcwd()
|
||||||
|
interpolationMethod = 'linear'
|
||||||
|
os.chdir(self.simuldir)
|
||||||
|
if self.survey.seisarray.twoDim:
|
||||||
|
interpolationMethod = 'nearest'
|
||||||
|
self.survey.seisarray.generateFMTOMOinputFromArray(self.propgrid, self.vgrid, (self.bbot, self.btop),
|
||||||
|
self.cushionfactor/100., interpolationMethod,
|
||||||
|
customgrid = self.customgrid, writeVTK = True)
|
||||||
|
os.chdir(cwd)
|
||||||
|
|
||||||
|
tomo = fmtomoUtils.Tomo3d(self.fmtomo_dir, self.simuldir)
|
||||||
|
tomo.runTOMO3D(self.nproc, self.nIter)
|
||||||
|
|
||||||
|
self.executed = True
|
||||||
|
else:
|
||||||
|
self.refresh_selection()
|
||||||
|
self.executed = False
|
||||||
|
|
||||||
|
def refresh_selection(self):
|
||||||
|
self.fmtomo_dir = self.ui.fmtomo_dir.text()
|
||||||
|
self.nIter = int(self.ui.nIter.value())
|
||||||
|
self.nproc = int(self.ui.nproc.value())
|
||||||
|
self.btop = float(self.ui.btop.text())
|
||||||
|
self.bbot = float(self.ui.bbot.text())
|
||||||
|
self.propgrid = (int(self.ui.pgrid_x.value()), int(self.ui.pgrid_y.value()), int(self.ui.pgrid_z.value()))
|
||||||
|
self.vgrid = (int(self.ui.invgrid_x.value()), int(self.ui.invgrid_y.value()), int(self.ui.invgrid_z.value()))
|
||||||
|
self.cushionfactor = float(self.ui.cushion.value())
|
||||||
|
self.customgrid = self.ui.customgrid.text()
|
||||||
|
self.simuldir = self.ui.simuldir.text()
|
||||||
|
self.picks_dir = os.path.join(self.simuldir, 'picks')
|
||||||
|
|
||||||
|
def init_last_selection(self):
|
||||||
|
self.ui.fmtomo_dir.setText(self.fmtomo_dir)
|
||||||
|
self.ui.nIter.setValue(self.nIter)
|
||||||
|
self.ui.nproc.setValue(self.nproc)
|
||||||
|
self.ui.btop.setText(str(self.btop))
|
||||||
|
self.ui.bbot.setText(str(self.bbot))
|
||||||
|
self.ui.pgrid_x.setValue(self.propgrid[0])
|
||||||
|
self.ui.pgrid_y.setValue(self.propgrid[1])
|
||||||
|
self.ui.pgrid_z.setValue(self.propgrid[2])
|
||||||
|
self.ui.invgrid_x.setValue(self.vgrid[0])
|
||||||
|
self.ui.invgrid_y.setValue(self.vgrid[1])
|
||||||
|
self.ui.invgrid_z.setValue(self.vgrid[2])
|
||||||
|
self.ui.cushion.setValue(self.cushionfactor)
|
||||||
|
self.ui.customgrid.setText(self.customgrid)
|
||||||
|
self.ui.simuldir.setText(self.simuldir)
|
||||||
|
|
||||||
|
def connectButtons(self):
|
||||||
|
QtCore.QObject.connect(self.ui.browse_tomodir, QtCore.SIGNAL("clicked()"), self.chooseFMTOMOdir)
|
||||||
|
QtCore.QObject.connect(self.ui.browse_customgrid, QtCore.SIGNAL("clicked()"), self.chooseCustomgrid)
|
||||||
|
QtCore.QObject.connect(self.ui.browse_simuldir, QtCore.SIGNAL("clicked()"), self.chooseSimuldir)
|
||||||
|
|
||||||
|
def chooseFMTOMOdir(self):
|
||||||
|
self.ui.fmtomo_dir.setText(browseDir())
|
||||||
|
|
||||||
|
def chooseCustomgrid(self):
|
||||||
|
self.ui.customgrid.setText(openFile())
|
||||||
|
|
||||||
|
def chooseSimuldir(self):
|
||||||
|
self.ui.simuldir.setText(browseDir())
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -507,7 +507,7 @@ class SeisArray(object):
|
|||||||
self.surface2VTK(interf2, filename='interface2.vtk')
|
self.surface2VTK(interf2, filename='interface2.vtk')
|
||||||
self.receivers2VTK()
|
self.receivers2VTK()
|
||||||
self.sources2VTK()
|
self.sources2VTK()
|
||||||
fmtomoUtils.vgrids2VTK()
|
#fmtomoUtils.vgrids2VTK()
|
||||||
|
|
||||||
def generateReceiversIn(self, outfilename='receivers.in'):
|
def generateReceiversIn(self, outfilename='receivers.in'):
|
||||||
outfile = open(outfilename, 'w')
|
outfile = open(outfilename, 'w')
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
def readParameters(parfile, parameter):
|
def readParameters(parfile, parameter):
|
||||||
"""
|
"""
|
||||||
@ -90,10 +90,9 @@ def setDynamicFittedSNR(shot_dict, shiftdist=30, shiftSNR=100, p1=0.004, p2=-0.0
|
|||||||
:type p2: float
|
:type p2: float
|
||||||
:return:
|
:return:
|
||||||
"""
|
"""
|
||||||
import numpy as np
|
|
||||||
minSNR = 2.5
|
minSNR = 2.5
|
||||||
# fit_fn = fitSNR4dist(shot_dict)
|
# fit_fn = fitSNR4dist(shot_dict)
|
||||||
fit_fn = np.poly1d([p1, p2])
|
fit_fn = get_fit_fn(p1, p2)
|
||||||
for shot in shot_dict.values():
|
for shot in shot_dict.values():
|
||||||
for traceID in shot.getTraceIDlist(): ### IMPROVE
|
for traceID in shot.getTraceIDlist(): ### IMPROVE
|
||||||
dist = shot.getDistance(traceID) + shiftdist
|
dist = shot.getDistance(traceID) + shiftdist
|
||||||
@ -104,13 +103,17 @@ def setDynamicFittedSNR(shot_dict, shiftdist=30, shiftSNR=100, p1=0.004, p2=-0.0
|
|||||||
shot.setSNRthreshold(traceID, minSNR)
|
shot.setSNRthreshold(traceID, minSNR)
|
||||||
else:
|
else:
|
||||||
shot.setSNRthreshold(traceID, snrthreshold)
|
shot.setSNRthreshold(traceID, snrthreshold)
|
||||||
print("setDynamicFittedSNR: Finished setting of fitted SNR-threshold")
|
print("setDynamicFittedSNR: Finished setting of fitted SNR-threshold.\n"
|
||||||
|
"Parameters: ShiftDist = %s, ShiftSNR = %s, p1 = %s, p2 = %s"
|
||||||
|
%(shiftdist, shiftSNR, p1, p2))
|
||||||
|
|
||||||
def snr_fit_func(fit_fn, dist, shiftSNR):
|
def snr_fit_func(fit_fn, dist, shiftSNR):
|
||||||
import numpy as np
|
|
||||||
snrthreshold = (1 / (fit_fn(dist) ** 2)) - shiftSNR * np.exp(-0.05 * dist)
|
snrthreshold = (1 / (fit_fn(dist) ** 2)) - shiftSNR * np.exp(-0.05 * dist)
|
||||||
return snrthreshold
|
return snrthreshold
|
||||||
|
|
||||||
|
def get_fit_fn(p1, p2):
|
||||||
|
return np.poly1d([p1, p2])
|
||||||
|
|
||||||
def setConstantSNR(shot_dict, snrthreshold=2.5):
|
def setConstantSNR(shot_dict, snrthreshold=2.5):
|
||||||
"""
|
"""
|
||||||
Set a constant SNR value to all Seismicshots in a dictionary (e.g. survey.getShotDict()).
|
Set a constant SNR value to all Seismicshots in a dictionary (e.g. survey.getShotDict()).
|
||||||
|
Loading…
Reference in New Issue
Block a user