Wednesday, June 17, 2015

Daily Dose of Exploration Geophysics: Gardners Expression as a Linear Regression

Gardner's Coefficients Revealed!


I have a added a new IPython notebook to my github account that shows how you can find the coefficients in Gardner's expression for the basin you happen to be working in. follow the link to myIPythonNotebooks - Gardner's Expression Regressed. For some reason, github is not showing the mathjax equations well, but if you download the notebook and open it locally, you should have no problem viewing them. I'll write them here just in case to give you a sample of what can be found in the notebook:


********************************************************************************************************************* One option is to linearize the equation and do a regression for the 2 parameters. This ipython notebook will show you how. Start with the general equation: $$\rho = \alpha * V_{P}^\beta$$ Take the natural log of both sides: $$ln(\rho) = ln(\alpha * V_{P}^\beta)$$ Use the properties of logarithms to make a linear equation: $$ln\rho = ln\alpha + ln(V_{P}^\beta)$$ $$ln\rho = ln\alpha + \beta*lnV_{P}$$ Rewrite: $$D = A + BV$$ where A is the intercept, B is the slope, V is the independent variable, and D is the dependent variable. *********************************************************************************************************************


Finally, below is a screen shot of the final regression:


GREAT LINK to SUBSURF WIKI: Gardner's equation

Tuesday, June 2, 2015

The best method I have found for setting up my python environment

I am running Scientific Linux 6 which comes with python version 2.6.6.  However, I really like using version 2.7.9 mainly because of all the compatible third party libraries associated with it.  Also, I prefer to use PyCharm - my favorite python IDE.

I have found that anaconda by Continuum Analytics to be the best python package manager and, after surfing the web, it seems I am not alone.  Using 'conda' to add additional packages is simple and for those new to python programming and third party modules or libraries, conda is well documented.  Also, conda installs to its own directory, so it does not interfere with your package python interpreter.


Once you have conda installed, install PyCharm.  PyCharm does not include a python interpreter (which is why you need conda or you can use the system default).  When you create a new project, tell PyCharm you want to use the anaconda interpreter (~/anaconda/bin/python).


That's it.  Post any questions to the comment portion and I will do my best to answer them if I can.

Monday, June 1, 2015

First Github Contribution: SimpleLasCurveViewer

Simple las Curve Viewer

Check out my first contribution to the open source community. It won't revolutionize the industry, but I think its a good start. It's a little program called 'Simple las Curve Viewer' and it's exactly that. The GUI is written with PyQt4 developed by Riverbank and it uses the plotting library pyqtgraph.

I've built and tested it using the L-30.las file from the Penobscot survey. You can find it at the SEG Github page under tutorials/1406_Make_a_synthetic.

The code can be found at github.

Thank you Warren Weckesser for allowing others to use your las python script and Luke Campagnola for developing pyqtgraph.

Below are some screenshots of the application.

First when the application opens:

After importing the las: (Notice that the curve list is populated with all the names of the curves in the las file)

A gamma ray log:

A resistivity log: