Block Model🍋
BlockModel
🍋
Bases: GridObject
A BlockModel is considered cartesian/XYZ oriented with fixed cell size. The cells may not be contiguous and don't have to all be defined. The grid is considered cell-centered.
For instance, a block model can be of shape 5 x 3 x 2 but only have 3 cells defined at [1, 2, 1], [1, 3, 1] and [2, 3, 1].
Grid dimensions and cell sizes are inferred from the X, Y, Z geometry. The grid is assumed to be cartesian and to have a constant cell size.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
object name. |
required |
xyz |
Optional[Data]
|
cell centers of the block model. |
None
|
atol |
float
|
absolute tolerance used to automatically calculate the cell dimension. It is the distance tolerance (same unit as xyz) to consider whether the dimensions of all cells can be considered equal. Defaults to 0.001. |
0.001
|
Raises:
Type | Description |
---|---|
ValueError
|
|
Example
import geolime as geo
import numpy as np
xyz = np.arange(30).reshape(10, 3)
bm = geo.BlockModel("MyBM", xyz)
delete_cells(region)
🍋
Delete cells in region.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
region |
str
|
Region or condition to select cells. |
required |
keep_only_cells(region)
🍋
Keep cells in region.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
region |
str
|
Region or condition to select cells. |
required |