gempy.core.data.Topography¶
- class gempy.core.data.Topography(_regular_grid: RegularGrid, values_2d: ndarray, FieldInfo(annotation=NoneType, required=True, exclude=True)] = <factory>, source: str | None = None, resolution: Tuple[int, int]=FieldInfo(annotation=NoneType, required=False, default=(0, 0), init=True))[source]¶
Object to include topography in the model. .. rubric:: Notes
This always assumes that the topography we pass fits perfectly the extent.
Methods
__init__(_regular_grid, values_2d, ...[, init])from_arrays(regular_grid, x_coordinates, ...)Creates a topography object from a subsurface structured data object
from_unstructured_mesh(regular_grid, ...)Creates a topography object from an unstructured mesh of XYZ vertices.
load(path)load_from_saved(*args, **kwargs)load_random_hills(**kwargs)resize_topo()save(path)set_values(values_2d)General method to set topography
set_values2d(values)Reconstruct the 2D topography (shape = resolution + [3]) from a flat Nx3 array (or from self.values if none is provided).
set_values2d_(values)Attributes
extentregular_grid_resolutionresolutionsourceThis method takes a topography grid of the same extent as the regular grid and creates a mask of voxels
xyvalues_2dvaluesraster_shape- classmethod from_subsurface_structured_data(structured_data: subsurface.StructuredData, regular_grid: RegularGrid)[source]¶
Creates a topography object from a subsurface structured data object
- Parameters:
structured_data (subsurface.StructuredData) – Structured data object
- Returns:
gempy.core.grid_modules.topography.Topography
- classmethod from_unstructured_mesh(regular_grid, xyz_vertices)[source]¶
Creates a topography object from an unstructured mesh of XYZ vertices.
- Parameters:
regular_grid (RegularGrid) – The regular grid object.
xyz_vertices (numpy.ndarray) – Array of XYZ vertices of the unstructured mesh.
- Returns:
gempy.core.grid_modules.topography.Topography
- set_values(values_2d: ndarray)[source]¶
General method to set topography
- Parameters:
values_2d (numpy.ndarray[float,float, 3]) – array with the XYZ values in 2D
- Returns:
gempy.core.grid_modules.topography.Topography
- set_values2d(values: ndarray) Topography[source]¶
Reconstruct the 2D topography (shape = resolution + [3]) from a flat Nx3 array (or from self.values if none is provided).
- property topography_mask¶
This method takes a topography grid of the same extent as the regular grid and creates a mask of voxels
- __init__(_regular_grid: RegularGrid, values_2d: ndarray, FieldInfo(annotation=NoneType, required=True, exclude=True)] = <factory>, source: str | None = None, resolution: Tuple[int, int]=FieldInfo(annotation=NoneType, required=False, default=(0, 0), init=True)) None¶