Loading and Exploring Well Log LAS Files Using LASIO in Python

Sdílet
Vložit
  • čas přidán 22. 07. 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
  • Věda a technologie

Komentáře • 49

  • @unoab7
    @unoab7 Před 2 lety +1

    Thanks for sharing Andy..Will be nice to see mudlog ASCII data too ..👏👏

  • @yousufsarfraz3422
    @yousufsarfraz3422 Před 9 měsíci

    Great video! Great starting place for a person like me who's just starting to learn about las files

  • @dilshadraza1766
    @dilshadraza1766 Před 2 lety

    Hey Andy, It was a great tutorial.

  • @paolomartizzi164
    @paolomartizzi164 Před 3 lety +1

    Great video Andy! 🙂

  • @anantht8660
    @anantht8660 Před 2 lety +1

    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.

  • @fernandozalazar199
    @fernandozalazar199 Před 3 lety +1

    Thanks for this great tutorial!

  • @salihaamoura232
    @salihaamoura232 Před 2 lety

    Thank you Andy

  • @vin84iitr
    @vin84iitr Před 3 lety +2

    Very useful content. Thanks for sharing👍

    • @AndyMcDonald42
      @AndyMcDonald42  Před 3 lety +1

      Thanks. I am glad you have found it useful. :)

    • @vin84iitr
      @vin84iitr Před 3 lety

      @@AndyMcDonald42 Keep uploading the content pls. TC

  • @muhammadivanalazhar4046

    thank you Andy, You re so helpfull

  • @issahaddad7071
    @issahaddad7071 Před 2 lety

    Thanks for sharing, I appreciate it

  • @geoscientistmohamedmustafa900

    Thanks Andy very much😊😊

  • @wordofinformation9882
    @wordofinformation9882 Před rokem +1

    but how to read the las files of version 3.0 please tell us

  • @pouyapadiav7121
    @pouyapadiav7121 Před 3 lety +2

    I really enjoyed it. It is the beginning of my freedom from using Techlog.

  • @victorcruz3495
    @victorcruz3495 Před 3 lety +1

    Great video Andy! I was thinking about how usefull could it be for minning logs too

    • @AndyMcDonald42
      @AndyMcDonald42  Před 3 lety

      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?

    • @victorcruz3495
      @victorcruz3495 Před 3 lety

      Its usually xls but i think it could be LAS

  • @hamedheidari2183
    @hamedheidari2183 Před 2 lety

    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?

    • @AndyMcDonald42
      @AndyMcDonald42  Před 2 lety

      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.

  • @chibuzorahumaraeze418

    The re-exporting of the las file isn't working.
    las.write('Exports....')

  • @olaal-najjar7391
    @olaal-najjar7391 Před 2 lety +1

    Great job. But what is the code's script to display logs measurements vertically instead of horizontally? Thank you

    • @AndyMcDonald42
      @AndyMcDonald42  Před 2 lety +2

      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: czcams.com/video/yNnMY_-X0Bo/video.html

    • @olaal-najjar7391
      @olaal-najjar7391 Před 2 lety

      @@AndyMcDonald42 thanks for the clarification

  • @Channel1212ful
    @Channel1212ful Před 5 měsíci

    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.

  • @jorgeparra548
    @jorgeparra548 Před 2 lety

    Very Good Video Andy.
    Is possible to modify the notebook by adding an option to write the logs (output) in an Excell file?

    • @AndyMcDonald42
      @AndyMcDonald42  Před 2 lety

      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.

  • @113because
    @113because Před rokem

    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!

    • @AndyMcDonald42
      @AndyMcDonald42  Před rokem

      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.

  • @Dcelis2
    @Dcelis2 Před 3 lety +1

    Andy, Cool stuff. However the link for the notebook is not working apparently.

    • @AndyMcDonald42
      @AndyMcDonald42  Před 3 lety +1

      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.

  • @jordaanfouche299
    @jordaanfouche299 Před 9 měsíci

    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.

    • @AndyMcDonald42
      @AndyMcDonald42  Před 9 měsíci

      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.

  • @mazenomar7279
    @mazenomar7279 Před 2 lety

    Is lasio automatically assign depth to be index or i have to do it manually.regards

    • @AndyMcDonald42
      @AndyMcDonald42  Před 2 lety +3

      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.

    • @mazenomar7279
      @mazenomar7279 Před 2 lety +1

      @@AndyMcDonald42 so you import it by lasio then convert it to df and later you reset index on pandas dataframe.many thanks, Andy.

  • @aditigawande8775
    @aditigawande8775 Před 2 lety +1

    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!

    • @AndyMcDonald42
      @AndyMcDonald42  Před 2 lety +1

      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.

    • @kinverarity5516
      @kinverarity5516 Před 2 lety +3

      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)

  • @asisdash4278
    @asisdash4278 Před rokem +1

    But how to read las versions with 3.0

    • @AndyMcDonald42
      @AndyMcDonald42  Před rokem

      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

  • @mominabdlhamed2098
    @mominabdlhamed2098 Před 2 lety

    i really need this file can you send me the data of the file please?????

    • @AndyMcDonald42
      @AndyMcDonald42  Před 2 lety

      The file can be downloaded from the repository mentioned within the description.
      github.com/andymcdgeo/Andys_CZcams_Notebooks

  • @aditigawande8775
    @aditigawande8775 Před 2 lety

    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!