Loading and Exploring Well Log LAS Files Using LASIO in Python
Вставка
- Опубліковано 8 лип 2024
- Log ASCII Standard or LAS Files are a commonly used format within the oil and gas industry. They are used to store and transfer geological, petrophysical, and well log data.
In this video, I show you what a LAS file is, what it contains and how to explore its contents using a Python library called lasio.
The notebook for this video can be found on my GitHub repository at: github.com/andymcdgeo/Andys_Y...
Direct Link for the Notebook:
github.com/andymcdgeo/Andys_Y...
Information on the LASIO library: lasio.readthedocs.io/en/latest/
Medium Article Video is based on: / loading-and-displaying...
If you have enjoyed this video and want to say thanks, feel free to buy me a coffee at the following link: buymeacoffee.com/andymcdonaldgeo
--------
Books I Recommend:
As an Amazon Associate I earn from qualifying purchases. By buying through any of the links below I will earn commission at no extra cost to you.
PYTHON FOR DATA ANALYSIS: Data Wrangling with Pandas, NumPy, and IPython
UK: amzn.to/3HNycJ9
US: amzn.to/3DL7qPv
FUNDAMENTALS OF PETROPHYSICS
UK: amzn.to/3l1PgSf
PETROPHYSICS: Theory and Practice of Measuring Reservoir Rock and Fluid Transport Properties
UK: amzn.to/30UNWZS
US: amzn.to/3DNqBbd
WELL LOGGING FOR EARTH SCIENTISTS
UK: amzn.to/3FHsbfn
US: amzn.to/3CILAuE
GEOLOGICAL INTERPRETATION OF WELL LOGS
UK: amzn.to/3l2v2HV
US: amzn.to/30UOTkU
-----
Thanks for watching, if you want to connect you can find me on social media at the links below:
/ andymcdonaldgeo
/ geoandymcd
/ andymcdonaldgeo
www.andymcdonald.scot/
-----
Chapters
0:00 Introduction
0:59 LAS File Overview
4:10 Jupyter Notebook Section - Library Imports
5:37 Jupyter Notebook Section - LASIO.READ
6:31 Jupyter Notebook Section - Exploring LAS Contents Using LASIO
9:23 Jupyter Notebook Section - Converting LAS to a Pandas Dataframe
12:16 Summary - Наука та технологія
Thanks for sharing Andy..Will be nice to see mudlog ASCII data too ..👏👏
Great video! Great starting place for a person like me who's just starting to learn about las files
Thanks for this great tutorial!
You're very welcome!
Thank you Andy
Hey Andy, It was a great tutorial.
Great video Andy! 🙂
Thanks! 😀
Thanks for sharing, I appreciate it
No problem 👍
I really enjoyed it. It is the beginning of my freedom from using Techlog.
Thanks :)
Thanks Andy very much😊😊
You are very welcome
thank you Andy, You re so helpfull
Very useful content. Thanks for sharing👍
Thanks. I am glad you have found it useful. :)
@@AndyMcDonald42 Keep uploading the content pls. TC
Mr Andy, Firstly accept my thanks for demonstrating wellog in to python notebook. I'm curious on the SEGY & ASCII file loading with the similar demo. Kindly provide the relevant links/video/github pages. Thanks in advance.
but how to read the las files of version 3.0 please tell us
Great video Andy! I was thinking about how usefull could it be for minning logs too
Thanks Victor. Mining data and logs is not something I have had much experience with. I assume from your comment that mining logs are also stored in LAS?
Its usually xls but i think it could be LAS
Very Good Video Andy.
Is possible to modify the notebook by adding an option to write the logs (output) in an Excell file?
Thanks Jorge.
There are a few ways you view the data in Excel. The first is to export the dataframe to xlsx or csv and open it that way. But you lose the header info. The other option involves opening the las file directly in Excel, you will have the header info and log data, but you will need to split the columns.
Hi Andy,
Thanks for the nice video. I intend to watch the videos and use the lasio package. However, I couldn't install the package in Anaconda prompt, as I get some errors. Would you please let me know how to install the package properly?
Sorry for the late reply. Hopefully you managed to solve the issue.
When working with anaconda, you need to use conda install instead of pip install, or you can manage your packages through the Anaconda Navigator.
Great job. But what is the code's script to display logs measurements vertically instead of horizontally? Thank you
When plotting directly from pandas like in the example, I believe it will use the index as the x-axis. I would recommend having a look at my video on creating log plots with matplotlib: ua-cam.com/video/yNnMY_-X0Bo/v-deo.html
@@AndyMcDonald42 thanks for the clarification
Is lasio automatically assign depth to be index or i have to do it manually.regards
Yes, LASIO automatically assigns the index of the dataframe to be depth.
I often reset the index, so that depth is a column within the dataframe. This is done using df.reset_index(inplace=True). I personally find this easier to work with when creating plots.
@@AndyMcDonald42 so you import it by lasio then convert it to df and later you reset index on pandas dataframe.many thanks, Andy.
Andy, Cool stuff. However the link for the notebook is not working apparently.
Thanks David. I have updated the description with a direct link to the notebook.
It actually turned out that the repository was actually set to private. Doh! That would explain why there was 0 visitors to it.
Greetings Andy,
I work in a company that won't give me an access to Python (lasio), and sometimes I face issues while dealing with wrapping las files trying to export them into excel, do you know of any way I can resolve this issue using Excel or MATLAB? Also, I can't download any additional add-ons or packages to either.
Hi Everyone. I have a missing " Curve #4 'DT' is defined in the ~C section but there is no data in ~A"
Can you share me a solution?
Thank you so much!
Unfortunately, if the DT curve is missing within the ~ASCII section, you will go back to where you got the file from and re-export the data. Hopefully that should resolve the issue.
Hello Mr. Andy McDonald,
This tutorial is fantastic and very much needed. While I was trying to read the LAS files I got this error, I was hoping you could help me resolve it. The command I used was:
las = lasio.read('filename.LAS')
And the error was:
LASHeaderError: Line 11 (section ~Well Information Block): "UWI: UWI"
I will be very grateful if you could help me!!
Thank you!
Hi Aditi, I am not sure what the issue would be there. If you are still getting an issue I would highly recommend raising a ticket on the LASIO GitHub page: github.com/kinverarity1/lasio
The creator of the package may have a better idea of what the issue may be.
Hi Aditi,
The error you're seeing is because "UWI: UWI" is not a valid LAS format line (it should be "UWI. : UWI"). You can fix this by changing your code to read:
las = lasio.read('filename.LAS', ignore_header_errors=True)
The re-exporting of the las file isn't working.
las.write('Exports....')
Hallo Andy
I have started working trough this. I am new to Python, Github and Jupyter Notebook. I am getting this error:
ModuleNotFoundError: No module named 'lasio' when I am trying to run your scrip. Or perhaps you do have a tutorial that explains these basic steps which I have could have missed. Please guide me.
It sounds like the library is not installed. You will need to open a command prompt or terminal and type: pip install lasio
This will download and install the library from PyPi.org.
Hopefully that should resolve the issue.
But how to read las versions with 3.0
Even though lasio only supports las 2.0 it can read las 3.0 files. However, there may be issues when doing so. I don’t know if they are planning to upgrade lasio in the future to handle version 3.0
i really need this file can you send me the data of the file please?????
The file can be downloaded from the repository mentioned within the description.
github.com/andymcdgeo/Andys_UA-cam_Notebooks
Hello Mr. @Andy McDonald ,
This tutorial is fantastic and very much needed. While I was trying to read the LAS files I got this error, I was hoping you could help me resolve it. The command I used was:
las = lasio.read('filename.LAS')
And the error was:
LASHeaderError: Line 11 (section ~Well Information Block): "UWI: UWI"
I will be very grateful if you could help me!!
Thank you!