kappa_sdk.Analysis#

class kappa_sdk.Analysis(field_id, well_group_id, well_id, custom_workflow_id, file_id, analysis_id, name, gof, file_type, cluster_apis, analysis_dto_converter, log_log_data=None)[source]#

KW analysis object.

Presents an analysis from the KW document that can be queried for a contained log-log data.

Note

Should not be instantiated directly.

Attributes

Analysis.gof

Gets the goodness of fit of the Analysis if it exists.

Analysis.id

Gets the id of the Analysis object.

Analysis.log_log_data

Returns a list of document vectors contained in this Analysis.

Analysis.name

Gets the name of the Analysis.

Methods

Analysis.delete_well_intakes(dates)

Analysis.get_keg5_from_project([with_wells, ...])

Returns a representation of the run of a Rubis document in keg5 format

Analysis.get_last_well_intake_xml()

Returns the last well intake defined for the analysis in XML format

Analysis.get_model_xml(action)

Returns model definition in KW-KA exchange XML format for this analysis.

Analysis.get_plot_data(plot_type[, use_cache])

Returns a list of document vectors contained in a given plot type of this Analysis.

Analysis.get_well_intake_xml_for_analysis([...])

Returns the last well intake that corresponds to the start_date and intake_name.

Analysis.refresh_log_log_data()

Refresh the cached value of the Analysis.log_log_data property.

Analysis.rename(new_name)

Rename the Analysis

Analysis.set_well_intake_xml_for_analysis(...)

Adds or updates a well intake with a given start date in the specified file and project, if a well intake with given start date already exists it updates it, updates the default well intake if start date is not defined, otherwise adds a new well intake

Analysis.update_project_from_keg5(keg5_xml)

Updates a Rubis run with a document in keg5 format

Parameters:
  • field_id (str)

  • well_group_id (Optional[str])

  • well_id (Optional[str])

  • custom_workflow_id (Optional[str])

  • file_id (str)

  • analysis_id (str)

  • name (str)

  • gof (Optional[float])

  • file_type (KWModuleEnum)

  • cluster_apis (ClusterAPIS)

  • analysis_dto_converter (AnalysisDtoConverter)

  • log_log_data (Optional[List[DocumentVector]])

__init__(field_id, well_group_id, well_id, custom_workflow_id, file_id, analysis_id, name, gof, file_type, cluster_apis, analysis_dto_converter, log_log_data=None)[source]#
Parameters:
  • field_id (str)

  • well_group_id (str | None)

  • well_id (str | None)

  • custom_workflow_id (str | None)

  • file_id (str)

  • analysis_id (str)

  • name (str)

  • gof (float | None)

  • file_type (KWModuleEnum)

  • cluster_apis (ClusterAPIS)

  • analysis_dto_converter (AnalysisDtoConverter)

  • log_log_data (List[DocumentVector] | None)

Return type:

None

property id: str#

Gets the id of the Analysis object.

property name: str#

Gets the name of the Analysis.

property gof: float | None#

Gets the goodness of fit of the Analysis if it exists.

property log_log_data: List[DocumentVector]#

Returns a list of document vectors contained in this Analysis.

refresh_log_log_data()[source]#

Refresh the cached value of the Analysis.log_log_data property.

Return type:

List[DocumentVector]

rename(new_name)[source]#

Rename the Analysis

Parameters:

new_name (str)

Return type:

None

get_plot_data(plot_type, use_cache=True)[source]#

Returns a list of document vectors contained in a given plot type of this Analysis.

Parameters:
  • plot_type (str)

  • use_cache (bool)

Return type:

List[DocumentVector]

get_model_xml(action)[source]#

Returns model definition in KW-KA exchange XML format for this analysis.

Parameters:

action (ModelActionEnum)

Return type:

str

delete_well_intakes(dates)[source]#
Parameters:

dates (List[datetime])

Return type:

None

get_last_well_intake_xml()[source]#

Returns the last well intake defined for the analysis in XML format

Return type:

str

get_well_intake_xml_for_analysis(start_date=None, intake_name=None)[source]#

Returns the last well intake that corresponds to the start_date and intake_name. At least one of these two fields is mandatory.

Parameters:
  • start_date (datetime | None)

  • intake_name (str | None)

Return type:

str

set_well_intake_xml_for_analysis(well_intake_xml)[source]#

Adds or updates a well intake with a given start date in the specified file and project, if a well intake with given start date already exists it updates it, updates the default well intake if start date is not defined, otherwise adds a new well intake

Parameters:

well_intake_xml (str)

Return type:

None

get_keg5_from_project(with_wells=True, with_faults=True, with_pvt=True, with_properties=True, with_layers_regions=True, with_contours=True)[source]#

Returns a representation of the run of a Rubis document in keg5 format

Parameters:
  • with_wells (bool)

  • with_faults (bool)

  • with_pvt (bool)

  • with_properties (bool)

  • with_layers_regions (bool)

  • with_contours (bool)

Return type:

str

update_project_from_keg5(keg5_xml, with_pvt=True, with_properties=True, with_layers_regions=True, with_contours=True)[source]#

Updates a Rubis run with a document in keg5 format

Parameters:
  • keg5_xml (str)

  • with_pvt (bool)

  • with_properties (bool)

  • with_layers_regions (bool)

  • with_contours (bool)

Return type:

None