The 6.6.8 release of the wmPlugins includes a number of new Python external attribute scripts that use the PyLops linear operator library for seismic modelling and inversion. These scripts also demonstrate the use of the new user interface parameter elements introduced in the 6.6.8 release of the External Attribute plugin.
In this post I show you how to set up and use the free Visual Studio Code editor with OpendTect for interactive computation using Python Jupyter Notebooks. If you have installed the OpendTect Machine Learning Python environments you can create and edit Python Jupyter Notebooks using Visual Studio Code without modifying the installed environment provided VS Code is run from within OpendTect. The approach described in this post might assist users in strictly controlled IT settings get up and running using Jupyter Notebooks.
Summary The potential to offload calculations to the graphics processing unit (GPU) on modern graphics cards is a trending topic. I was curious if this could also apply to seismic attribute calculation in OpendTect, so I implemented AVO polarization angle estimation as described by Mahob and Castagna (2003) using 3 different approaches: using loops for all the linear algebra and OpendTect’s multi dimensional arrays (ArrayNDImpl) which I refer to as the Normal method; using the Eigen linear algebra C++ template library (the Eigen method) and using the ArrayFire linear algebra library for GPU’s (the ArrayFire method).
Introduction Because the Python [../plugins/ExternalAttrib] script is running in a process started by the OpendTect application most standard methods to examine the script as it runs, eg using the standard Python debugger pdb, are not available. A solution is to use the Web-PDB Python module which allows the Python script to be debugged remotely in a web-browser. Web-PDB Installation Web-PDB is not included by default in most Python installations but it can be easily added using pip:
Introduction It is possible to write information to the OpendTect logfile from inside a Python [../plugins/ExternalAttrib] script. The global variable xa.logH (assuming the extattrib module has been imported using import extattrib as xa) is a Python logger object. An Example On line 18 the Python logger is modified by adjusting the severity level of messages that will appear in the log file. By default only CRITICAL, ERROR and WARNING messages will be written.
Introduction This article will review the structure of a simple Python [../plugins/ExternalAttrib] script, ex_dip.py, which converts inline and crossline dip to true dip and dip azimuth. It is an example of multi attribute, single trace input and output. Some basic understanding of Python and Numpy is assumed. Every Python attribute script has 5 sections. The Imports Imports Section This is where external modules/libraries required by the script are loaded.