resqpy.strata.StratigraphicUnitInterpretation

class resqpy.strata.StratigraphicUnitInterpretation(parent_model, uuid=None, title=None, domain='depth', stratigraphic_unit_feature=None, composition=None, material_implacement=None, deposition_mode=None, min_thickness=None, max_thickness=None, thickness_uom=None, extra_metadata=None)

Bases: GeologicUnitInterpretation

Class for RESQML Stratigraphic Unit Interpretation objects.

RESQML documentation:

Interpretation of a stratigraphic unit which includes the knowledge of the top, the bottom, the deposition mode.

Public Data Attributes:

resqml_type

stratigraphic_unit_feature

Returns the interpreted geologic unit feature.

Inherited from GeologicUnitInterpretation

resqml_type

Inherited from BaseResqpy

resqml_type

part

Standard part name corresponding to self.uuid.

root

XML node corresponding to self.uuid.

citation_title

Citation block title equivalent to self.title.

Methods:

__init__(parent_model[, uuid, title, ...])

Initialises a stratigraphic unit interpretation object.

is_equivalent(other[, check_extra_metadata])

Returns True if this interpretation is essentially the same as the other; otherwise False.

create_xml([add_as_part, add_relationships, ...])

Creates a stratigraphic unit interpretation xml tree.

Inherited from GeologicUnitInterpretation

__init__(parent_model[, uuid, title, ...])

Initialises a stratigraphic unit interpretation object.

is_equivalent(other[, check_extra_metadata])

Returns True if this interpretation is essentially the same as the other; otherwise False.

create_xml([add_as_part, add_relationships, ...])

Creates a stratigraphic unit interpretation xml tree.

Inherited from BaseResqpy

__init__(parent_model[, uuid, title, ...])

Initialises a stratigraphic unit interpretation object.

try_reuse()

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 unit 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, title=None, domain='depth', stratigraphic_unit_feature=None, composition=None, material_implacement=None, deposition_mode=None, min_thickness=None, max_thickness=None, thickness_uom=None, extra_metadata=None)[source]

Initialises a stratigraphic unit interpretation object.

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 unit interpretation from which this object will be initialised

  • title (str, optional) – the citation title (feature name) of the new interpretation; ignored if uuid is not None

  • domain (str, default 'time') – ‘time’, ‘depth’ or ‘mixed’, being the domain of the interpretation; ignored if uuid is not None

  • stratigraphic_unit_feature (StratigraphicUnitFeature, optional) – the feature which this object is an interpretation of; ignored if uuid is not None

  • composition (str, optional) – the interpreted composition of the stratigraphic unit; if present, must be in valid_compositions; ignored if uuid is not None

  • material_implacement (str, optional) – the interpeted material implacement of the stratigraphic unit; if present, must be in valid_implacements, ie. ‘autochtonous’ or ‘allochtonous’; ignored if uuid is not None

  • deposition_mode (str, optional) – indicates whether deposition within the unit is interpreted as parallel to top, base or another boundary, or is proportional to thickness; if present, must be in valid_deposition_modes; ignored if uuid is not None

  • min_thickness (float, optional) – the minimum thickness of the unit; ignored if uuid is not None

  • max_thickness (float, optional) – the maximum thickness of the unit; ignored if uuid is not None

  • thickness_uom (str, optional) – the length unit of measure of the minimum and maximum thickness; required if either thickness argument is provided and uuid is None; if present, must be a valid length uom

  • extra_metadata (dict, optional) – extra metadata items for the new interpretation

Returns

a new stratigraphic unit interpretation resqpy object

Notes

if given, the thickness_uom must be a valid RESQML length unit of measure; the set of valid uoms is returned by: weights_and_measures.valid_uoms(quantity = ‘length’); the RESQML 2.0.1 schema definition includes a spurious trailing space in the names of two compositions; resqpy removes such spaces in the composition attribute as presented to calling code (but includes them in xml)

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 unit 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 stratigraphic 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

is_equivalent(other, check_extra_metadata=True)[source]

Returns True if this interpretation is essentially the same as the other; otherwise False.

Parameters
  • other (StratigraphicUnitInterpretation) – the other interpretation to compare this one against

  • check_extra_metadata (bool, default True) – if True, then extra metadata items must match for the two interpretations to be deemed equivalent; if False, extra metadata is ignored in the comparison

Returns

bool – True if this interpretation is essentially the same as the other; False otherwise

property part

Standard part name corresponding to self.uuid.

property root

XML node corresponding to self.uuid.

property stratigraphic_unit_feature

Returns the interpreted geologic unit feature.

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

title

Citation title

originator

Creator of object. By default, user id.

uuid

Unique identifier