gempy.core.data.SurfacePointsTable

class gempy.core.data.SurfacePointsTable(data: ndarray = FieldInfo(annotation=NoneType, required=False, default=array([], dtype=[('X', '<f8'), ('Y', '<f8'), ('Z', '<f8'), ('id', '<i4'), ('nugget', '<f8')]), description='A structured NumPy array holding the X, Y, Z coordinates, id, and nugget of each surface point.', exclude=True), name_id_map: dict[str, int] | None = None, _model_transform: Transform | None = None)[source]

A dataclass to represent a table of surface points in a geological model.

Examples using gempy.core.data.SurfacePointsTable

Basics: Data Classes and Modeling API

Basics: Data Classes and Modeling API

Saving and Loading gempy Models

Saving and Loading gempy Models

Claudius, Queensland, Australia

Claudius, Queensland, Australia

Hecho, Spanish Pyrenees

Hecho, Spanish Pyrenees

Mourèze, France

Mourèze, France

Methods

__init__([data, name_id_map, _model_transform])

from_arrays(x, y, z, names[, nugget, ...])

Create a SurfacePointsTable from arrays of coordinates and names.

get_surface_points_by_id(id)

Get a SurfacePointsTable containing points with the specified id.

get_surface_points_by_id_groups()

Get a list of SurfacePointsTable objects, each containing points with a unique id.

get_surface_points_by_name(name)

Get a SurfacePointsTable containing points with the specified name.

id_to_name(id)

Get the name corresponding to a given id.

initialize_empty()

Initialize an empty SurfacePointsTable.

Attributes

data

A structured NumPy array holding the X, Y, Z coordinates, id, and nugget of each surface point.

df

dt

The custom data type for the data array.

id

ids

model_transform

name_id_map

A mapping between surface point names and ids.

nugget

xyz

xyz_view

dt = dtype([('X', '<f8'), ('Y', '<f8'), ('Z', '<f8'), ('id', '<i4'), ('nugget', '<f8')])

The custom data type for the data array.

data: ndarray = array([],       dtype=[('X', '<f8'), ('Y', '<f8'), ('Z', '<f8'), ('id', '<i4'), ('nugget', '<f8')])

A structured NumPy array holding the X, Y, Z coordinates, id, and nugget of each surface point.

name_id_map: dict[str, int] | None = None

A mapping between surface point names and ids.

classmethod from_arrays(x: ndarray, y: ndarray, z: ndarray, names: Sequence | str, nugget: ndarray | None = None, name_id_map: dict[str, int] | None = None) → SurfacePointsTable[source]

Create a SurfacePointsTable from arrays of coordinates and names.

Parameters:
  • x (np.ndarray) – Array of x-coordinates.

  • y (np.ndarray) – Array of y-coordinates.

  • z (np.ndarray) – Array of z-coordinates.

  • names (Union[Sequence, str]) – Names of the surface points.

  • nugget (Optional[np.ndarray]) – Nugget values for the surface points.

  • name_id_map (Optional[dict[str, int]]) – Mapping between surface point names and ids.

Returns:

A new instance of SurfacePointsTable.

Return type:

SurfacePointsTable

classmethod initialize_empty() → SurfacePointsTable[source]

Initialize an empty SurfacePointsTable.

Returns:

An empty instance of SurfacePointsTable.

Return type:

SurfacePointsTable

id_to_name(id: int) → str[source]

Get the name corresponding to a given id.

Parameters:

id (int) – The id of the surface point.

Returns:

The name of the surface point.

Return type:

str

get_surface_points_by_name(name: str) → SurfacePointsTable[source]

Get a SurfacePointsTable containing points with the specified name.

Parameters:

name (str) – The name of the surface points.

Returns:

A new instance containing the specified surface points.

Return type:

SurfacePointsTable

get_surface_points_by_id(id: int) → SurfacePointsTable[source]

Get a SurfacePointsTable containing points with the specified id.

Parameters:

id (int) – The id of the surface points.

Returns:

A new instance containing the specified surface points.

Return type:

SurfacePointsTable

get_surface_points_by_id_groups() → list[SurfacePointsTable][source]

Get a list of SurfacePointsTable objects, each containing points with a unique id.

Returns:

A list of SurfacePointsTable objects.

Return type:

list[SurfacePointsTable]

__init__(data: ndarray = FieldInfo(annotation=NoneType, required=False, default=array([], dtype=[('X', '<f8'), ('Y', '<f8'), ('Z', '<f8'), ('id', '<i4'), ('nugget', '<f8')]), description='A structured NumPy array holding the X, Y, Z coordinates, id, and nugget of each surface point.', exclude=True), name_id_map: dict[str, int] | None = None, _model_transform: Transform | None = None) → None