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
  • Наука та технологія

КОМЕНТАРІ • 49

  • @unoab7
    @unoab7 2 роки тому +1

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

  • @yousufsarfraz3422
    @yousufsarfraz3422 9 місяців тому

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

  • @fernandozalazar199
    @fernandozalazar199 3 роки тому +1

    Thanks for this great tutorial!

  • @salihaamoura232
    @salihaamoura232 2 роки тому

    Thank you Andy

  • @dilshadraza1766
    @dilshadraza1766 2 роки тому

    Hey Andy, It was a great tutorial.

  • @paolomartizzi164
    @paolomartizzi164 3 роки тому +1

    Great video Andy! 🙂

  • @issahaddad7071
    @issahaddad7071 2 роки тому

    Thanks for sharing, I appreciate it

  • @pouyapadiav7121
    @pouyapadiav7121 2 роки тому +2

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

  • @geoscientistmohamedmustafa900
    @geoscientistmohamedmustafa900 2 роки тому

    Thanks Andy very much😊😊

  • @muhammadivanalazhar4046
    @muhammadivanalazhar4046 Рік тому

    thank you Andy, You re so helpfull

  • @vin84iitr
    @vin84iitr 3 роки тому +2

    Very useful content. Thanks for sharing👍

    • @AndyMcDonald42
      @AndyMcDonald42  3 роки тому +1

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

    • @vin84iitr
      @vin84iitr 3 роки тому

      @@AndyMcDonald42 Keep uploading the content pls. TC

  • @anantht8660
    @anantht8660 2 роки тому +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.

  • @wordofinformation9882
    @wordofinformation9882 Рік тому +1

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

  • @victorcruz3495
    @victorcruz3495 3 роки тому +1

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

    • @AndyMcDonald42
      @AndyMcDonald42  3 роки тому

      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 3 роки тому

      Its usually xls but i think it could be LAS

  • @jorgeparra548
    @jorgeparra548 2 роки тому

    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  2 роки тому

      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.

  • @hamedheidari2183
    @hamedheidari2183 2 роки тому

    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  2 роки тому

      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.

  • @olaal-najjar7391
    @olaal-najjar7391 2 роки тому +1

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

    • @AndyMcDonald42
      @AndyMcDonald42  2 роки тому +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: ua-cam.com/video/yNnMY_-X0Bo/v-deo.html

    • @olaal-najjar7391
      @olaal-najjar7391 2 роки тому

      @@AndyMcDonald42 thanks for the clarification

  • @mazenomar7279
    @mazenomar7279 2 роки тому

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

    • @AndyMcDonald42
      @AndyMcDonald42  2 роки тому +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 2 роки тому +1

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

  • @Dcelis2
    @Dcelis2 3 роки тому +1

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

    • @AndyMcDonald42
      @AndyMcDonald42  3 роки тому +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.

  • @Channel1212ful
    @Channel1212ful 4 місяці тому

    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.

  • @113because
    @113because Рік тому

    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  Рік тому

      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.

  • @aditigawande8775
    @aditigawande8775 2 роки тому +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  2 роки тому +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 2 роки тому +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)

  • @chibuzorahumaraeze418
    @chibuzorahumaraeze418 Рік тому

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

  • @jordaanfouche299
    @jordaanfouche299 9 місяців тому

    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  9 місяців тому

      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.

  • @asisdash4278
    @asisdash4278 Рік тому +1

    But how to read las versions with 3.0

    • @AndyMcDonald42
      @AndyMcDonald42  Рік тому

      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 Рік тому

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

    • @AndyMcDonald42
      @AndyMcDonald42  Рік тому

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

  • @aditigawande8775
    @aditigawande8775 2 роки тому

    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!