geoh5py.objects package

Submodules

geoh5py.objects.block_model module

class geoh5py.objects.block_model.BlockModel(object_type: geoh5py.objects.object_type.ObjectType, **kwargs)[source]

Bases: geoh5py.objects.object_base.ObjectBase

Rectilinear BlockModel, or 3D tensor mesh, is a container for models defined by three perpendicular axes. Each axis is divided into discrete intervals that define the cell dimensions. Nodal coordinates are determined relative to the origin and the sign of cell delimiters. Negative and positive cell delimiters are accepted to denote relative offsets from the origin.

property centroids

numpy.array, shape (n_cells, 3): Cell center locations in world coordinates.

\[[[x_1, y_1, z_1], ..., [x_i, y_i, z_i]]\]
classmethod default_type_uid() → uuid.UUID[source]
Returns

Default unique identifier

property n_cells

int: Total number of cells

property origin

numpy.array, shape (3, ): Coordinates of the origin

property rotation

float: Clockwise rotation angle (degree) about the vertical axis

property shape

list, len (3, ): Number of cells along the u, v and z-axis

property u_cell_delimiters

numpy.array: Nodal offsets along the u-axis relative to the origin.

property u_cells

numpy.array, shape (shape [0], ): Cell size along the u-axis

property v_cell_delimiters

numpy.array: Nodal offsets along the v-axis relative to the origin.

property v_cells

numpy.array, shape (shape [1], ): Cell size along the v-axis

property z_cell_delimiters

numpy.array: Nodal offsets along the z-axis relative to the origin (positive up).

property z_cells

numpy.array, shape (shape [2], ): Cell size along the z-axis

geoh5py.objects.cell module

class geoh5py.objects.cell.Cell[source]

Bases: object

Warning

Not yet implemented.

geoh5py.objects.curve module

class geoh5py.objects.curve.Curve(object_type: geoh5py.objects.object_type.ObjectType, **kwargs)[source]

Bases: geoh5py.objects.points.Points

Curve object defined by a series of line segments (cells) that connect vertices.

property cells

numpy.ndarray of int, shape (*, 2): Array of indices defining segments connecting vertices. Defined based on parts if set by the user.

classmethod default_type_uid() → uuid.UUID[source]
Returns

Default unique identifier

property parts

numpy.array of int, shape (n_vertices, 2): Group identifiers for vertices connected by line segments as defined by the cells property. Cells property is re-assigned with the setting of parts.

property unique_parts

list of int: Unique part identifiers

class geoh5py.objects.curve.SurveyAirborneMagnetics(object_type: geoh5py.objects.object_type.ObjectType, **kwargs)[source]

Bases: geoh5py.objects.curve.Curve

An airborne magnetic survey object.

Warning

Partially implemented.

classmethod default_type_uid() → uuid.UUID[source]
Returns

Default unique identifier

geoh5py.objects.drillhole module

class geoh5py.objects.drillhole.Drillhole(object_type: geoh5py.objects.object_type.ObjectType, **kwargs)[source]

Bases: geoh5py.objects.object_base.ObjectBase

Drillhole object class

Warning

Not yet implemented.

classmethod default_type_uid() → uuid.UUID[source]

geoh5py.objects.geo_image module

class geoh5py.objects.geo_image.GeoImage(object_type: geoh5py.objects.object_type.ObjectType, **kwargs)[source]

Bases: geoh5py.objects.object_base.ObjectBase

Image object class.

Warning

Not yet implemented.

classmethod default_type_uid() → uuid.UUID[source]

geoh5py.objects.grid2d module

class geoh5py.objects.grid2d.Grid2D(object_type: geoh5py.objects.object_type.ObjectType, **kwargs)[source]

Bases: geoh5py.objects.object_base.ObjectBase

A Grid2D is a rectilinear array uniform cell size. The grid can be oriented in 3D space through rotation and dip parameters. Nodal coordinates are determined relative to the origin and the sign of cell delimiters. Negative and positive cell delimiters are accepted to denote relative “left/right” offsets.

Coordinates 2 3 4 5 6 origin V .__.__.__.__.__ -1 -1 -1 1 1 Delimiters

property cell_center_u

The cell center location along u-axis: shape(u_count,)

property cell_center_v

The cell center location along v-axis: shape(u_count,)

property centroids

Cell center locations in world coordinates [x_i, y_i, z_i]: shape(n_cells, 3)

classmethod default_type_uid() → uuid.UUID[source]
Returns

Default unique identifier

property dip

” Dip angle (positive down) in degree

property n_cells

Number of cells

property origin

Coordinates of the origin: shape (3,)

property rotation

Clockwise rotation angle about the vertical axis in degree: float

property shape

Number of cells along the u, v and z-axis: list[int], length (3,)

property u_cell_size

Cell size along the u-axis: float

property u_count

Number of cells along u-axis: int

property v_cell_size

Cell size along the v-axis

property v_count

Number of cells along v-axis: int

property vertical

Set the grid to be vertical: bool

geoh5py.objects.label module

class geoh5py.objects.label.Label(object_type: geoh5py.objects.object_type.ObjectType, **kwargs)[source]

Bases: geoh5py.objects.object_base.ObjectBase

classmethod default_type_uid() → uuid.UUID[source]

geoh5py.objects.notype_object module

class geoh5py.objects.notype_object.NoTypeObject(object_type: geoh5py.objects.object_type.ObjectType, **kwargs)[source]

Bases: geoh5py.objects.object_base.ObjectBase

Generic Data object without a registered type

classmethod default_type_uid() → uuid.UUID[source]

geoh5py.objects.object_base module

class geoh5py.objects.object_base.ObjectBase(object_type: geoh5py.objects.object_type.ObjectType, **kwargs)[source]

Bases: geoh5py.shared.entity.Entity

Objects base class.

add_data(self, data: dict, property_group: str = None) → Union[geoh5py.data.data.Data, List[geoh5py.data.data.Data]][source]

Create data with association from dictionary of data objects name and values. The provided values can either be a dictionary of kwargs accepted by the target Data object class or an array of values. If not provided as argument, a data association type is assigned based on the length of the given values.

Parameters

data – Dictionary of data to be added to the object, e.g. data = {“data_name1”: {‘values’, values1, ‘association’: ‘VERTEX’, …}, …}

Return data_list

List of new Data objects

add_data_to_group(self, data: Union[List, geoh5py.data.data.Data, uuid.UUID, str], name: str)geoh5py.groups.property_group.PropertyGroup[source]

Append data to a property group where the data can be a Data object, its name or uid. The given group identifier (name or uid) is created if it does not exist already. All given data must be children of the object.

Parameters
  • data – Data object or uuid of data

  • name – Name of a property group. A new group is created if none exist with the given name.

Return property_group

The target property_group

property cells

Cells

abstract classmethod default_type_uid() → uuid.UUID[source]
property entity_type

Object type: EntityType

property faces

Faces

find_or_create_property_group(self, \*\*kwargs)geoh5py.groups.property_group.PropertyGroup[source]

Create property groups from given group names and properties. An existing property_group is returned if one exists with the same name.

Parameters

kwargs – Any arguments taken by the PropertyGroup class

Returns

A new or existing property_group object

classmethod find_or_create_type(workspace: 'workspace.Workspace', \*\*kwargs)geoh5py.objects.object_type.ObjectType[source]

Find or create a type for a given object class

Parameters

workspace (Current) – Workspace

Returns

A new or existing object type

get_data(self, name: str) → List[geoh5py.data.data.Data][source]

Get data objects by name

Parameters

name – Name of the target child data

Returns

A list of children Data objects

get_data_list(self) → List[str][source]
Returns

List of names of data associated with the object

get_property_group(self, group_id: Union[str, uuid.UUID]) → Union[geoh5py.groups.property_group.PropertyGroup, NoneType][source]

Retrieve a property_group from one of its identifier, either by name or uuid

Parameters

group_id – PropertyGroup identifier, either name or uuid

Returns

PropertyGroup with the given name

property last_focus

Object visible in camera on start: bool

property n_cells
Returns
n_cells: int

Number of cells

property n_vertices

Number of vertices

Returns

Number of vertices

property property_groups

List of property (data) groups: List[PropertyGroup]

property vertices

Vertices

geoh5py.objects.object_type module

class geoh5py.objects.object_type.ObjectType(workspace: workspace.Workspace, **kwargs)[source]

Bases: geoh5py.shared.entity_type.EntityType

static create_custom(workspace: “‘workspace.Workspace’”) → ’ObjectType’[source]

Creates a new instance of ObjectType for an unlisted custom Object type with a new auto-generated UUID.

classmethod find_or_create(workspace: "'workspace.Workspace'", entity_class, \*\*kwargs) → ’ObjectType’[source]

Find or creates an EntityType with given UUID that matches the given Group implementation class.

It is expected to have a single instance of EntityType in the Workspace for each concrete Entity class.

Parameters
  • workspace – An active Workspace class

  • entity_class – An Group implementation class.

Returns

A new instance of GroupType.

geoh5py.objects.octree module

class geoh5py.objects.octree.Octree(object_type: geoh5py.objects.object_type.ObjectType, **kwargs)[source]

Bases: geoh5py.objects.object_base.ObjectBase

Octree mesh class that uses a tree structure where cells can be subdivided it into eight octants.

The basic requirements needed to create an Octree mesh are:

u, v, and w_count = Number of cells (power of 2) along each axis u, v, and w_cell_size = Cell size along each axis

base_refine(self)[source]

Refine the mesh to its base octree level resulting in a single cell along the shortest dimension.

property centroids

Coordinate locations of each cell centers [[x_i, y_i, z_i], …]

Return centroids

array of floats, shape(nC, 3)

classmethod default_type_uid() → uuid.UUID[source]
property n_cells

Total number of cells in the mesh

property octree_cells
Array defining the i,j,k ordering and cell dimensions

[i, j, k, n_cells]

Return octree_cells

numpy.ndarray(int) of shape (nC, 4)

property origin

Coordinates of the origin: array of floats, shape (3,)

property rotation

Clockwise rotation angle (degree) about the vertical axis

property shape

Number of base cells along the u, v and w-axis

property u_cell_size

Base cell size along the u-coordinate

property u_count

Number of base cells along u-axis

property v_cell_size

Base cell size along the v-coordinate

property v_count

Number of base cells along v-axis

property w_cell_size

Base cell size along the w-coordinate

property w_count

Number of base cells along w-axis

geoh5py.objects.points module

class geoh5py.objects.points.Points(object_type: geoh5py.objects.object_type.ObjectType, **kwargs)[source]

Bases: geoh5py.objects.object_base.ObjectBase

Points object

classmethod default_type_uid() → uuid.UUID[source]
property vertices

vertices

geoh5py.objects.surface module

class geoh5py.objects.surface.Surface(object_type: geoh5py.objects.object_type.ObjectType, **kwargs)[source]

Bases: geoh5py.objects.points.Points

Surface object defined by vertices and cells

property cells

Array of vertices index forming triangles :return cells: array of int, shape (“*”, 3)

classmethod default_type_uid() → uuid.UUID[source]

geoh5py.objects.survey_location module

class geoh5py.objects.survey_location.SurveyLocation[source]

Bases: object

Module contents