gempy.core.grid_modules.grid_types.RegularGrid

class gempy.core.grid_modules.grid_types.RegularGrid(extent=None, resolution=None, **kwargs)[source]

Class with the methods and properties to manage 3D regular grids where the model will be interpolated.

Parameters
  • extent (np.ndarray) – [x_min, x_max, y_min, y_max, z_min, z_max]

  • resolution (np.ndarray) – [nx, ny, nz]

extent

[x_min, x_max, y_min, y_max, z_min, z_max]

Type

np.ndarray

resolution

[nx, ny, nz]

Type

np.ndarray

values

XYZ coordinates

Type

np.ndarray

mask_topo

same shape as values. Values above the topography are False

Type

np.ndarray, dtype=bool

dx

size of the cells on x

Type

float

dy

size of the cells on y

Type

float

dz

size of the cells on z

Type

float

Examples using RegularGrid

Methods

__init__([extent, resolution])

Initialize self.

create_regular_grid_3d(extent, resolution)

Method to create a 3D regular grid where is interpolated

get_dx_dy_dz([rescale])

set_coord(extent, resolution)

set_regular_grid(extent, resolution)

Set a regular grid into the values parameters for further computations :param extent: [x_min, x_max, y_min, y_max, z_min, z_max] :type extent: list, np.ndarry

set_topography_mask(topography)

This method takes a topography grid of the same extent as the regular

__init__(extent=None, resolution=None, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

create_regular_grid_3d(extent, resolution)[source]

Method to create a 3D regular grid where is interpolated

Parameters
  • extent (list) – [x_min, x_max, y_min, y_max, z_min, z_max]

  • resolution (list) – [nx, ny, nz].

Returns

Unraveled 3D numpy array where every row correspond to the xyz coordinates of a regular grid

Return type

numpy.ndarray

set_regular_grid(extent, resolution)[source]

Set a regular grid into the values parameters for further computations :param extent: [x_min, x_max, y_min, y_max, z_min, z_max] :type extent: list, np.ndarry

resolution (list, np.ndarray): [nx, ny, nz]

set_topography_mask(topography)[source]
This method takes a topography grid of the same extent as the regular

grid and creates a mask of voxels

Parameters

topography (gempy.core.grid_modules.topography.Topography) –

Returns: