Python Tool Pro - Plotting well log data#

Connect to Python Tool Pro

[2]:
from cegalprizm.pythontool import PetrelConnection

ptp = PetrelConnection(allow_experimental=True)

Select the well by name and list all the well logs for the well

[3]:
name='Input/Wells/B Wells/B4'
well=ptp.wells[name]
logs = list(well.logs)

Create a dataframe from the well logs

[4]:
df = well.logs_dataframe(logs)

Set the dataframe name attribute and print the head of the dataframe.

[5]:
df.name=name
df.head()
[5]:
CALIPER NG True vertical thickness 1 True stratigraphic thickness 1 Time 1 NetGross Porosity Gamma Perm DEPTH TWT (Vo) Facies Fluvial facies Zone log linked to 'Well Tops' Zones (hierarchy) MD TWT TVD
0 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN UNDEF UNDEF UNDEF UNDEF -1690.643701 -0.072525 -0.075489
1 NaN NaN NaN NaN 0.079441 NaN NaN NaN NaN NaN NaN UNDEF UNDEF UNDEF UNDEF -1690.143701 0.153068 0.159324
2 NaN NaN NaN NaN 0.196519 NaN NaN NaN NaN NaN NaN UNDEF UNDEF UNDEF UNDEF -1689.643701 0.378660 0.394136
3 NaN NaN NaN NaN 0.313596 NaN NaN NaN NaN NaN NaN UNDEF UNDEF UNDEF UNDEF -1689.143701 0.604253 0.628949
4 NaN NaN NaN NaN 0.430672 NaN NaN NaN NaN NaN NaN UNDEF UNDEF UNDEF UNDEF -1688.643701 0.829846 0.863762

Import CegalPrizm Investigator and connect to Investigator

[6]:
import cegalprizm.investigator as investigator
from cegalprizm.investigator import InvestigatorConnection
from cegalprizm.investigator.views import *

invconnection = InvestigatorConnection(use_licensed_features=True)

Create a new investigation from the dataframe containing the well log data.

[7]:
inv = invconnection.investigation_from_dataframe(df)

Create a log tracks view from the investigation and plot it.

[8]:
view = LogTracksView(inv)
investigator.plot(view)
[8]:
../../../../../_images/products_Investigator_Workbooks_Tutorials_PTP_WellLogs_14_0.png
[ ]: