resqpy.strata.StratigraphicColumnRank¶
- class resqpy.strata.StratigraphicColumnRank(parent_model, uuid=None, domain='time', rank_index=None, earth_model_feature_uuid=None, strata_uuid_list=None, title=None, extra_metadata=None)¶
Bases:
BaseResqpy
Class for RESQML StratigraphicColumnRankInterpretation objects.
A list of stratigraphic unit interpretations, ordered from geologically oldest to youngest.
Public Data Attributes:
resqml_type
Inherited from
BaseResqpy
resqml_type
Standard part name corresponding to self.uuid.
XML node corresponding to self.uuid.
Citation block title equivalent to self.title.
Methods:
__init__
(parent_model[, uuid, domain, ...])Initialises a Stratigraphic Column Rank resqpy object (RESQML StratigraphicColumnRankInterpretation).
set_units
(strata_uuid_list)Discard any previous units and set list of units based on ordered list of uuids.
set_contacts_from_horizons
(horizon_uuids[, ...])Sets the list of contacts from an ordered list of horizons, of length one less than the number of units.
Yields the ordered stratigraphic unit interpretations which constitute this stratigraphic colunn.
unit_for_unit_index
(index)Returns the stratigraphic unit interpretation with the given index in this stratigraphic colunn.
Yields the internal binary contact interpretations of this stratigraphic colunn.
create_xml
([add_as_part, add_relationships, ...])Creates a stratigraphic column rank interpretation xml tree.
Inherited from
BaseResqpy
__init__
(parent_model[, uuid, domain, ...])Initialises a Stratigraphic Column Rank resqpy object (RESQML StratigraphicColumnRankInterpretation).
Look for an equivalent existing RESQML object and modify the uuid of this object if found.
create_xml
([add_as_part, add_relationships, ...])Creates a stratigraphic column rank interpretation xml tree.
append_extra_metadata
(meta_dict)Append a given dictionary of metadata to the existing metadata.
__eq__
(other)Implements equals operator; uses is_equivalent() otherwise compares class type and uuid.
__ne__
(other)Implements not equal operator.
__repr__
()String representation.
- __init__(parent_model, uuid=None, domain='time', rank_index=None, earth_model_feature_uuid=None, strata_uuid_list=None, title=None, extra_metadata=None)[source]¶
Initialises a Stratigraphic Column Rank resqpy object (RESQML StratigraphicColumnRankInterpretation).
- Parameters
parent_model (model.Model) – the model with which the new interpretation will be associated
uuid (uuid.UUID, optional) – the uuid of an existing RESQML stratigraphic column rank interpretation from which this object will be initialised
domain (str, default 'time') – ‘time’, ‘depth’ or ‘mixed’, being the domain of the interpretation; ignored if uuid is not None
rank_index (int, optional) – the rank index (RESQML index) for this rank when multiple ranks are used; will default to zero if not set; ignored if uuid is not None
earth_model_feature_uuid (uuid.UUID, optional) – the uuid of an existing organization feature of kind ‘earth model’ which this stratigraphic column is for; ignored if uuid is not None
strata_uuid_list (list of uuid.UUID, optional) – a list of uuids of existing stratigraphic unit interpretations, ordered from geologically oldest to youngest; ignored if uuid is not None
title (str, optional) – the citation title (feature name) of the new interpretation; ignored if uuid is not None
extra_metadata (dict, optional) – extra metadata items for the new stratigraphic column rank interpretation
- append_extra_metadata(meta_dict)¶
Append a given dictionary of metadata to the existing metadata.
- property citation_title¶
Citation block title equivalent to self.title.
- create_xml(add_as_part=True, add_relationships=True, originator=None, reuse=True)[source]¶
Creates a stratigraphic column rank interpretation xml tree.
- Parameters
add_as_part (bool, default True) – if True, the interpretation is added to the parent model as a high level part
add_relationships (bool, default True) – if True and add_as_part is True, a relationship is created with the referenced geologic unit feature
originator (str, optional) – if present, is used as the originator field of the citation block
reuse (bool, default True) – if True, the parent model is inspected for any equivalent interpretation and, if found, the uuid of this interpretation is set to that of the equivalent part
- Returns
lxml.etree._Element – the root node of the newly created xml tree for the interpretation
- iter_contacts()[source]¶
Yields the internal binary contact interpretations of this stratigraphic colunn.
- iter_units()[source]¶
Yields the ordered stratigraphic unit interpretations which constitute this stratigraphic colunn.
- property part¶
Standard part name corresponding to self.uuid.
- property root¶
XML node corresponding to self.uuid.
- set_contacts_from_horizons(horizon_uuids, older_contact_mode=None, younger_contact_mode=None)[source]¶
Sets the list of contacts from an ordered list of horizons, of length one less than the number of units.
- Parameters
horizon_uuids (list of uuid.UUID) – list of horizon interpretation uuids, ordered from geologically oldest to youngest, with one horizon for each neighbouring pair of stratigraphic units in this column
older_contact_mode (str, optional) – if present, the contact mode to set for the older unit for all of the contacts; must be in valid_contact_modes
younger_contact_mode (str, optional) – if present, the contact mode to set for the younger unit for all of the contacts; must be in valid_contact_modes
Notes
units must be established and sorted before calling this method; any previous contacts are discarded; if differing modes are required for the various contacts, leave the contact mode arguments as None, then interate over the contacts setting each mode individually (after this method returns)
- set_units(strata_uuid_list)[source]¶
Discard any previous units and set list of units based on ordered list of uuids.
- Parameters
strata_uuid_list (list of uuid.UUID) – the uuids of the stratigraphic unit interpretations which constitute this stratigraphic column, ordered from geologically oldest to youngest
- try_reuse()¶
Look for an equivalent existing RESQML object and modify the uuid of this object if found.
- Returns
boolean – True if an equivalent object was found, False if not
Note
by design this method may change this object’s uuid as a side effect
- unit_for_unit_index(index)[source]¶
Returns the stratigraphic unit interpretation with the given index in this stratigraphic colunn.
- title¶
Citation title
- originator¶
Creator of object. By default, user id.
- uuid¶
Unique identifier