How to use pinchout method in ATX

Best Python code snippet using ATX

toolUI.py

Source:toolUI.py Github

copy

Full Screen

1# -*- coding: utf-8 -*-2# Form implementation generated from reading ui file 'toolkit_ui.ui'3#4# Created by: PyQt5 UI code generator 5.12.15#6# WARNING! All changes made in this file will be lost!7from PyQt5 import QtCore, QtGui, QtWidgets8class Ui_Dialog(object):9 def setupUi(self, Dialog):10 Dialog.setObjectName("Dialog")11 Dialog.resize(104, 461)12 sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)13 sizePolicy.setHorizontalStretch(5)14 sizePolicy.setVerticalStretch(1)15 sizePolicy.setHeightForWidth(Dialog.sizePolicy().hasHeightForWidth())16 Dialog.setSizePolicy(sizePolicy)17 Dialog.setMinimumSize(QtCore.QSize(30, 340))18 Dialog.setMaximumSize(QtCore.QSize(104, 600))19 Dialog.setBaseSize(QtCore.QSize(30, 403))20 Dialog.setWindowTitle("guiscrcpy")21 icon = QtGui.QIcon()22 icon.addPixmap(QtGui.QPixmap(":/res/ui/guiscrcpy_logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)23 Dialog.setWindowIcon(icon)24 Dialog.setWindowOpacity(1.0)25 Dialog.setStyleSheet("QDialog{\n"26"width: 30px\n"27"}\n"28"QPushButton {\n"29" \n"30"\n"31"border-radius: 1px;\n"32" background-color: qlineargradient(spread:pad, x1:0, y1:0.915182, x2:0, y2:0.926, stop:0.897059 rgba(41, 41, 41, 255), stop:1 rgba(30, 30, 30, 255));\n"33"color: rgb(0, 0, 0);\n"34" \n"35" }\n"36"\n"37"QPushButton:pressed {\n"38"border-radius: 5px;\n"39" \n"40"background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(0, 255, 255, 255), stop:1 rgba(0, 255, 152, 255));\n"41"color: rgb(0, 0, 0);\n"42" }\n"43"QPushButton:hover {\n"44"border-radius: 5px;\n"45" \n"46" background-color: qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:1, stop:0 rgba(0, 199, 199, 255), stop:1 rgba(0, 190, 113, 255));\n"47"color: rgb(0, 0, 0);\n"48" }\n"49"")50 self.notif_collapse = QtWidgets.QPushButton(Dialog)51 self.notif_collapse.setEnabled(True)52 self.notif_collapse.setGeometry(QtCore.QRect(0, 75, 30, 25))53 self.notif_collapse.setMouseTracking(True)54 self.notif_collapse.setTabletTracking(True)55 self.notif_collapse.setAutoFillBackground(False)56 self.notif_collapse.setStyleSheet("")57 self.notif_collapse.setText("")58 icon1 = QtGui.QIcon()59 icon1.addPixmap(QtGui.QPixmap(":/icons/icons/bell-musical-tool(2).svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)60 self.notif_collapse.setIcon(icon1)61 self.notif_collapse.setFlat(True)62 self.notif_collapse.setObjectName("notif_collapse")63 self.menuUI = QtWidgets.QPushButton(Dialog)64 self.menuUI.setEnabled(True)65 self.menuUI.setGeometry(QtCore.QRect(0, 275, 30, 25))66 self.menuUI.setMouseTracking(True)67 self.menuUI.setTabletTracking(True)68 self.menuUI.setAutoFillBackground(False)69 self.menuUI.setStyleSheet("")70 self.menuUI.setText("")71 icon2 = QtGui.QIcon()72 icon2.addPixmap(QtGui.QPixmap(":/icons/icons/reorder-option.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)73 self.menuUI.setIcon(icon2)74 self.menuUI.setFlat(True)75 self.menuUI.setObjectName("menuUI")76 self.appswi = QtWidgets.QPushButton(Dialog)77 self.appswi.setEnabled(True)78 self.appswi.setGeometry(QtCore.QRect(0, 300, 30, 25))79 self.appswi.setMouseTracking(True)80 self.appswi.setTabletTracking(True)81 self.appswi.setAutoFillBackground(False)82 self.appswi.setStyleSheet("")83 self.appswi.setText("")84 icon3 = QtGui.QIcon()85 icon3.addPixmap(QtGui.QPixmap(":/icons/icons/four-black-squares.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)86 self.appswi.setIcon(icon3)87 self.appswi.setFlat(True)88 self.appswi.setObjectName("appswi")89 self.pinchoutUI = QtWidgets.QPushButton(Dialog)90 self.pinchoutUI.setEnabled(False)91 self.pinchoutUI.setGeometry(QtCore.QRect(0, 350, 30, 25))92 self.pinchoutUI.setStyleSheet("")93 self.pinchoutUI.setText("")94 icon4 = QtGui.QIcon()95 icon4.addPixmap(QtGui.QPixmap(":/icons/icons/zoom-out.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)96 self.pinchoutUI.setIcon(icon4)97 self.pinchoutUI.setFlat(True)98 self.pinchoutUI.setObjectName("pinchoutUI")99 self.screenfreeze = QtWidgets.QPushButton(Dialog)100 self.screenfreeze.setEnabled(True)101 self.screenfreeze.setGeometry(QtCore.QRect(0, 0, 30, 25))102 self.screenfreeze.setMouseTracking(True)103 self.screenfreeze.setTabletTracking(True)104 self.screenfreeze.setAutoFillBackground(False)105 self.screenfreeze.setStyleSheet("")106 self.screenfreeze.setText("")107 icon5 = QtGui.QIcon()108 icon5.addPixmap(QtGui.QPixmap(":/icons/icons/cross-mark-on-a-black-circle-background.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)109 self.screenfreeze.setIcon(icon5)110 self.screenfreeze.setFlat(True)111 self.screenfreeze.setObjectName("screenfreeze")112 self.back = QtWidgets.QPushButton(Dialog)113 self.back.setEnabled(True)114 self.back.setGeometry(QtCore.QRect(0, 250, 30, 25))115 self.back.setMouseTracking(True)116 self.back.setTabletTracking(True)117 self.back.setAutoFillBackground(False)118 self.back.setStyleSheet("")119 self.back.setText("")120 icon6 = QtGui.QIcon()121 icon6.addPixmap(QtGui.QPixmap(":/icons/icons/chevron-sign-left.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)122 self.back.setIcon(icon6)123 self.back.setFlat(True)124 self.back.setObjectName("back")125 self.notif_pull = QtWidgets.QPushButton(Dialog)126 self.notif_pull.setEnabled(True)127 self.notif_pull.setGeometry(QtCore.QRect(0, 50, 30, 25))128 self.notif_pull.setMouseTracking(True)129 self.notif_pull.setTabletTracking(True)130 self.notif_pull.setAutoFillBackground(False)131 self.notif_pull.setStyleSheet("")132 self.notif_pull.setText("")133 icon7 = QtGui.QIcon()134 icon7.addPixmap(QtGui.QPixmap(":/icons/icons/bell-musical-tool.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)135 self.notif_pull.setIcon(icon7)136 self.notif_pull.setFlat(True)137 self.notif_pull.setObjectName("notif_pull")138 self.powerUI = QtWidgets.QPushButton(Dialog)139 self.powerUI.setEnabled(True)140 self.powerUI.setGeometry(QtCore.QRect(0, 200, 30, 25))141 self.powerUI.setMouseTracking(True)142 self.powerUI.setTabletTracking(True)143 self.powerUI.setAutoFillBackground(False)144 self.powerUI.setStyleSheet("")145 self.powerUI.setText("")146 icon8 = QtGui.QIcon()147 icon8.addPixmap(QtGui.QPixmap(":/icons/icons/power.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)148 self.powerUI.setIcon(icon8)149 self.powerUI.setIconSize(QtCore.QSize(16, 16))150 self.powerUI.setCheckable(False)151 self.powerUI.setFlat(True)152 self.powerUI.setObjectName("powerUI")153 self.pinchinUI = QtWidgets.QPushButton(Dialog)154 self.pinchinUI.setEnabled(False)155 self.pinchinUI.setGeometry(QtCore.QRect(0, 325, 30, 25))156 self.pinchinUI.setStyleSheet("")157 self.pinchinUI.setText("")158 icon9 = QtGui.QIcon()159 icon9.addPixmap(QtGui.QPixmap(":/icons/icons/zoom-in.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)160 self.pinchinUI.setIcon(icon9)161 self.pinchinUI.setFlat(True)162 self.pinchinUI.setObjectName("pinchinUI")163 self.clipD2PC = QtWidgets.QPushButton(Dialog)164 self.clipD2PC.setEnabled(True)165 self.clipD2PC.setGeometry(QtCore.QRect(0, 100, 30, 25))166 self.clipD2PC.setMouseTracking(True)167 self.clipD2PC.setTabletTracking(True)168 self.clipD2PC.setAutoFillBackground(False)169 self.clipD2PC.setStyleSheet("")170 self.clipD2PC.setText("")171 icon10 = QtGui.QIcon()172 icon10.addPixmap(QtGui.QPixmap(":/icons/icons/copy-document.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)173 self.clipD2PC.setIcon(icon10)174 self.clipD2PC.setFlat(True)175 self.clipD2PC.setObjectName("clipD2PC")176 self.potraitUI = QtWidgets.QPushButton(Dialog)177 self.potraitUI.setEnabled(True)178 self.potraitUI.setGeometry(QtCore.QRect(0, 375, 30, 25))179 self.potraitUI.setToolTipDuration(2)180 self.potraitUI.setStyleSheet("")181 self.potraitUI.setText("")182 icon11 = QtGui.QIcon()183 icon11.addPixmap(QtGui.QPixmap(":/icons/icons/vertical-resizing-option.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)184 self.potraitUI.setIcon(icon11)185 self.potraitUI.setFlat(True)186 self.potraitUI.setObjectName("potraitUI")187 self.landscapeUI = QtWidgets.QPushButton(Dialog)188 self.landscapeUI.setEnabled(True)189 self.landscapeUI.setGeometry(QtCore.QRect(0, 400, 30, 25))190 self.landscapeUI.setToolTipDuration(2)191 self.landscapeUI.setStyleSheet("")192 self.landscapeUI.setText("")193 icon12 = QtGui.QIcon()194 icon12.addPixmap(QtGui.QPixmap(":/icons/icons/horizontal-resize-option.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)195 self.landscapeUI.setIcon(icon12)196 self.landscapeUI.setFlat(True)197 self.landscapeUI.setObjectName("landscapeUI")198 self.home = QtWidgets.QPushButton(Dialog)199 self.home.setEnabled(True)200 self.home.setGeometry(QtCore.QRect(0, 225, 30, 25))201 self.home.setMouseTracking(True)202 self.home.setTabletTracking(True)203 self.home.setAutoFillBackground(False)204 self.home.setStyleSheet("")205 self.home.setText("")206 icon13 = QtGui.QIcon()207 icon13.addPixmap(QtGui.QPixmap(":/icons/icons/home.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)208 self.home.setIcon(icon13)209 self.home.setFlat(True)210 self.home.setObjectName("home")211 self.vup = QtWidgets.QPushButton(Dialog)212 self.vup.setEnabled(True)213 self.vup.setGeometry(QtCore.QRect(0, 150, 30, 25))214 self.vup.setMouseTracking(True)215 self.vup.setTabletTracking(True)216 self.vup.setAutoFillBackground(False)217 self.vup.setStyleSheet("")218 self.vup.setText("")219 icon14 = QtGui.QIcon()220 icon14.addPixmap(QtGui.QPixmap(":/icons/icons/volume-up-interface-symbol.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)221 self.vup.setIcon(icon14)222 self.vup.setFlat(True)223 self.vup.setObjectName("vup")224 self.vdown = QtWidgets.QPushButton(Dialog)225 self.vdown.setEnabled(True)226 self.vdown.setGeometry(QtCore.QRect(0, 175, 30, 25))227 self.vdown.setMouseTracking(True)228 self.vdown.setTabletTracking(True)229 self.vdown.setAutoFillBackground(False)230 self.vdown.setStyleSheet("")231 self.vdown.setText("")232 icon15 = QtGui.QIcon()233 icon15.addPixmap(QtGui.QPixmap(":/icons/icons/reduced-volume.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)234 self.vdown.setIcon(icon15)235 self.vdown.setFlat(True)236 self.vdown.setObjectName("vdown")237 self.fullscreenUI = QtWidgets.QPushButton(Dialog)238 self.fullscreenUI.setEnabled(True)239 self.fullscreenUI.setGeometry(QtCore.QRect(0, 25, 30, 25))240 self.fullscreenUI.setMouseTracking(True)241 self.fullscreenUI.setTabletTracking(True)242 self.fullscreenUI.setAutoFillBackground(False)243 self.fullscreenUI.setStyleSheet("")244 self.fullscreenUI.setText("")245 icon16 = QtGui.QIcon()246 icon16.addPixmap(QtGui.QPixmap(":/icons/icons/increase-size-option.svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)247 self.fullscreenUI.setIcon(icon16)248 self.fullscreenUI.setFlat(True)249 self.fullscreenUI.setObjectName("fullscreenUI")250 self.clipPC2D = QtWidgets.QPushButton(Dialog)251 self.clipPC2D.setEnabled(True)252 self.clipPC2D.setGeometry(QtCore.QRect(0, 125, 30, 25))253 self.clipPC2D.setMouseTracking(True)254 self.clipPC2D.setTabletTracking(True)255 self.clipPC2D.setAutoFillBackground(False)256 self.clipPC2D.setStyleSheet("")257 self.clipPC2D.setText("")258 icon17 = QtGui.QIcon()259 icon17.addPixmap(QtGui.QPixmap(":/icons/icons/copy-document(1).svg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)260 self.clipPC2D.setIcon(icon17)261 self.clipPC2D.setFlat(True)262 self.clipPC2D.setObjectName("clipPC2D")263 self.label = QtWidgets.QLabel(Dialog)264 self.label.setGeometry(QtCore.QRect(0, 410, 31, 41))265 font = QtGui.QFont()266 font.setPointSize(18)267 font.setBold(True)268 font.setWeight(75)269 self.label.setFont(font)270 self.label.setScaledContents(True)271 self.label.setAlignment(QtCore.Qt.AlignCenter)272 self.label.setObjectName("label")273 self.label_2 = QtWidgets.QLabel(Dialog)274 self.label_2.setGeometry(QtCore.QRect(0, 420, 31, 41))275 font = QtGui.QFont()276 font.setPointSize(18)277 font.setBold(True)278 font.setWeight(75)279 self.label_2.setFont(font)280 self.label_2.setScaledContents(True)281 self.label_2.setAlignment(QtCore.Qt.AlignCenter)282 self.label_2.setObjectName("label_2")283 self.notif_collapse.raise_()284 self.menuUI.raise_()285 self.appswi.raise_()286 self.pinchoutUI.raise_()287 self.screenfreeze.raise_()288 self.back.raise_()289 self.notif_pull.raise_()290 self.powerUI.raise_()291 self.pinchinUI.raise_()292 self.clipD2PC.raise_()293 self.potraitUI.raise_()294 self.home.raise_()295 self.vup.raise_()296 self.vdown.raise_()297 self.fullscreenUI.raise_()298 self.clipPC2D.raise_()299 self.label.raise_()300 self.label_2.raise_()301 self.landscapeUI.raise_()302 self.retranslateUi(Dialog)303 QtCore.QMetaObject.connectSlotsByName(Dialog)304 def retranslateUi(self, Dialog):305 _translate = QtCore.QCoreApplication.translate306 self.notif_collapse.setToolTip(_translate("Dialog", "Expand notification panel"))307 self.menuUI.setToolTip(_translate("Dialog", "Menu key"))308 self.appswi.setToolTip(_translate("Dialog", "press the APP_SWITCH button"))309 self.pinchoutUI.setToolTip(_translate("Dialog", "Pinch out in the screen"))310 self.back.setToolTip(_translate("Dialog", "Back key"))311 self.notif_pull.setToolTip(_translate("Dialog", "Expand notification panel"))312 self.powerUI.setToolTip(_translate("Dialog", "Power on/off"))313 self.pinchinUI.setToolTip(_translate("Dialog", "Pinch in the screen"))314 self.clipD2PC.setToolTip(_translate("Dialog", "Copy device clipbioard to PC"))315 self.potraitUI.setToolTip(_translate("Dialog", "Potrait"))316 self.landscapeUI.setToolTip(_translate("Dialog", "Landscape"))317 self.home.setToolTip(_translate("Dialog", "Home key"))318 self.vup.setToolTip(_translate("Dialog", "Volume Up"))319 self.fullscreenUI.setToolTip(_translate("Dialog", "Fullscreen"))320 self.clipPC2D.setToolTip(_translate("Dialog", "Copy PC clipboard to Device"))321 self.label.setText(_translate("Dialog", "...."))322 self.label_2.setText(_translate("Dialog", "...."))...

