Plot some Well logs, correlations

I’d like to plot well logs in Julia in which i can analyize and make calculations like the image below. i’d like to know some tips to do that. For example, to plot a single well I think I need to use layouts for different tracks, but if I add another well, more Layouts?. Is there already a plot package like this?

There is no specific plot package I am aware of to plot well logs directly, but you can easily write a solution with Plots.jl: https://github.com/JuliaPlots/Plots.jl If you already have a type where you store the well logs, define a plot recipe for it.

I’m trying to build a kind of template,

how to put the second x axis in a single track?

md=0:1:50;
gr=rand(51,1).+104;
res=rand(51,1).+1300;
sp=rand(51,1).-100;


@manipulate for y1=1, y2=50
GR=plot(gr,md,ylim=(y1,y2),yflip=true,xmirror=true,xlabel="GammaRay[API]",xtick=range(round(Int,minimum(gr)), stop = round(Int,maximum(gr)), length = 2))
GR=plot!(sp,md)
RES=plot(res,md,ylim=(y1,y2),yflip=true,xmirror=true,ytick=false,xlabel="Resistivity[Ohm m]",xtick=range(round(Int,minimum(res)), stop = round(Int,maximum(res)), length = 2))
plot(GR,RES,layout=(1,2))
end

How to put the sp in other x axis in the first subplot?

If I understood your question, you create 3 separate plots, one for GR, one for SP, and one for RES. Then you start combining these plots hierarchically. First combine GR and SP:

LITHO = plot(GR, SP, layout=(1,2))

then combine the LITHO panel with the RES panel:

plot(LITHO, RES, layout=(1,2))

Is that what you want?

Hello @Santiago_Cuervo Please keep us in touch with the solution you achieve here.
I work in the oil and gas industry also, for a big company in the seismic processing field.
It would be great to see Julia more widely used in this field.

I would like to plot the sp and gr in the same plot in different axis due the big value difference between them. In the plot a pasted are in the same plot but im not been able to set the second x axis

Thanks

Of course. I work for small oil and gas company which we’ve developed great tools mainly in Octave such as Montecarlo sim, nodal analysis, material balance, geostatistics, a blackoil simulator and even machine learnning algorithms. In the process to make these tools to be accessible to any or myself I looked for languages to make it easy and dynamic. I was seduced by python and julia. Finally I chose Julia and im just at the beginning of the learning process.Id like to integrate and add tools to be easy to use by any in comparison the code we wrote in octave that i know how it work because i developed and not by the easiness to use

I may be wrong, but the notions of axis and plot in Plots.jl are not separable. You operate at the level of plots, and then combine plots as if they were axes. Someone can correct me if I am wrong.

From the list of tools you’ve listed, the one we really miss is a black oil simulator written in Julia. For geostatistics you can use GeoStats.jl, and for Monte Carlo simulation in general there are a ton of packages. Please check the package ecosystem before you start porting your Octave code to Julia. Welcome to the community.

hi, I just saw the the GeoStats.jl package and I think It would be really useful to integrate it with a petrophysics package that could take the advantage of it. I have to read more about how to create packages, modules. I think it’s a good package to develop

Feel free to reach out in our gitter channel if you have questions: JuliaEarth/GeoStats.jl - Gitter

Hi Guys,

I’ve been a little delayed but I’ve been working on the package for Well logs visualization and petrophysics estimation. I’ve already uploaded to GitHub, installed and used. However I still need some help to make the Test files, the build and the Docs page as well as the requierements. For the visualization, after test some plot package I used PyPlot because it has a lot of features I couldn’t find on GR or Recipes.

. Could you give me more information about this topics in order the get ready the package?

Thank you

Hi @Santiago_Cuervo that is good news. Can you share the link? That way we can try help.

Thanks,

Hi, here is the link

https://github.com/scuervo91/WellLogs.jl

