Python Tool Pro - Plotting 2D seismic data#

Connect to Python Tool Pro

[28]:
from cegalprizm.pythontool import PetrelConnection

ptp = PetrelConnection(allow_experimental=True)

Select the seismic 2D line by name

[29]:
name = 'Input/Seismic/Survey 1/Amp XLine 618'
seismic = ptp.seismic_2ds[name]

Create a dataframe from the seismic 2D line

[30]:
import pandas as pd

df = pd.DataFrame()
for col in seismic.columns():
  df = df.append(col.as_dataframe())
df["I"] = 0

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

The dataframe contains only I, J, K and Value columns. These are the minimum columns needed to allow Investigator to treat the data as seismic. As no X, Y or TWT data is included the plot will default to sampling every 1ms.

[31]:
df.name = name
df.head()
[31]:
I J K Value
0 0 0 0 -1408.0
1 0 0 1 1920.0
2 0 0 2 4608.0
3 0 0 3 4992.0
4 0 0 4 3712.0

Import CegalPrizm Investigator and connect to Investigator

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

invconnection = InvestigatorConnection(use_licensed_features=True)

Create a continuous value object describing the seismic data. This is used by Investigator to identify the values as seismic data and the min/max values to be used when plotting.

[33]:
from cegalprizm.investigator import get_continuous_value_info

continuous_names = ['Value']
continuous_info = { 'Value': get_continuous_value_info(seismic) }

Create a new investigation from the dataframe containing the seismic 2D data.

[34]:
inv = invconnection.investigation_from_dataframe(df, continuous_names, continuous_column_info=continuous_info)

Create a seismic line view from the investigation and plot it.

[35]:
seismic_line_view = SeismicLineView(inv)
investigator.plot(seismic_line_view, width=1500)
[35]:
../../../../../_images/products_Investigator_Workbooks_Tutorials_PTP_Seismic2D_16_0.png
[ ]: