Plotting Triple Combo Data from LAS file in Python-The Easiest Way.
With the current rising of open-source data, it is quite a task to find free software that can help you quickly plot the log data into a set of logs (triple combo).
There is some free software with a complete package like LogView++, some simple viewers like GBDS (only available in Windows), or online LAS plotters like WVU.
LogView++ is amazing, considering it's free of charge, but the interface may seem overwhelming for beginners. GBDS and WVU are easy, but they are lacking in customization of the plot itself.
I want to be able to plot it quickly, and easily adjustable. Be it the well log LAS input, or the way the plot looks like. Since I would probably do it more than twice, I decided to make a good function in python.
If you did it frequently, create a function!
Taking inspiration from other authors like Andy and Yohanes, I build a function that can easily plot triple combo data from a LAS file. You can check the notebook under this link for a TLDR version. But if you are curious how it was done, read along....
Without going into too much detail, I use a standard library for plotting and manipulating the data, such as Pandas, NumPy, Matplotlib, and Seaborn. Additionally, Welly library is used for EDA for the well log data, and pretty much the toolkit to handle the LAS file input.
Once done, import the LAS file using Well.from_las as shown below. I set a working dir variable, just so that when the plot is saved into pdf, it will be saved under the working directory.
The function that is used for creating the plot is tc_plot. The function is built based on the standard library and specifically designed to plot well log data in a data frame format, into a triple combo plot. The sequence of the logs is important, as written in the docstring, and there has to be a depth column named 'DEPTH' in the data frame. Other than that, once the LAS data frame is ready, you can easily manipulate the plot. Several features that I personally liked are:
1- you can easily change the compatible scale for the neutron and density scale independently, by setting up the den_left, den_right, neu_left, neu_right. Be it decimal, or in percentage. With this, you can easily adjust the scale to your liking.
2- you can easily put shading with a specific baseline to gamma-ray and resistivity. For the gamma-ray, you can also set if you want to shade it from the curve (as shown in the previous figure) or from zero as the above, which I personally preferred.
领英推荐
3- last but not least, all of the color, track names, and scale division can be customized as needed (above is an example from another well).
And if you are happy with the plot, you can set the savepdf=True in the function, to save it as a pdf for your ease of access later on. The pdf file will be saved with the well name as the file name. Kinda neat if you ask me... :)
Detail step by step process can be seen in the notebook, you can download it via the github and run it on your laptop locally, or copy it using google collab (https://github.com/ariewjy/petrophysics). Just make sure you had the LAS file ready.
Hope you find it useful.
Till next time,
A.A.W.
Petrophysicist
3 年Excellent work ????
pekerjaan besar
Nice work, AAW!
PhD Student in Earth Sciences at Iowa State University
3 年Thanks for posting!