WellSurvey#

class cegalprizm.pythontool.WellSurvey(petrel_object_link: Union[DxdytvdWellSurveyGrpc, ExplicitWellSurveyGrpc, MdinclazimWellSurveyGrpc, XyzWellSurveyGrpc, XytvdWellSurveyGrpc])#

A class holding information about a well survey

Functions

__init__(petrel_object_link)

add_comment(new_comment[, overwrite])

Add a comment to the already existing comments on the PetrelObject, or overwrite the existing comments.

as_dataframe()

The records of the well survey as a Pandas DataFrame

clone(name_of_clone[, copy_values])

Creates a clone of the Petrel object.

retrieve_history()

The Petrel history for the object.

retrieve_stats()

Retrieves a dictionary summarizing the statistics for the object

set([xs, ys, zs, dxs, dys, tvds, mds, ...])

Replaces all the records with the supplied arrays.

set_survey_as_definitive()

Set well survey as definitive

Properties

azimuth_reference

The azimuth reference for well survey types MD inclination azimuth survey and DX DY TVD survey

comments

The comments on the PetrelObject.

droid

The Petrel Droid (object id or guid) for the object

path

The path of this object in Petrel.

petrel_name

Returns the name of this object in Petrel

readonly

The read-only status of this object

record_count

The number of records in this well survey

template

Returns the Petrel template for the object as a string.

tie_in_md

Returns the tie-in MD point

well

The well to which this well survey belongs to

well_survey_type

Returns the type of well survey

add_comment(new_comment: str, overwrite: bool = False) None#

Add a comment to the already existing comments on the PetrelObject, or overwrite the existing comments.

Input:

new_comment: The new comment to add to the PetrelObject. overwrite: Boolean flag to overwrite all existing comments with the new comment. Default is False.

Raises

PythonToolException – if object is read-only

as_dataframe() pandas.core.frame.DataFrame#

The records of the well survey as a Pandas DataFrame

The Ocean API limits what columns of the trajectory spreadsheet in Petrel are available to retrieve. The returned dataframe contains all possible columns.

Returns

A Pandas DataFrame containing the available columns from the well survey spreadsheet

clone(name_of_clone: str, copy_values: bool = False) cegalprizm.pythontool.wellsurvey.WellSurvey#

Creates a clone of the Petrel object.

The clone is placed in the same collection as the source object. A clone cannot be created with the same name as an existing Petrel object in the same collection.

This is a Python Tool Pro function and is not available when running scripts in the editor integrated in Python Tool or in a workflow.

Parameters
  • path_of_clone – Petrel name of the clone

  • copy_values – Set to True if values shall be copied into the clone. Defaults to False.

Returns

The clone

Return type

WellSurvey

Raises
  • Exception – If there already exists a Petrel object with the same name

  • ValueError – If name_of_clone is empty or contains slashes

retrieve_history() pandas.core.frame.DataFrame#

The Petrel history for the object.

Returns the Petrel history for the object as Pandas dataframe.

Returns

The history of the object as reported by Petrel

Return type

DataFrame

retrieve_stats() Dict[str, str]#

Retrieves a dictionary summarizing the statistics for the object

The statistics are a snapshot of the information in the Statistics page of the Settings panel of the object in the Petrel tree. Both the dict key and value are strings, and may contain punctuation, English phrases or just filler information. Any changes to the dict returned will not be saved or affect anything.

Note: this operation may be slow, since the statistics are ‘live’ - they represent the most up to date information.

Returns

The statistics of the object as reported by Petrel

Return type

dict

set(xs: Optional[List[float]] = None, ys: Optional[List[float]] = None, zs: Optional[List[float]] = None, dxs: Optional[List[float]] = None, dys: Optional[List[float]] = None, tvds: Optional[List[float]] = None, mds: Optional[List[float]] = None, incls: Optional[List[float]] = None, azims: Optional[List[float]] = None) None#

Replaces all the records with the supplied arrays.

For X Y Z survey - xs, ys, and zs is required as input

For X Y TVD survey - xs, ys, tvds is required as input

For DX DY TVD survey - dxs, dys and tvds is required as input

For MD inclination azimuth - mds, incls and azims is required as input

For Explicit survey - cannot modify records for well survey of type Explicit survey

Parameters
  • xs – a list of x values

  • ys – a list of y values

  • zs – a list of z values

  • dxs – a list of dx values

  • dys – a list of dy values

  • mds – a list of md values

  • incls – a list of inclination values

  • azims – a list of azimuth values

Raises
  • PythonToolException – If the well survey is type Explicit survey or if WellSurvey is readonly

  • ValueError – If the required input arrays are not provided or if they are of un-equal lengths

set_survey_as_definitive()#

Set well survey as definitive

property azimuth_reference: str#

The azimuth reference for well survey types MD inclination azimuth survey and DX DY TVD survey

Returns

‘Grid north’ or ‘True north’

Return type

string

Raises

PythonToolException – If the well survey is X Y Z well survey, X Y TVD well survey or Explicit survey

property comments#

The comments on the PetrelObject.

Returns

The comments on the PetrelObject as a string.

Return type

string

property droid: str#

The Petrel Droid (object id or guid) for the object

Returns the Petrel Droid or object id or guid for the object. If not available, will throw a PythonToolException.

This property is planned to be deprecated in favour of a similar but more general id schema in future releases.

Returns

The Petrel Droid of the object

Return type

str

property path: str#

The path of this object in Petrel. Neither the Petrel name nor the path is guaranteed to be unique.

Returns

The path of the Petrel object

Return type

str

property petrel_name: str#

Returns the name of this object in Petrel

property readonly: bool#

The read-only status of this object

Returns

True if the object is read-only

Return type

bool

property record_count: int#

The number of records in this well survey

property template: str#

Returns the Petrel template for the object as a string. If no template available, will return an empty string.

property tie_in_md: float#

Returns the tie-in MD point

Raises

PythonToolException – If the well survey is not lateral

property well: Well#

The well to which this well survey belongs to

Returns

the well for this well survey

Return type

cegalprizm.pythontool.Well

property well_survey_type: str#

Returns the type of well survey

Returns

‘X Y Z survey’

or ‘X Y TVD survey’ or ‘DX DY TVD survey’ or ‘MD inclination azimuth survey’ or ‘Explicit survey’