geost.models.VoxelModel.get_thickness#

VoxelModel.get_thickness(condition: Dataset, depth_range: tuple[float, float] = None) DataArray[source]#

Generate a thickness array of voxels in the VoxelModel that meet one or more conditions. For example, determine the thickness of a specific lithology within a stratigraphic unit (see example usage below).

Parameters:
  • condition (xr.DataArray) – Boolean DataArray containing that evaluate to True for the desired condition. For example: voxelmodel[“lith”] == 1.

  • depth_range (tuple[float, float], optional) – Search for the condition with a specified depth range of the VoxelModel. This should be a tuple containing the minimum and maximum depth values (in this order!). The default is None, which means the entire depth range of the VoxelModel will be used.

Returns:

A DataArray containing the generated map based on the specified conditions. The DataArray will have dimensions “y” and “x”. The values in the DataArray represent the thickness of the selected data variable at each location.

Return type:

xr.DataArray

Examples

Determine the thickness where the lithology in the VoxelModel is equal to 1:

>>> lith_map = voxelmodel.get_thickness(voxelmodel["lithology"] == 1)

Or generate an array on more conditions:

>>> thickness = voxelmodel.get_thickness((voxelmodel["lithology"] == 1) & (voxelmodel["strat"] == 1100))

Search for the condition or conditions within a specific depth window:

>>> thickness = voxelmodel.get_thickness((voxelmodel["lithology"] == 1) & (voxelmodel["strat"] == 1100), depth_range=(-10, -20))