Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
sebastianp 2016-07-13 11:00:51 +02:00
commit 6fd1f9e2cc
10 changed files with 62 additions and 46 deletions

View File

@ -74,7 +74,7 @@ class Survey(object):
self._coordsFromSeisArray() self._coordsFromSeisArray()
else: else:
self._coordsFromFiles() self._coordsFromFiles()
self.loadArray(self._obsdir, self._recile, self._sourcefile) self.loadArray(self._obsdir, self._recfile, self._sourcefile)
for shotnumber in self.data.keys(): for shotnumber in self.data.keys():
shot = self.data[shotnumber] shot = self.data[shotnumber]
shot.setShotnumber(shotnumber) shot.setShotnumber(shotnumber)
@ -91,7 +91,7 @@ class Survey(object):
#fileending = '.sg2' #fileending = '.sg2'
if fend == None: if fend == None:
fend = '_pickle.dat' fend = '_pickle.dat'
obsfile = fstart + os.path.join(self._obsdir, str(shotnumber)) + fend obsfile = os.path.join(self._obsdir, fstart + str(shotnumber)) + fend
if obsfile not in shot_dict.keys(): if obsfile not in shot_dict.keys():
shot_dict[shotnumber] = [] shot_dict[shotnumber] = []
shot_dict[shotnumber] = seismicshot.SeismicShot(obsfile) shot_dict[shotnumber] = seismicshot.SeismicShot(obsfile)

View File

@ -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 14:03:29 2016 # Created: Tue Jul 12 21:41:12 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!

View File