Full Screen

Full Screen

settings.py

Source:settings.py Github

copy

Full Screen

1# -*- coding: utf-8 -*- 2import re3import sys4import time5from lettuce import *6from uiautomator.myDevice import device as d7from lettuce.regex import *8#作者提供的 False为un-freeze rotation有误9#Fasle为打开自动旋转,默认为关闭自动旋转10@step(u'打开自动旋转屏幕$')11def freezeRotation(step):12 d.freeze_rotation(False)13 d.wait.idle()14@step(u'关闭自动旋转屏幕$')15def freezeRotation(step):16 d.freeze_rotation()17 d.wait.idle() 18@step(u'点亮屏幕$')19def screenon(step):20 d.screen.on()21 d.wait.idle() 22@step(u'熄灭屏幕$')23def screenoff(step):24 d.screen.off()25 d.wait.idle() 26 27#保存.xml到相对路径28#用法举例:29#保存在当前lettuce执行目录下,文件名字为layout.xml30# 下载界面结构文件保存为【layout.xml】31# 下载界面结构文件保存为【./layout.xml】32#保存在当前lettuce执行目录下的tools目录下,文件名字为layout.xml33# 下载界面结构文件保存为【tools/layout.xml】34# 下载界面结构文件保存为【./tools/layout.xml】35@step(u'下载界面结构文件保存为【%s】$' % (mode_text))36def dumpHierarchy(step,path):37 d.dump(path)38 d.wait.idle() 39# open notification, can not work until Android 4.3. 40@step(u'打开通知栏$')41def oepnNotification(step):42 d.open("notification")43 d.wait.idle() 44# open quick settings, can not work until Android 4.3. 45@step(u'打开快速设置$')46def oepnQuickSetting(step):47 d.open.quick_settings()48 d.wait.idle()49 50@step(u'等待窗口空闲$')51def waitForIdle(step):52 d.wait.idle()53@step(u'等待窗口空闲超时时间【%s】毫秒$' % (mode_int))54def waitForIdle(step, time):55 d.wait.idle(timeout=time)56#支持页面元素resourceId等57@step(u'清除页面元素【%s】中的文字$' % (mode_pvs))58def clearTextField(step, cond):59 elements = get_dict_from_cond(cond)60 d(**elements).clear_text() 61 d.wait.idle()62@step(u'在页面元素【%s】添加文本【%s】$' % (mode_pvs, mode_text))63def setText(step, cond, text):64 elements = get_dict_from_cond(cond)65 d(**elements).set_text(text)66 d.wait.idle()67 68@step(u'从两点【%s】和【%s】分别滑动至另外两点【%s】和【%s】$' % (mode_position,mode_position,mode_position,mode_position))69def gesture(step, sx1, sy1, sx2, sy2, ex1, ey1, ex2, ey2):70 d(className="android.widget.EditText").gesture((sx1, sy1), (sx2, sy2)) \71 .to((ex1, ey1), (ex2, ey2)) 72 d.wait.idle()73 74# notes : pinch can not be set until Android 4.3.75@step(u'从左右边缘同时滑向中心$')76def pinchIn(step):77 d().pinch.In(percent=100, steps=10)78 d.wait.idle()79@step(u'从中心同时滑向左右两边$')80def pinchOut(step):81 d().pinch.Out(percent=100, steps=10)82 d.wait.idle()83@step(u'分别以左右距边缘位置百分之【%s】处,按照步长【%s】同时滑向中心$' % (mode_int,mode_int))84def pinchIn(step, per, stepcond):85 d().pinch.In(percent=per,steps=stepcond)86 d.wait.idle()87@step(u'从中心以步长【%s】同时滑向左右距边缘位置百分之【%s】处$' % (mode_int,mode_int))88def pinchOut(step, stepcond, per):89 d().pinch.Out(percent=per,steps=stepcond)90 d.wait.idle()91 92@step(u'以页面元素【%s】为范围,从左右边缘同时滑向中心$' % (mode_pvs))93def pinchIn(step, cond):94 elements = get_dict_from_cond(cond)95 d(**elements).pinch.In(percent=100, steps=10)96 d.wait.idle()97@step(u'以页面元素【%s】为范围,从中心同时滑向左右两边$' % (mode_pvs))98def pinchOut(step, cond):99 elements = get_dict_from_cond(cond)100 d(**elements).pinch.Out(percent=100, steps=10)101 d.wait.idle()102 103@step(u'等待【%s】毫秒,不做任何操作$' % (mode_int))104def silent_wait(step, millisec):105 sec = (float(millisec))/1000106 time.sleep(sec)...

Full Screen

Full Screen

seismic_convolutional.py

Source:seismic_convolutional.py Github

copy

Full Screen

1"""2Seismic: Synthetic pinchout tuning effect seismic display3Convolve a reflection coeficients from a velocity model with a ricker wavelet4showing the frequency tuning effect in a pinchout.5Above the lambda/4 we expected to be able to distinguish6pinchout top and base.7"""8import numpy as np9import urllib10from scipy import signal11from fatiando import utils12from fatiando.vis import mpl13# Fetch the velocity model image from somewhere14urllib.urlretrieve(15 'https://lh4.googleusercontent.com/-LYHZJXCzeac/' +16 'Uuwu_qiyG5I/AAAAAAAADvk/s4eWJgbdUBE/w560-h70-no/pinchout.gif',17 'pinchout.bmp')18dt = 0.004 # sample rate19ds = 10. # depth increment20f = 30. # approximated frequency ricker wavelet (scipy a=1/(2.f.dt))21disc = 10 # space discretization22shp = (70, 560)23nz, nx = shp # bellow load geologic model velociy model24vmodel = utils.fromimage('pinchout.bmp', ranges=[2500., 3500.], shape=shp)25twti = np.cumsum(ds/vmodel, axis=0)*2 # calculate irregular sampled twt times26twt = np.arange(0, np.max(twti)+0.10, dt) # new twt times re-sampled to 4 ms27dnx = int(nx/disc)28twtvmodel = np.zeros((len(twt), dnx)) # velocity model in time and discretized29for i in xrange(0, nx, disc): # set the time re-sample velocity model30 twtvmodel[:, int(i/disc)] = np.interp(twt, twti[:, i], vmodel[:, i])31zimp = np.ones(twtvmodel.shape)*1000.*twtvmodel # create impedance z = rho*v32rc = (zimp[1:]-zimp[:-1])/(zimp[1:]+zimp[:-1]) # calculate reflection coefs33fig = mpl.figure(figsize=(11, 7)) # plottings34mpl.subplots_adjust(right=0.98, left=0.11, hspace=0.4, top=0.93, bottom=0.13)35mpl.subplot2grid((3, 4), (0, 0), colspan=4) # plot rc model36mpl.title("Zero-offset section reflection coefficients",37 fontsize=13, family='sans-serif', weight='bold')38rcs = utils.matrix2stream(rc.transpose(), header={'delta': dt})39mpl.seismic_wiggle(rcs, normalize=True, scale=1.5, ranges=[0, nx]) # rc model40wavelet = signal.ricker(255, 1/(2*f*dt)) # create wavelet41samples = signal.filtfilt(wavelet, np.ones(len(wavelet)),42 rc, axis=0, padlen=len(twt)-2) # convolve rc*wavelet43mpl.ylabel('twt (s)')44mpl.subplot2grid((3, 4), (1, 0), colspan=4) # plot zero-offset traces45traces = utils.matrix2stream(samples.transpose(), header={'delta': dt}) 46mpl.seismic_image(traces, cmap=mpl.pyplot.cm.jet, aspect='auto', ranges=[0, nx])47mpl.seismic_wiggle(traces, ranges=[0, nx], normalize=True)48mpl.ylabel('twt (s)')49mpl.title("Zero-offset section amplitude",50 fontsize=13, family='sans-serif', weight='bold')51ax = mpl.subplot2grid((3, 4), (2, 0), colspan=4) # plot vmodel52mpl.imshow(vmodel, extent=[0, nx, nz*ds, 0],53 cmap=mpl.pyplot.cm.bwr, aspect='auto', origin='upper')54ax.autoscale(False)55mpl.ylabel('depth (m)')56stations = [[i, 0] for i in xrange(0, nx, disc)]57mpl.points(stations, '^k', size=7) # zero-offset station points58mpl.text(250, 120, '2900 m/s') # model velocities59mpl.text(450, 315, '2500 m/s')60mpl.text(250, 550, '3500 m/s')61# thickness by lambda/4 2nd axis62ax2 = ax.twiny()63ax2.set_frame_on(True)64ax2.patch.set_visible(False)65ax2.xaxis.set_ticks_position('bottom')66ax2.xaxis.set_label_position('bottom')67ax2.spines['bottom'].set_position(('outward', 20))68def thick_function_thicknessbyres(x):69 l4 = 3000/(f*4) # average velocity resolution lambda 470 # pinchout thickness expression71 thick = 072 if x > 120:73 thick = 10 + (x-120)*0.224774 return thick/l475ax2.set_xticks(np.arange(0., nx, 50.))76ax2.set_xticklabels(77 ["%.2f" % thick_function_thicknessbyres(x) for x in xrange(0, nx, 50)])78mpl.title("Velocity model (stations black diamonds)",79 fontsize=13, family='sans-serif', weight='bold')80ax2.set_xlabel(r"Pinchout thickness divided by lambda/4")...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run ATX automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful