geost.bro.regis.RegisUnits.select_unit#
- RegisUnits.select_unit(units: str | list[str] | DataArray) RegisUnits[source]#
Select metadata by unit names (e.g., ‘NUhlc’, ‘NUBXz’).
- Parameters:
units (str | list[str] | xr.DataArray) – Unit name(s) to select. Can be a single value, a list of values, or an xarray.Dataset of REGIS II to check which units are in the area (see examples below).
- Returns:
RegisUnits instance containing the metadata subset for the selected unit names.
- Return type:
- Raises:
MissingUnitError – Raised if one or more of the specified unit names are not present in the metadata.
Examples
Select specific unit names from REGIS II:
>>> regis_meta = geost.bro.regis_units() >>> selected_meta = regis_meta.select_unit("NUhlc") # Select a single unit name >>> selected_meta = regis_meta.select_unit(["NUhlc", "NUBXz"]) # Select multiple unit names
Or use the the REGIS II model to select the corresponding metadata directly:
>>> selected_meta = regis_meta.select_unit(regis)