geolime.objects.grid¶
Classes:
  | 
Metaclass for defining Abstract Base Classes (ABCs).  | 
  | 
|
  | 
|
  | 
|
  | 
Data:
  | 
Callable type; Callable[[int], str] is a function of (int) -> str.  | 
Functions:
  | 
A decorator indicating abstract methods.  | 
  | 
Example of a convention (RGeoStats)  | 
- 
class 
geolime.objects.grid.Grid(metadata: dict, convention: Callable = <function rot_zyx>)¶ Bases:
objectAttributes:
Return angle array
Summary
Return size of a cell for each axis
Return the Grid dimension
Return number of cells for each axis
Return total number of cells
Return Grid origin coordinates
Return rotation matrix of the grid
Methods:
Retrieve grid boundaries
get_center([i])Retrieve coordinates of a grid center from an index
get_corner([i])Retrieve coordinates of a grid corner from an index
index_to_uvw(i)Convert the unique index of a grid cell to the uvw indices
meshgrid([buffer_parameter])Return coordinates as a numpy meshgrid.
Convert the Grid to a BlockModel object
uvw_to_xyz(v)Compute coordinates of a vector from the grid topology
- 
property 
angle¶ Return angle array
- Returns
 Angle array
- Return type
 np.ndarray
- 
property 
bounds¶ Summary
- Returns
 Description
- Return type
 TYPE
- 
property 
cell_size¶ Return size of a cell for each axis
- Returns
 Cell size per axis
- Return type
 np.ndarray
- 
property 
dimension¶ Return the Grid dimension
- Returns
 1,2 or 3
- Return type
 int
- 
get_bounds()¶ Retrieve grid boundaries
- Returns
 Boundaries
- Return type
 np.ndarray
- 
get_center(i: int = None)¶ Retrieve coordinates of a grid center from an index
- Parameters
 i (int, optional) – Input index
- Returns
 Output coordinates
- Return type
 np.ndarray
- 
get_corner(i: int = None)¶ Retrieve coordinates of a grid corner from an index
- Parameters
 i (int, optional) – Input index
- Returns
 Corner coordinates
- Return type
 np.ndarray
- 
abstract 
index_to_uvw(i: int)¶ Convert the unique index of a grid cell to the uvw indices
- Parameters
 i (int) – Grid cell unique index
- Returns
 Array composed of uvw indices
- Return type
 np.ndarray
- 
meshgrid(buffer_parameter: int = 0)¶ Return coordinates as a numpy meshgrid. If Grid dimension is 2, returns x, y meshgrid. If Grid dimension is 3, returs x, y, z meshgrid.
- Parameters
 buffer_parameter (int, optional) – Number of cells used on each side to extend the grid
- Returns
 numpy meshgrid
- Return type
 np.ndarray, np.ndarray
- 
property 
n_dim¶ Return number of cells for each axis
- Returns
 Number of cells per axis
- Return type
 np.ndarray
- 
property 
number_of_cells¶ Return total number of cells
- Returns
 Grid size
- Return type
 int
- 
property 
origin¶ Return Grid origin coordinates
- Returns
 Grid origin
- Return type
 np.ndarray
- 
property 
rotation¶ Return rotation matrix of the grid
- Returns
 Rotation matrix
- Return type
 np.ndarray
- 
to_block_model()¶ Convert the Grid to a BlockModel object
- Returns
 BlockModel
- Return type
 
- 
uvw_to_xyz(v: numpy.ndarray)¶ Compute coordinates of a vector from the grid topology
- Parameters
 v (np.ndarray) – Input vector
- Returns
 Output coordinates
- Return type
 type
- 
property 
 
- 
class 
geolime.objects.grid.Grid2D(metadata: dict)¶ Bases:
geolime.objects.grid.GridMethods:
index_to_uvw([i])Return 2D coordinates from index
- 
index_to_uvw(i: int = None)¶ Return 2D coordinates from index
- Parameters
 i (int, optional) – Input index
- Returns
 Output coordinates
- Return type
 np.ndarray
- 
 
- 
class 
geolime.objects.grid.Grid3D(metadata: dict)¶ Bases:
geolime.objects.grid.GridMethods:
index_to_uvw([i])Return 3D coordinates from index
- 
index_to_uvw(i: int = None)¶ Return 3D coordinates from index
- Parameters
 i (int, optional) – Input index
- Returns
 Output coordinates
- Return type
 np.ndarray
-