I know there’s a lot of work to do to in order to have a good package in terms of types declarations and error evaluation. I’ve been with Julia since january and i’ve realized there’s a lot of keywords I still ignore.

Thank you

1 Like

That is great @Santiago_Cuervo! I would like to provide some feedback here, but I can also open issues on GitHub if you prefer.

First, regarding the name of the package. Are you also planning to develop functionality to read/write well logs, and other things that would justify the general name WellLogs.jl? The community tries to follow a convention in which plotting packages are usually named as WellLogPlots.jl. The Plots suffix makes it explicit that the package is about plotting, and I would rename it to make the intention clearer.

Second, regarding the use of matplotlib. Ideally, we could find a solution with Plots.jl, and avoid this dependency on a Python library. There is an effort in the community to rewrite packages in pure Julia, or to have dependencies that are of lower level, and do not require another interpreter like Python. If Plots.jl does not have all the functionality you want, which you should double check, I suggest using a framework such as GR.jl which is more portable, faster, and can do interesting things like plotting on a remote server via SSH. Another major advantage of Plots.jl is that you can develop your work using any backend of your choice, and then publish it using a backend ideal for publication like PGFPlots.jl. I’ve done it in the past, and it works nicely.

The plots in the README.md look amazing, and I am looking forward to use your package on my research as well. I hope you consider some of the changes suggested above, they will attract even more contributors and people working in this industry.

Best,

Hi, @juliohm. First thank you for your suggestions.

In the process of learning and writting the code I realized Plots.jl is so much faster than Matplotlib when using Interact.jl package, so I started cheking if a PlotRecipe could handle the plots, and as you say, it could be used with any backend. There is only one reason for choosing PyPlot and it was I couldn’t figure out how to plot with two X axis in Plots, which it seemed to me strange because I actually can plot with two Y axis using the twinx keyword while in PyPlot the twiny keyword is available. If the solution exist (I’m almost certain it must be) to Plots.jl be sure I will rewrite using Plots.

Regarding with the package name I agree with the change of it.

Another topic I don’t undertand is the Test, how to implement this test?, how to make a Documentation page?, and finally and less important, how to make a logo like yours?

Thank you very much

1 Like

If a twinx option is available in Plots.jl then a twiny option likely exists. It may be broken or not implemented yet, but you could reach the Plots.jl maintainers and ask on GitHub for example.

Thanks for considering changing the package name to a more descriptive name. :+1:

For testing examples, you can check some existing packages to see how they have implemented it. It is basically a copy/paste of the main structure of files, and then you can add @test calls specific to your case. Some of my packages make have use of VisualRegressionTests.jl and I think yours will also benefit. It allows you to compare plots generated during test with plots saved on disk. The package takes care of setting up a bunch of things for you. Please check my GeoStats.jl family of packages for examples of usage. Regarding the documentation, you need to read Documenter.jl docs. They explain in detail the process, and you also have packages as examples to copy/paste some of the main files. I would argue that a README.md is fine for plotting packages, you can use the Markdown syntax as you already do and organize the usage examples. Users don’t need to understand the full API of a plotting package, just copy/paste plot commands. Regarding the logo, I used some online website to draw it, I don’t recall the name.

Hi @Santiago_Cuervo, today I tried to take a look into the repository, but couldn’t find it on GitHub. Could you please re-share the link?

Hi,

I just put it online again with the same link.

@johnh The project 7G project aims to develop a series of packages for Oil and Gas industry, from Well Logs (Current Package) going through Reservoir Simulation until Economics package. I think the integration of all of these in a simple but robust way can lead to better analysis including machine learning algorithms. For example integrate a reservoir simulation to nodal analysis and economics evaluation.

I already started with the Well productivity where production plots, declination, Productivity index analysis are going to be available.

Hi @Santiago_Cuervo, just to clarify who are the potential users. Is this effort open-source or you have plans to close it at some point in the future?

Thank you,