Creating Well Log Plots with Matplotlib in Python

Поделиться
HTML-код
  • Опубликовано: 8 сен 2024
  • Log plots are one of the most commonly used plot types when working with well log and petrophysical data. They allow us to view how logging measurements that have been acquired from a borehole, and from them we can make interpretations and understand how the measurements vary with respect to depth.
    If you haven't already, make sure you subscribe to the channel: / @andymcdonald42
    If you have enjoyed this video and want to say thanks, feel free to buy me a coffee at the following link: buymeacoffee.c...
    ----
    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
    ----
    The notebook for this video can be found on my GitHub repository at: github.com/and...
    Libraries used in this video:
    LASIO: lasio.readthed...
    pandas: pandas.pydata.org
    matplotlib: matplotlib.org
    Equinor Volve Dataset: www.equinor.co...
    -----
    Thanks for watching, if you want to connect you can find me at the links below:
    / andymcdonaldgeo
    / geoandymcd
    / andymcdonaldgeo
    www.andymcdona...

Комментарии • 30

  • @northdot9
    @northdot9 Год назад +1

    Geology is not my field of study , but I still found this video to be very valuable in getting more out of matplotlib. A solid practical example. Thank you.

    • @AndyMcDonald42
      @AndyMcDonald42  Год назад +1

      Thanks 👍 Glad to hear you found it useful

  • @fudgenuggets405
    @fudgenuggets405 Год назад

    Much appreciated, I was banging my head against the wall trying to use seaborn lineplots to show some pore pressure data. The pore pressure would decrease through depleted zones then ramp back up so a lineplot looked like we were going shallower in the well. I figured it was something to do with the type of plot I was using and five minutes into this video voila; just a good old fashioned plot "plot". Works like a champ.

  • @dtechkrew
    @dtechkrew 2 года назад +1

    I am learning a lot from your videos, doing daily, going complete from start to end, and even creating my own notebooks, Its really really great experience. Keep it up. Thank you

  • @evanbrown2594
    @evanbrown2594 3 года назад +2

    This is fantastic! Thanks so much for putting this up here!

    • @AndyMcDonald42
      @AndyMcDonald42  3 года назад +1

      Thanks Evan. I am glad it has been helpful.

  • @sarojkumarlenka6193
    @sarojkumarlenka6193 Год назад

    Thanks for the nice video. It is very informative. I request you to kindly teach how to make a custom hatch patterns in matplotlib. It will be much appreciated.

  • @user-ee5mw8xf7l
    @user-ee5mw8xf7l Год назад

    Thanks! Very helpful video!

  • @maczerker
    @maczerker 8 месяцев назад

    Hello Andy, Thank you for the very informative video! I have a question, what can I do if my LAS file is wrapped? It seems this code does not work with wrapped files, it's giving me an error "Only engine='normal' can read wrapped files" what can I do to resolve this?

  • @allansalles8895
    @allansalles8895 2 года назад

    Hello, Andy! Thank you so much for your content.
    Could you please tell a bit more about the role of 'rowspan' and 'colspan' in subplot2grid()? It isn't clear to me.
    Thanks again!

    • @AndyMcDonald42
      @AndyMcDonald42  2 года назад

      Hi Allan, the rowspan and colspan arguments are used to determine how many columns and rows a single subplot will take up. For example, if you have a 3x3 grid, and you want one figure to stretch across all three columns, then you would set colspan=3.
      I think I covered rowspan in this video: ruclips.net/video/pPqLgmbyets/видео.html
      Hope that helps.

  • @nanozapper2238
    @nanozapper2238 Год назад +1

    how do plot image logs like acoustic image/ USIT/VDL etc?

    • @AndyMcDonald42
      @AndyMcDonald42  Год назад

      This article here may help you. It shows how you plot LWD Image logs using matplotlib. A similar setup should work for VDLs and Acoustic Images.
      medium.com/towards-data-science/displaying-logging-while-drilling-lwd-image-logs-in-python-4babb6e577ba

  • @mohammadkeshtkar9655
    @mohammadkeshtkar9655 3 года назад

    Dear Andy thanks for your useful videos I have a question how do we generate percentage lithology or graphic log .I hope you make a video about this in the future.

    • @AndyMcDonald42
      @AndyMcDonald42  3 года назад

      I will hopefully be covering that in a future video. You can use the method fill_betweenx() to control shading between two logging curves. You can see an example here in one of my earlier articles: towardsdatascience.com/enhancing-visualization-of-well-logs-with-plot-fills-72d9dcd10c1b

  • @yojananchavarriahuerta7649
    @yojananchavarriahuerta7649 Год назад

    How can I plot three or four logs in the same graph?

  • @geraldmogi2937
    @geraldmogi2937 2 года назад

    Hello sir, Thank you for your videos, it's very helpful. I have a question, if we want to join 2 well log data by its depth (e.g. sonic log and density log), how to match the depth? because the depth is shifting (depth shift).

    • @AndyMcDonald42
      @AndyMcDonald42  2 года назад

      Thanks Gerald. In my latest video, which will be released today i show a way of combining formation tops with well log data that may be of interest. However, carrying out depth alignment between different curves is a more difficult problem.

    • @geraldmogi2937
      @geraldmogi2937 2 года назад

      @@AndyMcDonald42 Thank you sir, i have seen your latest video, it's very helpful. At least now i can combine my formation data too. Thank you :D

  • @said_628
    @said_628 2 года назад

    Thanks

  • @iliusmondal2098
    @iliusmondal2098 2 года назад

    Hi Sir, is there any way to plot the logs in 1:200 scale and what is the process to remove outliers like -999.99

    • @AndyMcDonald42
      @AndyMcDonald42  2 года назад

      Hi Ilius, I am not sure on the first part about setting up defined scales for the plots. Most of it would be a case of trial and error with the figure scale. As for removing outliers, I would recommend having a looking at my article on outliers, especially the Removing Extreme Resistivities. The code there can be adapted to remove -999 values.
      medium.com/towards-data-science/well-log-data-outlier-detection-with-machine-learning-a19cafc5ea37

  • @anuragsaxena4524
    @anuragsaxena4524 2 года назад

    hello Andy, please help, i am unable to import LAS file from my system ....following message is being displayed in jupyter... File "", line 1
    las = lasio.read("D:\NAWAGAM\CONDITIONED_DATA_NAWAGAM\NWGM-253_COND.las")
    ^
    SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: malformed \N character escape

    • @AndyMcDonald42
      @AndyMcDonald42  2 года назад

      The issue could be related to the actual file which has invalid characters in, or it is related to the use of a new line character (\N) in the file path. You could try adding an r before the path so that it will read it as is:
      las = lasio.read(r"D:\NAWAGAM\CONDITIONED_DATA_NAWAGAM\NWGM-253_COND.las")

  • @AndyBrickell
    @AndyBrickell 2 года назад +1

    Hey Andy - another good one, except I get an error message when I use the ax2.semilogx() line:
    AttributeError Traceback (most recent call last)
    ~\AppData\Local\Temp/ipykernel_14580/1159179125.py in
    19 ax2.set_xlabel("ILD")
    20 ax2.set_xlim(.1,100)
    ---> 21 ax2.semilog(x)
    22 ax2.set_ylim(18000,17000)
    23 ax2.grid()
    AttributeError: 'AxesSubplot' object has no attribute 'semilog'
    Any thoughts?

    • @AndyMcDonald42
      @AndyMcDonald42  2 года назад

      Hi Andrew, did you manage to solve this? If not the line highlighted should be ax2.semilogx()