geost.bro.geotop.GeotopUnits.select_voxel_nr#

GeotopUnits.select_voxel_nr(values: int | float | list[int | float] | DataArray) → GeotopUnits[source]#

Select metadata by voxel numbers (e.g. 1090, 2010).

Parameters:

values (int | float | list[int | float] | xr.DataArray) – Voxel number(s) to select. Can be a single value, a list of values, or an xarray.DataArray of a GeoTOP variable with voxelnumbers (see examples below).

Returns:

GeotopUnits instance containing the metadata subset for the selected voxel numbers.

Return type:

GeotopUnits

Raises:

MissingUnitError – Raised if one or more of the specified voxel numbers are not present in the metadata.

Examples

Select specific voxel numbers from the stratigraphic metadata of GeoTOP:

>>> gtp_meta = geost.bro.get_geotop_metadata_strat()
>>> selected_meta = gtp_meta.select_voxel_nr(1130) # Select a single voxel number
>>> selected_meta = gtp_meta.select_voxel_nr([1130, 2010]) # Select multiple voxel numbers

Or use the the GeoTOP model to select the corresponding metadata or the stratigraphic variable from GeoTOP directly:

>>> selected_meta = gtp_meta.select_voxel_nr(geotop)
>>> selected_meta = gtp_meta.select_voxel_nr(geotop["strat"])