Getting Started#

Access Petrel investigations#

CegalPrizm Investigator is powered by Hub, which allows data integration across different platforms. This allows the user to run Python either on a local machine, connected to a local Petrel or alternatively to access a Petrel instance from a remote Python environment running in the cloud or a corporate data centre. As such, the Python environment can now be running on a Linux machine.

To access a Petrel investigation, Investigator requires a connection to be established from the preferred client-side Python IDE to the Hub server. To establish a local or remote connection where the Python Tool Pro Python client and the Hub Server are running in the same environment use the following code:

from cegalprizm.investigator import InvestigatorConnection
invconnection = InvestigatorConnection(use_licensed_features=True)

Now your Investigator connection is assigned to the Python variable named ‘invconnection’ (It is possible to use any string for this). For more details on the Hub configuration please consult the Hub documentation.

You can list all the available investigations from Petrel using the following code:


To access the investigation, use the following code:

inv = invconnection.load_investigation('<investigation name>')

Now your investigation is assigned to the Python variable named ‘inv’ (It is possible to use any string for this). You can use it to access the classes and methods from the Investigator API. Replace the <investigation name> with the name of your investigation from Petrel.

This installation guide for Investigator provides step-by-step instructions for the installation process.

Generate investigations from DataFrames#

Users can now create an investigation from a Python DataFrame. This allows the Investigator functionality to be used for any data the user can access in Python. It is not necessary for the data to be loaded into Petrel or even for the data to be geo-science in nature. For example, an investigation could be created from a DataFrame read from a CSV file in Python. Once the investigation has been created all Investigator functionality (including plots) are available. To enable the enriched geo-specific plots, it is necessary to include additional information with the DataFrame to help Investigator correctly display the data. For example, to plot a map it is necessary to have either sample index columns (e.g., I/J) and/or spatial columns (e.g., X/Y) in the DataFrame.

To create an investigation from a DataFrame use the following code:

inv = invconnection.investigation_from_dataframe(<DataFrame name>)

Replace the <DataFrame name> with the name of your DataFrame.


Plotting support is a new feature in Investigator allowing investigation data to be rendered and displayed in different plots from Python. Access to plotting features requires a named user license in Keystone. Plots are rendered using the connected Blueback Investigator plugin in Petrel and displayed in Python. Depending on the data available in the investigation, the following general plots may be created:

  • Histogram

  • Crossplot

  • Matrix

  • Parallel Coordinates Plot

  • Box Plot


Figure 1. General plots available in Investigator#

Investigator also supports the following geo-specific plots:

  • Log track - requires 1D datasets contains Z or TVD dimensions.

  • Map plots - requires 2D or 3D datasets containing sample index columns

  • Seismic lines - requires 2D or 3D datasets containing either sample index columns (I, J) or spatial columns (X, Y)

  • Model intersections - requires a 3D dataset created from a grid model in Petrel


Figure 2. Geo-specific plots available in Investigator#

The plots available for the investigation will depend on the data enrichment that is available in the investigation. Investigations created in Petrel will contain the necessary enrichment, but this is not always possible for investigations created from DataFrames.