adding tooltips

This commit is contained in:
Marcel Paffrath 2016-06-27 14:47:34 +02:00
parent 4bbb40c8b7
commit a813eb462f
7 changed files with 300 additions and 73 deletions

View File

@ -24,10 +24,12 @@ class gui_control(object):
self.connectButtons()
self.survey = None
self.seisarray = None
self.seisArrayFigure = None
self.cancelpixmap = self.mainwindow.style().standardPixmap(QtGui.QStyle.SP_DialogCancelButton)
self.applypixmap = self.mainwindow.style().standardPixmap(QtGui.QStyle.SP_DialogApplyButton)
self.setInitStates()
self.addArrayPlot()
self.addStatPlots()
def setInitStates(self):
self.setPickState(False)
@ -47,11 +49,20 @@ class gui_control(object):
QtCore.QObject.connect(self.mainUI.picker, QtCore.SIGNAL("clicked()"), self.callPicker)
QtCore.QObject.connect(self.mainUI.postprocessing, QtCore.SIGNAL("clicked()"), self.postprocessing)
QtCore.QObject.connect(self.mainUI.fmtomo, QtCore.SIGNAL("clicked()"), self.startFMTOMO)
QtCore.QObject.connect(self.mainUI.comboBox, QtCore.SIGNAL("activated(int)"), self.replotStat)
def gen_seisarray(self):
disconnect = False
if self.checkSeisArrayState():
if not self.continueDialogExists('Seismic Array'):
return
if self.checkConnected2SurveyState():
if not self.continueDialogMessage('Seismic Array connected to present Survey.\n'
'Continuation will disconnect the Seismic Array.'):
return
else:
self.survey.seisarray = None
disconnect = True
qdialog = QtGui.QDialog(self.mainwindow)
ui = Ui_generate_seisarray()
ui.setupUi(qdialog)
@ -66,6 +77,8 @@ class gui_control(object):
self.seisarray.addSourceLocations(srcfile)
if len(ptsfile) > 0:
self.seisarray.addMeasuredTopographyPoints(ptsfile)
if disconnect:
self.setConnected2SurveyState(False)
self.setSeisArrayState(True)
def gen_survey(self):
@ -86,16 +99,60 @@ class gui_control(object):
self.survey.setArtificialPick(0, 0) # artificial pick at source origin
surveyUtils.setDynamicFittedSNR(self.survey.getShotDict())
self.setSurveyState(True)
self.setPickState(False)
self.setConnected2SurveyState(False)
def addArrayPlot(self):
self.seisArrayFigure = Figure()
self.seisArrayCanvas = FigureCanvas(self.seisArrayFigure)
self.mainUI.verticalLayout_right.addWidget(self.seisArrayCanvas)
self.addArrayAxes()
self.mainUI.horizontalLayout_tr.addWidget(self.seisArrayCanvas)
def addStatPlots(self):
self.statFigure_left = Figure()
self.statCanvas_left = FigureCanvas(self.statFigure_left)
self.mainUI.horizontalLayout_br.addWidget(self.statCanvas_left)
self.statFigure_right = Figure()
self.statCanvas_right = FigureCanvas(self.statFigure_right)
self.mainUI.horizontalLayout_br.addWidget(self.statCanvas_right)
self.addItems2ComboBox()
def addItems2ComboBox(self):
self.mainUI.comboBox.insertItem(0, 'picked traces')
self.mainUI.comboBox.insertItem(1, 'mean SNR')
self.mainUI.comboBox.insertItem(2, 'median SNR')
self.mainUI.comboBox.insertItem(3, 'mean SPE')
self.mainUI.comboBox.insertItem(4, 'median SPE')
self.mainUI.comboBox.setEnabled(False)
def addArrayAxes(self):
self.seisArrayAx = self.seisArrayFigure.add_subplot(111)
def addStatAxes(self):
self.statAx_left = self.statFigure_left.add_subplot(111)
self.statAx_right = self.statFigure_right.add_subplot(111)
def replotArray(self):
self.seisArrayFigure.clf()
self.addArrayAxes()
self.plotArray()
self.seisArrayCanvas.draw()
def plotArray(self):
self.seisarray.plotArray2D(self.seisArrayAx, highlight_measured = True)
def replotStat(self):
self.statFigure_left.clf()
self.statFigure_right.clf()
self.addStatAxes()
self.plotStat()
self.statCanvas_left.draw()
self.statCanvas_right.draw()
def plotStat(self):
if self.checkPickState():
surveyUtils.plotScatterStats4Receivers(self.survey, self.mainUI.comboBox.currentText(), self.statAx_left)
surveyUtils.plotScatterStats4Shots(self.survey, self.mainUI.comboBox.currentText(), self.statAx_right)
def interpolate_receivers(self):
if not self.checkSeisArrayState():
self.printDialogMessage('No Seismic Array defined.')
@ -250,20 +307,24 @@ class gui_control(object):
self.setConnected2SurveyState(True)
self.setSeisArrayState(True)
self.printDialogMessage('Loaded Survey with active Seismic Array.')
def replotArray(self):
self.seisArrayFigure.clf()
self.addArrayAxes()
self.plotArray()
self.seisArrayCanvas.draw()
def plotArray(self):
self.seisarray.plotArray2D(self.seisArrayAx, highlight_measured = True)
else:
self.setConnected2SurveyState(False)
self.setSeisArrayState(False)
self.printDialogMessage('Loaded Survey.')
def load_seisarray(self):
disconnect = False
if self.checkSeisArrayState():
if not self.continueDialogExists('Seismic Array'):
return
if self.checkConnected2SurveyState():
if not self.continueDialogMessage('Seismic Array connected to present Survey.\n'
'Continuation will disconnect the Seismic Array.'):
return
else:
self.survey.seisarray = None
disconnect = True
filename = self.openFile()
if filename is None:
return
@ -276,6 +337,8 @@ class gui_control(object):
self.printDialogMessage('Wrong input file of type %s, expected %s.'
%(type(survey), seismicArrayPreparation.SeisArray))
return
if disconnect:
self.setConnected2SurveyState(False)
self.seisarray = seisarray
self.replotArray()
self.setSeisArrayState(True)
@ -319,6 +382,8 @@ class gui_control(object):
def setPickState(self, state):
if state == True and self.checkSurveyState():
self.mainUI.picked_active.setPixmap(self.applypixmap)
self.replotStat()
self.mainUI.comboBox.setEnabled(True)
self.survey.picked = True
elif state == True and self.checkSurveyState() is False:
self.printDialogMessage('No Survey defined.')
@ -326,6 +391,9 @@ class gui_control(object):
elif state == False:
self.mainUI.picked_active.setPixmap(self.cancelpixmap)
if self.checkSurveyState():
self.statFigure_left.clf()
self.statFigure_right.clf()
self.mainUI.comboBox.setEnabled(True)
self.survey.picked = False
def setSeisArrayState(self, state):
@ -334,6 +402,8 @@ class gui_control(object):
self.replotArray()
elif state == False:
self.mainUI.seisarray_active.setPixmap(self.cancelpixmap)
if self.seisArrayFigure is not None:
self.seisArrayFigure.clf()
def setConnected2SurveyState(self, state):
if state == True:
@ -394,37 +464,40 @@ class gui_control(object):
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())
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())
self.gen_new_seisarray.lineEdit_rec.setText(self.openFile('Open measured receivers file.'))
def chooseMeasuredPts(self):
self.gen_new_seisarray.lineEdit_pts.setText(self.browseDir())
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())
self.gen_new_survey.lineEdit_src.setText(self.openFile('Open sourcefile.'))
def chooseReceiverfile(self):
self.gen_new_survey.lineEdit_rec.setText(self.openFile())
self.gen_new_survey.lineEdit_rec.setText(self.openFile('Open receiverfile.'))
def chooseObsdir(self):
self.gen_new_survey.lineEdit_obs.setText(self.browseDir())
self.gen_new_survey.lineEdit_obs.setText(self.browseDir('Choose observation directory.'))
def openFile(self):
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):
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):
def browseDir(self, name = 'Open Directory'):
dialog = QtGui.QFileDialog()
dialog.setWindowTitle(name)
directory = dialog.getExistingDirectory()
if len(directory) > 0:
return directory

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'asp3d_layout.ui'
#
# Created: Thu Jun 23 11:47:12 2016
# Created: Mon Jun 27 13:23:32 2016
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
@ -13,13 +13,13 @@ class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.setEnabled(True)
MainWindow.resize(800, 600)
MainWindow.resize(905, 707)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
MainWindow.setMinimumSize(QtCore.QSize(300, 585))
MainWindow.setMinimumSize(QtCore.QSize(800, 600))
MainWindow.setMaximumSize(QtCore.QSize(250000, 350000))
MainWindow.setContextMenuPolicy(QtCore.Qt.ActionsContextMenu)
icon = QtGui.QIcon()
@ -29,9 +29,10 @@ class Ui_MainWindow(object):
self.centralwidget.setObjectName("centralwidget")
self.horizontalLayout_4 = QtGui.QHBoxLayout(self.centralwidget)
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
self.horizontalLayout_outer = QtGui.QHBoxLayout()
self.horizontalLayout_outer.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint)
self.horizontalLayout_outer.setObjectName("horizontalLayout_outer")
self.formLayout = QtGui.QFormLayout()
self.formLayout.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint)
self.formLayout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
self.formLayout.setObjectName("formLayout")
self.verticalLayout_5 = QtGui.QVBoxLayout()
self.verticalLayout_5.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
self.verticalLayout_5.setObjectName("verticalLayout_5")
@ -53,6 +54,7 @@ class Ui_MainWindow(object):
self.label_2.setObjectName("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)
@ -237,15 +239,30 @@ class Ui_MainWindow(object):
self.verticalLayout_4.addWidget(self.fmtomo)
self.verticalLayout_3.addLayout(self.verticalLayout_4)
self.verticalLayout_5.addLayout(self.verticalLayout_3)
self.horizontalLayout_outer.addLayout(self.verticalLayout_5)
self.formLayout.setLayout(0, QtGui.QFormLayout.LabelRole, self.verticalLayout_5)
self.verticalLayout_right = QtGui.QVBoxLayout()
self.verticalLayout_right.setSizeConstraint(QtGui.QLayout.SetMaximumSize)
self.verticalLayout_right.setObjectName("verticalLayout_right")
self.horizontalLayout_outer.addLayout(self.verticalLayout_right)
self.horizontalLayout_4.addLayout(self.horizontalLayout_outer)
self.horizontalLayout_tr = QtGui.QHBoxLayout()
self.horizontalLayout_tr.setObjectName("horizontalLayout_tr")
self.verticalLayout_right.addLayout(self.horizontalLayout_tr)
self.line_4 = QtGui.QFrame(self.centralwidget)
self.line_4.setFrameShape(QtGui.QFrame.HLine)
self.line_4.setFrameShadow(QtGui.QFrame.Sunken)
self.line_4.setObjectName("line_4")
self.verticalLayout_right.addWidget(self.line_4)
self.comboBox = QtGui.QComboBox(self.centralwidget)
self.comboBox.setEnabled(False)
self.comboBox.setObjectName("comboBox")
self.verticalLayout_right.addWidget(self.comboBox)
self.horizontalLayout_br = QtGui.QHBoxLayout()
self.horizontalLayout_br.setObjectName("horizontalLayout_br")
self.verticalLayout_right.addLayout(self.horizontalLayout_br)
self.formLayout.setLayout(0, QtGui.QFormLayout.FieldRole, self.verticalLayout_right)
self.horizontalLayout_4.addLayout(self.formLayout)
MainWindow.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(MainWindow)
self.menubar.setGeometry(QtCore.QRect(0, 0, 800, 23))
self.menubar.setGeometry(QtCore.QRect(0, 0, 905, 23))
self.menubar.setObjectName("menubar")
MainWindow.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(MainWindow)
@ -258,22 +275,33 @@ class Ui_MainWindow(object):
def retranslateUi(self, MainWindow):
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.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_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.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.setText(QtGui.QApplication.translate("MainWindow", "picked", None, QtGui.QApplication.UnicodeUTF8))
self.label_7.setText(QtGui.QApplication.translate("MainWindow", "Picking", 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))

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'fmtomo_parameters_layout.ui'
#
# Created: Fri Jun 17 10:24:38 2016
# Created: Mon Jun 27 13:23:32 2016
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
@ -12,13 +12,13 @@ from PySide import QtCore, QtGui
class Ui_fmtomo_parameters(object):
def setupUi(self, fmtomo_parameters):
fmtomo_parameters.setObjectName("fmtomo_parameters")
fmtomo_parameters.resize(380, 440)
fmtomo_parameters.resize(400, 440)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(fmtomo_parameters.sizePolicy().hasHeightForWidth())
fmtomo_parameters.setSizePolicy(sizePolicy)
fmtomo_parameters.setMinimumSize(QtCore.QSize(380, 440))
fmtomo_parameters.setMinimumSize(QtCore.QSize(400, 440))
fmtomo_parameters.setMaximumSize(QtCore.QSize(320000, 520000))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("../asp3d_icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
@ -234,37 +234,66 @@ class Ui_fmtomo_parameters(object):
def retranslateUi(self, fmtomo_parameters):
fmtomo_parameters.setWindowTitle(QtGui.QApplication.translate("fmtomo_parameters", "Choose FMTOMO parameters", None, QtGui.QApplication.UnicodeUTF8))
self.label_17.setToolTip(QtGui.QApplication.translate("fmtomo_parameters", "Directory containing a clean FMTOMO installation.", None, QtGui.QApplication.UnicodeUTF8))
self.label_17.setText(QtGui.QApplication.translate("fmtomo_parameters", "FMTOMO\n"
"installation", None, QtGui.QApplication.UnicodeUTF8))
"installation [?]", None, QtGui.QApplication.UnicodeUTF8))
self.browse_tomodir.setText(QtGui.QApplication.translate("fmtomo_parameters", "Browse", None, QtGui.QApplication.UnicodeUTF8))
self.label_14.setText(QtGui.QApplication.translate("fmtomo_parameters", "nproc", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("fmtomo_parameters", "Iterations", None, QtGui.QApplication.UnicodeUTF8))
self.label_14.setToolTip(QtGui.QApplication.translate("fmtomo_parameters", "Number of processes spawned for parallel forward simulation.", None, QtGui.QApplication.UnicodeUTF8))
self.label_14.setText(QtGui.QApplication.translate("fmtomo_parameters", "Number of processes [?]", None, QtGui.QApplication.UnicodeUTF8))
self.label.setToolTip(QtGui.QApplication.translate("fmtomo_parameters", "Number of inversion iterations.", None, QtGui.QApplication.UnicodeUTF8))
self.label.setText(QtGui.QApplication.translate("fmtomo_parameters", "Iterations [?]", None, QtGui.QApplication.UnicodeUTF8))
self.label_18.setText(QtGui.QApplication.translate("fmtomo_parameters", "Grid definitions from seismic Array:", None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setText(QtGui.QApplication.translate("fmtomo_parameters", "Bottom boundary", None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setToolTip(QtGui.QApplication.translate("fmtomo_parameters", "Bottom boundary of the model.", None, QtGui.QApplication.UnicodeUTF8))
self.label_3.setText(QtGui.QApplication.translate("fmtomo_parameters", "Bottom boundary [?]", None, QtGui.QApplication.UnicodeUTF8))
self.bbot.setText(QtGui.QApplication.translate("fmtomo_parameters", "-50", None, QtGui.QApplication.UnicodeUTF8))
self.label_11.setText(QtGui.QApplication.translate("fmtomo_parameters", "m", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setText(QtGui.QApplication.translate("fmtomo_parameters", "Top boundary", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setToolTip(QtGui.QApplication.translate("fmtomo_parameters", "Top boundary of the model (must be greater than highest source or receiver position).\n"
"Too low values will cause error.", None, QtGui.QApplication.UnicodeUTF8))
self.label_2.setText(QtGui.QApplication.translate("fmtomo_parameters", "Top boundary [?]", None, QtGui.QApplication.UnicodeUTF8))
self.btop.setText(QtGui.QApplication.translate("fmtomo_parameters", "5", None, QtGui.QApplication.UnicodeUTF8))
self.label_10.setText(QtGui.QApplication.translate("fmtomo_parameters", "m", None, QtGui.QApplication.UnicodeUTF8))
self.label_13.setText(QtGui.QApplication.translate("fmtomo_parameters", "Cushion factor", None, QtGui.QApplication.UnicodeUTF8))
self.label_13.setToolTip(QtGui.QApplication.translate("fmtomo_parameters", "Extension of the model around the maximum values of the receiver grid (X and Y).\n"
"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.cushion.setText(QtGui.QApplication.translate("fmtomo_parameters", "10", 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_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_7.setText(QtGui.QApplication.translate("fmtomo_parameters", "Z", None, QtGui.QApplication.UnicodeUTF8))
self.label_8.setText(QtGui.QApplication.translate("fmtomo_parameters", "Propagation Grid", None, QtGui.QApplication.UnicodeUTF8))
self.label_8.setToolTip(QtGui.QApplication.translate("fmtomo_parameters", "Number of points for forward simulation in X, Y, Z.\n"
"Must be higher than number of inversion grid points.", None, QtGui.QApplication.UnicodeUTF8))
self.label_8.setText(QtGui.QApplication.translate("fmtomo_parameters", "Propagation Grid [?]", None, QtGui.QApplication.UnicodeUTF8))
self.pgrid_x.setText(QtGui.QApplication.translate("fmtomo_parameters", "100", None, QtGui.QApplication.UnicodeUTF8))
self.pgrid_y.setText(QtGui.QApplication.translate("fmtomo_parameters", "100", None, QtGui.QApplication.UnicodeUTF8))
self.pgrid_z.setText(QtGui.QApplication.translate("fmtomo_parameters", "100", None, QtGui.QApplication.UnicodeUTF8))
self.label_9.setText(QtGui.QApplication.translate("fmtomo_parameters", "Inversion Grid", None, QtGui.QApplication.UnicodeUTF8))
self.label_9.setToolTip(QtGui.QApplication.translate("fmtomo_parameters", "Number of inversion grid (velocity grid) points in X, Y, Z.\n"
"Must be lower than for propagation grid.", None, QtGui.QApplication.UnicodeUTF8))
self.label_9.setText(QtGui.QApplication.translate("fmtomo_parameters", "Inversion Grid [?]", None, QtGui.QApplication.UnicodeUTF8))
self.invgrid_x.setText(QtGui.QApplication.translate("fmtomo_parameters", "50", None, QtGui.QApplication.UnicodeUTF8))
self.invgrid_y.setText(QtGui.QApplication.translate("fmtomo_parameters", "50", None, QtGui.QApplication.UnicodeUTF8))
self.invgrid_z.setText(QtGui.QApplication.translate("fmtomo_parameters", "50", None, QtGui.QApplication.UnicodeUTF8))
self.label_15.setToolTip(QtGui.QApplication.translate("fmtomo_parameters", "<!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"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Specifiy simple input velocity file from which linear gradients will be evaluated.</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;\"><span style=\" font-weight:600;\">For example:</span></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;\">First gradient: Surface velocity: 0.5 km/s rising to 1.0 km/s at a depth of 5 m below the surface.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Second gradient: Continuous change to another gradient from 1.0 km/s to 4.0 km/s at 60 m depth below the surface.</p>\n"
"<p align=\"justify\" 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 align=\"justify\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">0 0.5</p>\n"
"<p align=\"justify\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">-5 1.0</p>\n"
"<p align=\"justify\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">-5 1.0</p>\n"
"<p align=\"justify\" style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">-60 4.0</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></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.label_15.setText(QtGui.QApplication.translate("fmtomo_parameters", "Custom velocity\n"
"grid (earthmodel)", None, QtGui.QApplication.UnicodeUTF8))
"grid (earthmodel) [?]", None, QtGui.QApplication.UnicodeUTF8))
self.browse_customgrid.setText(QtGui.QApplication.translate("fmtomo_parameters", "Browse", None, QtGui.QApplication.UnicodeUTF8))
self.label_16.setToolTip(QtGui.QApplication.translate("fmtomo_parameters", "Specifiy directory for FMTOMO simulation.", None, QtGui.QApplication.UnicodeUTF8))
self.label_16.setText(QtGui.QApplication.translate("fmtomo_parameters", "Simulation\n"
"Directory", None, QtGui.QApplication.UnicodeUTF8))
"Directory [?]", None, QtGui.QApplication.UnicodeUTF8))
self.browse_simuldir.setText(QtGui.QApplication.translate("fmtomo_parameters", "Browse", None, QtGui.QApplication.UnicodeUTF8))

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'generate_seisarray_layout.ui'
#
# Created: Thu Jun 23 12:06:35 2016
# Created: Mon Jun 27 13:23:32 2016
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
@ -12,12 +12,14 @@ from PySide import QtCore, QtGui
class Ui_generate_seisarray(object):
def setupUi(self, generate_seisarray):
generate_seisarray.setObjectName("generate_seisarray")
generate_seisarray.resize(400, 220)
generate_seisarray.resize(400, 221)
generate_seisarray.setMinimumSize(QtCore.QSize(400, 220))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("../asp3d_icon.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
generate_seisarray.setWindowIcon(icon)
self.verticalLayout = QtGui.QVBoxLayout(generate_seisarray)
self.verticalLayout_5 = QtGui.QVBoxLayout(generate_seisarray)
self.verticalLayout_5.setObjectName("verticalLayout_5")
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.verticalLayout_4 = QtGui.QVBoxLayout()
self.verticalLayout_4.setObjectName("verticalLayout_4")
@ -79,11 +81,12 @@ class Ui_generate_seisarray(object):
self.horizontalLayout_6.addWidget(self.pushButton_obs)
self.verticalLayout_3.addLayout(self.horizontalLayout_6)
self.verticalLayout.addLayout(self.verticalLayout_3)
self.verticalLayout_5.addLayout(self.verticalLayout)
self.buttonBox = QtGui.QDialogButtonBox(generate_seisarray)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.verticalLayout.addWidget(self.buttonBox)
self.verticalLayout_5.addWidget(self.buttonBox)
self.retranslateUi(generate_seisarray)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), generate_seisarray.reject)
@ -92,10 +95,52 @@ class Ui_generate_seisarray(object):
def retranslateUi(self, generate_seisarray):
generate_seisarray.setWindowTitle(QtGui.QApplication.translate("generate_seisarray", "Generate new Seismic Array", None, QtGui.QApplication.UnicodeUTF8))
self.label_rec.setText(QtGui.QApplication.translate("generate_seisarray", "Measured Receivers", None, QtGui.QApplication.UnicodeUTF8))
self.label_rec.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"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Load receiver input file. The input file must be in the following format:</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;\">Containing in each line, seperated by spaces:</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;\">[trace ID (int)] [receiver line ID (int)] [number of the geophone on receiver line (int)] [X (float)] [Y (float)] [Z (float)]</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;\"><span style=\" font-weight:600;\">For example:</span></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=\" 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.label_rec.setText(QtGui.QApplication.translate("generate_seisarray", "Measured Receivers [?]", None, QtGui.QApplication.UnicodeUTF8))
self.pushButton_rec.setText(QtGui.QApplication.translate("generate_seisarray", "Browse", None, QtGui.QApplication.UnicodeUTF8))
self.label_src.setText(QtGui.QApplication.translate("generate_seisarray", "Measured Sources (optional)", 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"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Load measured sources input file to improve interpolation precision. The input file must be in the following format:</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;\">Containing in each line, seperated by spaces:</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;\">[source ID (int)] [X (float)] [Y (float)] [Z (float)]</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;\"><span style=\" font-weight:600;\">For example:</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Shot number 100 with the coordinates (12.3 [m], 100.5 [m], 20.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=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">100 12.3 100.5 20.3</p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.label_src.setText(QtGui.QApplication.translate("generate_seisarray", "Measured Sources (optional) [?]", None, QtGui.QApplication.UnicodeUTF8))
self.pushButton_src.setText(QtGui.QApplication.translate("generate_seisarray", "Browse", None, QtGui.QApplication.UnicodeUTF8))
self.label_obs.setText(QtGui.QApplication.translate("generate_seisarray", "Additional measured points (optional)", None, QtGui.QApplication.UnicodeUTF8))
self.label_obs.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"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Load measured points input file to improve interpolation precision. The input file must be in the following format:</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;\">Containing in each line, seperated by spaces:</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;\">[point ID (int)] [X (float)] [Y (float)] [Z (float)]</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;\"><span style=\" font-weight:600;\">For example:</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Point number 100 with the coordinates (12.3 [m], 100.5 [m], 20.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=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">100 12.3 100.5 20.3</p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.label_obs.setText(QtGui.QApplication.translate("generate_seisarray", "Additional measured points (optional) [?]", None, QtGui.QApplication.UnicodeUTF8))
self.pushButton_obs.setText(QtGui.QApplication.translate("generate_seisarray", "Browse", None, QtGui.QApplication.UnicodeUTF8))

View File

@ -1,15 +1,15 @@
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'generate_survey.ui'
# Form implementation generated from reading ui file 'generate_survey_layout.ui'
#
# Created: Wed Jun 15 11:56:01 2016
# Created: Mon Jun 27 13:23:33 2016
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_generate_survey(object):
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(380, 160)
@ -62,12 +62,52 @@ class Ui_generate_survey(object):
def retranslateUi(self, Dialog):
Dialog.setWindowTitle(QtGui.QApplication.translate("Dialog", "Generate new Survey", None, QtGui.QApplication.UnicodeUTF8))
self.pushButton_rec.setText(QtGui.QApplication.translate("Dialog", "Browse", None, QtGui.QApplication.UnicodeUTF8))
self.label_rec.setToolTip(QtGui.QApplication.translate("Dialog", "<!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"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Load receiver input file. The input file must be in the following format:</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;\">Containing in each line, seperated by spaces:</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;\">[trace ID (int)] [X (float)] [Y (float)] [Z (float)]</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;\"><span style=\" font-weight:600;\">For example:</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Trace ID 100 with the coordinates (12.3 [m], 100.5 [m], 20.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=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">100 12.3 100.5 20.3</p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.label_rec.setText(QtGui.QApplication.translate("Dialog", "Receiver\n"
"File", None, QtGui.QApplication.UnicodeUTF8))
"File [?]", None, QtGui.QApplication.UnicodeUTF8))
self.label_obs.setToolTip(QtGui.QApplication.translate("Dialog", "<!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"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Specifiy directory containing seismograms for each shot.</p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Currently in the format SEGY with each file named \'shotnumber*_pickle.dat\'.</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;\"><span style=\" font-weight:600;\">For example:</span></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;\">Shot number 100 containing seismograms for all traces with the name:</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;\">100_pickle.dat</p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.label_obs.setText(QtGui.QApplication.translate("Dialog", "Seismogram\n"
"Directory", None, QtGui.QApplication.UnicodeUTF8))
"Directory [?]", None, QtGui.QApplication.UnicodeUTF8))
self.pushButton_obs.setText(QtGui.QApplication.translate("Dialog", "Browse", None, QtGui.QApplication.UnicodeUTF8))
self.label_src.setToolTip(QtGui.QApplication.translate("Dialog", "<!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"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'Sans\'; font-size:10pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Load sources input file. The input file must be in the following format:</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;\">Containing in each line, seperated by spaces:</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;\">[trace ID (int)] [X (float)] [Y (float)] [Z (float)]</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;\"><span style=\" font-weight:600;\">For example:</span></p>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Source number 100 with the coordinates (12.3 [m], 100.5 [m], 20.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=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">100 12.3 100.5 20.3</p></body></html>", None, QtGui.QApplication.UnicodeUTF8))
self.label_src.setText(QtGui.QApplication.translate("Dialog", "Source\n"
"File", None, QtGui.QApplication.UnicodeUTF8))
"File [?]", None, QtGui.QApplication.UnicodeUTF8))
self.pushButton_src.setText(QtGui.QApplication.translate("Dialog", "Browse", None, QtGui.QApplication.UnicodeUTF8))

View File

@ -2,7 +2,7 @@
# Form implementation generated from reading ui file 'picking_parameters_layout.ui'
#
# Created: Fri Jun 17 13:06:08 2016
# Created: Mon Jun 27 13:23:33 2016
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!

View File

@ -155,7 +155,7 @@ def cleanUp(survey):
for shot in survey.data.values():
shot.traces4plot = {}
def plotScatterStats4Shots(survey, variable):
def plotScatterStats4Shots(survey, variable, ax = None):
"""
Statistics, scatter plot.
@ -178,7 +178,9 @@ def plotScatterStats4Shots(survey, variable):
'SPE': [],
'picked traces': 0}
statsShot[shot]['SNR'].append(shot.getSNR(traceID)[0])
SNR = shot.getSNR(traceID)[0]
if not SNR == np.inf:
statsShot[shot]['SNR'].append(SNR)
if shot.getPickFlag(traceID) == 1:
statsShot[shot]['picked traces'] += 1
statsShot[shot]['SPE'].append(shot.getSymmetricPickError(traceID))
@ -194,18 +196,22 @@ def plotScatterStats4Shots(survey, variable):
y.append(statsShot[shot]['y'])
value.append(statsShot[shot][variable])
fig = plt.figure()
ax = fig.add_subplot(111)
if ax is None:
fig = plt.figure()
ax = fig.add_subplot(111)
size = []
for val in value:
size.append(100 * val / max(value))
sc = ax.scatter(x, y, s=size, c=value)
plt.title('Plot of all shots')
plt.xlabel('X')
plt.ylabel('Y')
cbar = plt.colorbar(sc)
ax.text(0.5, 1.05,'Plot of all shots',
horizontalalignment='center', verticalalignment='center',
transform=ax.transAxes)
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_aspect('equal')
cbar = ax.figure.colorbar(sc)
cbar.set_label(variable)
for shot in statsShot.keys():
@ -213,7 +219,7 @@ def plotScatterStats4Shots(survey, variable):
fontsize='x-small', color='k')
def plotScatterStats4Receivers(survey, variable):
def plotScatterStats4Receivers(survey, variable, ax = None):
"""
Statistics, scatter plot.
@ -236,7 +242,9 @@ def plotScatterStats4Receivers(survey, variable):
'SPE': [],
'picked traces': 0}
statsRec[traceID]['SNR'].append(shot.getSNR(traceID)[0])
SNR = shot.getSNR(traceID)[0]
if not SNR == np.inf:
statsRec[traceID]['SNR'].append(SNR)
if shot.getPickFlag(traceID) == 1:
statsRec[traceID]['picked traces'] += 1
statsRec[traceID]['SPE'].append(shot.getSymmetricPickError(traceID))
@ -252,18 +260,22 @@ def plotScatterStats4Receivers(survey, variable):
y.append(statsRec[traceID]['y'])
value.append(statsRec[traceID][variable])
fig = plt.figure()
ax = fig.add_subplot(111)
if ax is None:
fig = plt.figure()
ax = fig.add_subplot(111)
size = []
for val in value:
size.append(100 * val / max(value))
sc = ax.scatter(x, y, s=size, c=value)
plt.title('Plot of all receivers')
plt.xlabel('X')
plt.ylabel('Y')
cbar = plt.colorbar(sc)
ax.text(0.5, 1.05,'Plot of all receivers',
horizontalalignment='center', verticalalignment='center',
transform=ax.transAxes)
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_aspect('equal')
cbar = ax.figure.colorbar(sc)
cbar.set_label(variable)
shot = survey.data.values()[0]