Python Tool Pro - Plotting 3D seismic data#

Connect to Python Tool Pro

[37]:
from cegalprizm.pythontool import PetrelConnection

ptp = PetrelConnection(allow_experimental=True)

Import CegalPrizm Investigator and connect to Investigator

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

invconnection = InvestigatorConnection(use_licensed_features=True)

Select the seismic 3D cube by name

[39]:
name = 'Input/Seismic/Seismic Data/Orig Amp'
seismic = ptp.seismic_cubes[name]

Print the extents of the cube

[40]:
seismic.extent
[40]:
Extent(i=375, j=301, k=227)

Create a continuous value object describing the seismic data.

This is used by Investigator to identify the values as seismic data and allows min/max values to be specified. These ensure that the colorscales from the different plots are consistent for the same seismic data.

[10]:
from cegalprizm.investigator import get_continuous_value_info

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

Show seismic Z slice in map plot#

Create a dataframe from the seismic cube chunk. The chunk contains as all i, all j and a single k value.

[41]:
seismic_z_df = seismic.chunk(irange=None, jrange=None, krange=50).as_dataframe()

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.

[42]:
seismic_z_df.name = name
seismic_z_df.head()
[42]:
I J K Value
0 0 0 50 2216.423340
1 0 1 50 2888.066895
2 0 2 50 1410.451294
3 0 3 50 1141.793823
4 0 4 50 604.479126

Create a new investigation from the dataframe containing the seismic data

[12]:
seismic_z_inv = invconnection.investigation_from_dataframe(seismic_z_df, continuous_names, continuous_column_info=continuous_info)

Create a map view from the investigation and plot it

[13]:
seismic_z_view = MapView(seismic_z_inv)
investigator.plot(seismic_z_view)
[13]:
../../../../../_images/products_Investigator_Workbooks_Tutorials_PTP_Seismic3D_19_0.png

Show seismic in seismic line plot#

Create a dataframe from the seismic cube chunk. The chunk contains as a single i, all i, all j and all k values.

[22]:
seismic_cube_df = seismic.chunk(irange=(30,35), jrange=None, krange=None).as_dataframe()

Create a new investigation from the dataframe containing the seismic data

[28]:
seismic_cube_inv = invconnection.investigation_from_dataframe(seismic_cube_df, continuous_names, continuous_column_info=continuous_info)

Create a seismic line view from the investigation and plot it

[31]:
seismic_cube_view = SeismicLineView(seismic_cube_inv)
investigator.plot(seismic_cube_view, width=1500)
[31]:
../../../../../_images/products_Investigator_Workbooks_Tutorials_PTP_Seismic3D_26_0.png