@ -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 14:03:29 2016 # Created: Tue Jul 12 21:41:12 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!
@ -105,8 +105,10 @@ class Ui_fmtomo_parameters(object):
self.label_13 = QtGui.QLabel(fmtomo_parameters) self.label_13 = QtGui.QLabel(fmtomo_parameters)
self.label_13.setObjectName("label_13") self.label_13.setObjectName("label_13")
self.horizontalLayout.addWidget(self.label_13) self.horizontalLayout.addWidget(self.label_13)
self.cushion = QtGui.QLineEdit(fmtomo_parameters) self.cushion = QtGui.QSpinBox(fmtomo_parameters)
self.cushion.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.cushion.setMinimum(2)
self.cushion.setMaximum(100)
self.cushion.setProperty("value", 10)
self.cushion.setObjectName("cushion") self.cushion.setObjectName("cushion")
self.horizontalLayout.addWidget(self.cushion) self.horizontalLayout.addWidget(self.cushion)
self.label_12 = QtGui.QLabel(fmtomo_parameters) self.label_12 = QtGui.QLabel(fmtomo_parameters)
@ -159,34 +161,46 @@ class Ui_fmtomo_parameters(object):
self.label_7.setAlignment(QtCore.Qt.AlignCenter) self.label_7.setAlignment(QtCore.Qt.AlignCenter)
self.label_7.setObjectName("label_7") self.label_7.setObjectName("label_7")
self.gridLayout.addWidget(self.label_7, 0, 3, 1, 1) self.gridLayout.addWidget(self.label_7, 0, 3, 1, 1)
self.label_8 = QtGui.QLabel(fmtomo_parameters)
self.label_8.setObjectName("label_8")
self.gridLayout.addWidget(self.label_8, 1, 0, 1, 1)
self.pgrid_x = QtGui.QLineEdit(fmtomo_parameters)
self.pgrid_x.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.pgrid_x.setObjectName("pgrid_x")
self.gridLayout.addWidget(self.pgrid_x, 1, 1, 1, 1)
self.pgrid_y = QtGui.QLineEdit(fmtomo_parameters)
self.pgrid_y.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.pgrid_y.setObjectName("pgrid_y")
self.gridLayout.addWidget(self.pgrid_y, 1, 2, 1, 1)
self.pgrid_z = QtGui.QLineEdit(fmtomo_parameters)
self.pgrid_z.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.pgrid_z.setObjectName("pgrid_z")
self.gridLayout.addWidget(self.pgrid_z, 1, 3, 1, 1)
self.label_9 = QtGui.QLabel(fmtomo_parameters) self.label_9 = QtGui.QLabel(fmtomo_parameters)
self.label_9.setObjectName("label_9") self.label_9.setObjectName("label_9")
self.gridLayout.addWidget(self.label_9, 2, 0, 1, 1) self.gridLayout.addWidget(self.label_9, 2, 0, 1, 1)
self.invgrid_x = QtGui.QLineEdit(fmtomo_parameters) self.pgrid_x = QtGui.QSpinBox(fmtomo_parameters)
self.invgrid_x.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.pgrid_x.setMinimum(2)
self.pgrid_x.setMaximum(10000)
self.pgrid_x.setProperty("value", 100)
self.pgrid_x.setObjectName("pgrid_x")
self.gridLayout.addWidget(self.pgrid_x, 1, 1, 1, 1)
self.pgrid_y = QtGui.QSpinBox(fmtomo_parameters)
self.pgrid_y.setMinimum(2)
self.pgrid_y.setMaximum(10000)
self.pgrid_y.setProperty("value", 100)
self.pgrid_y.setObjectName("pgrid_y")
self.gridLayout.addWidget(self.pgrid_y, 1, 2, 1, 1)
self.pgrid_z = QtGui.QSpinBox(fmtomo_parameters)
self.pgrid_z.setMinimum(2)
self.pgrid_z.setMaximum(10000)
self.pgrid_z.setProperty("value", 120)
self.pgrid_z.setObjectName("pgrid_z")
self.gridLayout.addWidget(self.pgrid_z, 1, 3, 1, 1)
self.label_8 = QtGui.QLabel(fmtomo_parameters)
self.label_8.setObjectName("label_8")
self.gridLayout.addWidget(self.label_8, 1, 0, 1, 1)
self.invgrid_x = QtGui.QSpinBox(fmtomo_parameters)
self.invgrid_x.setMinimum(2)
self.invgrid_x.setMaximum(10000)
self.invgrid_x.setProperty("value", 60)
self.invgrid_x.setObjectName("invgrid_x") self.invgrid_x.setObjectName("invgrid_x")
self.gridLayout.addWidget(self.invgrid_x, 2, 1, 1, 1) self.gridLayout.addWidget(self.invgrid_x, 2, 1, 1, 1)
self.invgrid_y = QtGui.QLineEdit(fmtomo_parameters) self.invgrid_y = QtGui.QSpinBox(fmtomo_parameters)
self.invgrid_y.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.invgrid_y.setMinimum(2)
self.invgrid_y.setMaximum(10000)
self.invgrid_y.setProperty("value", 60)
self.invgrid_y.setObjectName("invgrid_y") self.invgrid_y.setObjectName("invgrid_y")
self.gridLayout.addWidget(self.invgrid_y, 2, 2, 1, 1) self.gridLayout.addWidget(self.invgrid_y, 2, 2, 1, 1)
self.invgrid_z = QtGui.QLineEdit(fmtomo_parameters) self.invgrid_z = QtGui.QSpinBox(fmtomo_parameters)
self.invgrid_z.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) self.invgrid_z.setMinimum(2)
self.invgrid_z.setMaximum(10000)
self.invgrid_z.setProperty("value", 80)
self.invgrid_z.setObjectName("invgrid_z") self.invgrid_z.setObjectName("invgrid_z")
self.gridLayout.addWidget(self.invgrid_z, 2, 3, 1, 1) self.gridLayout.addWidget(self.invgrid_z, 2, 3, 1, 1)
self.verticalLayout.addLayout(self.gridLayout) self.verticalLayout.addLayout(self.gridLayout)
@ -255,24 +269,17 @@ class Ui_fmtomo_parameters(object):
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" 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)) "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.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_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 Ponts", 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))
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.setToolTip(QtGui.QApplication.translate("fmtomo_parameters", "Number of inversion grid (velocity grid) points in X, Y, Z.\n" 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)) "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.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.label_8.setToolTip(QtGui.QApplication.translate("fmtomo_parameters", "Number of points for forward simulation in X, Y, Z.\n"
self.invgrid_y.setText(QtGui.QApplication.translate("fmtomo_parameters", "50", None, QtGui.QApplication.UnicodeUTF8)) "Must be higher than number of inversion grid points.", None, QtGui.QApplication.UnicodeUTF8))
self.invgrid_z.setText(QtGui.QApplication.translate("fmtomo_parameters", "50", None, QtGui.QApplication.UnicodeUTF8)) self.label_8.setText(QtGui.QApplication.translate("fmtomo_parameters", "Propagation Grid [?]", 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" 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" "<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n" "p, li { white-space: pre-wrap; }\n"

View File

@ -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 14:03:29 2016 # Created: Tue Jul 12 21:41:13 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!

View File

@ -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 14:03:29 2016 # Created: Tue Jul 12 21:41:13 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!

View File

@ -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 14:03:29 2016 # Created: Tue Jul 12 21:41:13 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!

View File

@ -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 14:03:30 2016 # Created: Tue Jul 12 21:41:13 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!
@ -171,7 +171,7 @@ class Ui_picking_parameters(object):
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))
self.label_4.setToolTip(QtGui.QApplication.translate("picking_parameters", "Value between 0 and 1 for threshold picking algorithm (Default = 60%).", None, QtGui.QApplication.UnicodeUTF8)) self.label_4.setToolTip(QtGui.QApplication.translate("picking_parameters", "Value between 1 and 100 % for threshold picking algorithm (Default = 60%).", None, QtGui.QApplication.UnicodeUTF8))
self.label_4.setText(QtGui.QApplication.translate("picking_parameters", "Fraction of local maximum [?]", None, QtGui.QApplication.UnicodeUTF8)) self.label_4.setText(QtGui.QApplication.translate("picking_parameters", "Fraction of local maximum [?]", None, QtGui.QApplication.UnicodeUTF8))
self.label_folm.setText(QtGui.QApplication.translate("picking_parameters", "60 %", None, QtGui.QApplication.UnicodeUTF8)) self.label_folm.setText(QtGui.QApplication.translate("picking_parameters", "60 %", None, QtGui.QApplication.UnicodeUTF8))
self.label_5.setToolTip(QtGui.QApplication.translate("picking_parameters", "Use additional Akaike Information Criterion for picking.", None, QtGui.QApplication.UnicodeUTF8)) self.label_5.setToolTip(QtGui.QApplication.translate("picking_parameters", "Use additional Akaike Information Criterion for picking.", None, QtGui.QApplication.UnicodeUTF8))

