grid_apps.block_models package¶
Submodules¶
grid_apps.block_models.driver module¶
- class grid_apps.block_models.driver.Driver(params: Options | BaseParams)¶
Bases:
DriverCreate BlockModel from parameters.
- Parameters:
parameters – BlockModelOptions or InputFile containing the parameters.
- static find_top_padding(obj: BlockModel, core_z_cell_size: int) float¶
Loop through cell spacing and sum until core_z_cell_size is reached.
- Parameters:
obj – Block model.
core_z_cell_size – Cell size in z direction.
- Return pad_sum:
Top padding.
- static get_block_model(workspace: Workspace, locs: ndarray, h: list, depth_core: float, pads: list, expansion_factor: float, name: str = 'BlockModel') BlockModel¶
Create a BlockModel object from parameters.
- Parameters:
workspace – Workspace.
locs – Location points.
h – Cell size(s) for the core mesh.
depth_core – Depth of core mesh below locs.
pads – len(6) Padding distances [W, E, N, S, Down, Up]
expansion_factor – Expansion factor for padding cells.
name – Block model name.
- Return object_out:
Output block model.
- make_grid()¶
Make block model object from input data.
- static minimum_depth_core(locs: ndarray, depth_core: float, core_z_cell_size: int) float¶
Get minimum depth core.
- Parameters:
locs – Location points.
depth_core – Depth of core mesh below locs.
core_z_cell_size – Cell size in z direction.
- Return depth_core:
Minimum depth core.
- run()¶
Create an octree mesh from input values.
- static truncate_locs_depths(locs: ndarray, depth_core: float) ndarray¶
Sets locations below core to core bottom.
- Parameters:
locs – Location points.
depth_core – Depth of core mesh below locs.
- Return locs:
locs with depths truncated.
grid_apps.block_models.options module¶
- class grid_apps.block_models.options.BlockModelCreationOptions(*args: Any, **kwargs: Any)¶
Bases:
BaseModelBlock model specification parameters.
- Parameters:
cell_size_x – Cell size in x direction.
cell_size_y – Cell size in y direction.
cell_size_z – Cell size in z direction.
depth_core – Depth of core mesh below locs.
horizontal_padding – Horizontal padding.
bottom_padding – Bottom padding.
expansion_factor – Expansion factor for padding cells.
- bottom_padding: float¶
- cell_size_x: float¶
- cell_size_y: float¶
- cell_size_z: float¶
- property cell_sizes: list[float]¶
Cell sizes in x, y and z directions.
- depth_core: float¶
- expansion_factor: float¶
- horizontal_padding: float¶
- property padding: list[float]¶
Padding distances in west, east, south, north, down and up directions.
- class grid_apps.block_models.options.BlockModelOptions(*args: Any, **kwargs: Any)¶
Bases:
OptionsBlock model parameters for use with block_models.driver.
- Parameters:
source – Source data parameters.
creation – Block Model creation parameters.
output – Block Model output parameters.
- conda_environment: str = 'grid_apps'¶
- creation: BlockModelCreationOptions¶
- default_ui_json: ClassVar[Path] = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/mirageoscience-grid-apps/conda/v0.1.0/lib/python3.10/site-packages/grid_apps-assets/uijson/block_models.ui.json')¶
- name: ClassVar[str] = 'block_model'¶
- run_command: ClassVar[str] = 'grid_apps.block_models.driver'¶
- source: BlockModelSourceOptions¶
- title: ClassVar[str] = 'Block Model Creation'¶
- class grid_apps.block_models.options.BlockModelOutputOptions(*args: Any, **kwargs: Any)¶
Bases:
BaseModelOutput parameters for block model creation.
- Parameters:
export_as – Name of the output entity.
out_group – Name of the output group.
- export_as: str = 'block_model'¶
- out_group: UIJsonGroup | None = None¶