ObservedDataSet#
- class cegalprizm.pythontool.ObservedDataSet(petrel_object_link: ObservedDataSetGrpc)#
A class holding information about a observed data set
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.
add_observed_data
(global_observed_data_id, ...)Add a new observed data for this observed data set
append_row
(date, observed_data, ...)Append an entry to the end of this observed data set
Returns a dataframe containing the dates and observed data of this observed data set
clone
(name_of_clone[, copy_values])The Petrel history for the object.
Retrieves a dictionary summarizing the statistics for the object
Properties
The comments on the PetrelObject.
Returns a list of the Dates in this observed data set
The Petrel Droid (object id or guid) for the object
An iterable collection of observed data objects for the ObservedDataSet
The path of this object in Petrel.
Returns the name of this object in Petrel
The read-only status of this object
Returns the Petrel template for the object as a string.
The parent well of the observed data set
- 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
- add_observed_data(global_observed_data_id: str, observed_data_values: List[float]) cegalprizm.pythontool.observeddata.ObservedData #
Add a new observed data for this observed data set
- Parameters
global_observed_data_id – the id for the global observed data to add to this observed data set
observed_data_values – the list of observed data_values to set
- Returns
The newly created observed data object
- Return type
- append_row(date: datetime.datetime, observed_data: List[cegalprizm.pythontool.observeddata.ObservedData], observed_data_values: List[float])#
Append an entry to the end of this observed data set
- Parameters
date – the next date to append, new date must be greater than the the last date entry
observed_data – the order of the observed data for the new observed_data_values
observed_data_values – values to use for the new entry, order must match observed_data input
- Raises
PythonToolException – if input observed_data and observed_data_values count are not equal
- as_dataframe() pandas.core.frame.DataFrame #
Returns a dataframe containing the dates and observed data of this observed data set
- 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
- property comments#
The comments on the PetrelObject.
- Returns
The comments on the PetrelObject as a string.
- Return type
string
- property dates: List[datetime.datetime]#
Returns a list of the Dates in this observed data set
- 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 observed_data: cegalprizm.pythontool.observeddata.WellObservedData#
An iterable collection of observed data objects for the ObservedDataSet
- Returns
the observed data for the observed data set
- Return type
cegalprizm.pythontool.observeddata.WellObservedData
- 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 template: str#
Returns the Petrel template for the object as a string. If no template available, will return an empty string.