View File

@ -604,9 +604,9 @@ class SeisArray(object):
cushionTheta = abs(theta_max - theta_min) * cushionfactor cushionTheta = abs(theta_max - theta_min) * cushionfactor
# 2D Case only: # 2D Case only:
if cushionPhi == 0.: if cushionPhi == 0.:
cushionPhi = 0.05 cushionPhi = 0.1
if cushionTheta == 0.: if cushionTheta == 0.:
cushionTheta = 0.05 cushionTheta = 0.1
phiWE = (phi_min - cushionPhi, phi_max + cushionPhi) phiWE = (phi_min - cushionPhi, phi_max + cushionPhi)
thetaSN = (theta_min - cushionTheta, theta_max + cushionTheta) thetaSN = (theta_min - cushionTheta, theta_max + cushionTheta)
return thetaSN, phiWE return thetaSN, phiWE
@ -649,6 +649,11 @@ class SeisArray(object):
thetaSN, phiWE = self.getThetaPhiFromArray(cushionfactor) thetaSN, phiWE = self.getThetaPhiFromArray(cushionfactor)
# +2 cushion nodes
nTheta += 2
nPhi += 2
nR += 2
thetaS = thetaSN[0] + cushionpropgrid thetaS = thetaSN[0] + cushionpropgrid
thetaN = thetaSN[1] - cushionpropgrid thetaN = thetaSN[1] - cushionpropgrid
phiW = phiWE[0] + cushionpropgrid phiW = phiWE[0] + cushionpropgrid

View File

@ -97,7 +97,7 @@ def setDynamicFittedSNR(shot_dict, shiftdist=30, shiftSNR=100, p1=0.004, p2=-0.0
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
snrthreshold = (1 / (fit_fn(dist) ** 2)) - shiftSNR * np.exp(-0.05 * dist) snrthreshold = snr_fit_func(fit_fn, dist, shiftSNR)
if snrthreshold < minSNR: if snrthreshold < minSNR:
print('WARNING: SNR threshold %s lower %s. Set SNR threshold to %s.' print('WARNING: SNR threshold %s lower %s. Set SNR threshold to %s.'
% (snrthreshold, minSNR, minSNR)) % (snrthreshold, minSNR, minSNR))
@ -106,6 +106,10 @@ def setDynamicFittedSNR(shot_dict, shiftdist=30, shiftSNR=100, p1=0.004, p2=-0.0
shot.setSNRthreshold(traceID, snrthreshold) shot.setSNRthreshold(traceID, snrthreshold)
print("setDynamicFittedSNR: Finished setting of fitted SNR-threshold") print("setDynamicFittedSNR: Finished setting of fitted SNR-threshold")
def snr_fit_func(fit_fn, dist, shiftSNR):
import numpy as np
snrthreshold = (1 / (fit_fn(dist) ** 2)) - shiftSNR * np.exp(-0.05 * dist)
return snrthreshold
def setConstantSNR(shot_dict, snrthreshold=2.5): def setConstantSNR(shot_dict, snrthreshold=2.5):
""" """

View File

@ -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 14:03:30 2016 # Created: Tue Jul 12 21:41:13 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!