geost.models.VoxelModel.select#

VoxelModel.select(**xr_kwargs)[source]#

Use Xarray selection functionality to select indices along specified dimensions. This uses the “.sel” method of an Xarray Dataset.

Parameters:

**xr_kwargs – xr.Dataset.sel keyword arguments. See relevant Xarray documentation.

Examples

Select a specified coordinates or slice coordinates from the VoxelModel instance: >>> selected = voxelmodel.select(x=[1, 2, 3]) # Using keyword arguments >>> selected = voxelmodel.select({“x”: [1, 2, 3]}) # Using a dictionary >>> selected = voxelmodel.select(x=slice(1, 4)) # Using a slice

Using additional options as well. For instance, when the desired coordinates do not exactly match the VoxelModel coordinates, select the nearest: >>> selected = voxelmodel.select(x=[1.1, 2.5, 3.3], method=”nearest”)