geost.bro.geotop.GeotopUnits.select_unit#

GeotopUnits.select_unit(units: str | list[str]) → GeotopUnits[source]#

Select metadata by unit codes (e.g. “NUNIBA”, “zm”).

Parameters:

units (str | list[str]) – Unit code(s) to select. Can be a single value or a list of values (see examples below).

Returns:

GeotopUnits instance containing the metadata subset for the selected units.

Return type:

GeotopUnits

Raises:

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

Examples

Select specific units from the stratigraphic metadata of GeoTOP:

>>> gtp_meta_strat = geost.bro.get_geotop_metadata_strat()
>>> selected_meta = gtp_meta_strat.select_units("NUNIBA") # Select a single unit
>>> selected_meta = gtp_meta_strat.select_units(["NUNIBA", "NUNIHO"]) # Select multiple units

Or select lithologies from the lithologic metadata of GeoTOP:

>>> gtp_meta_lithok = geost.bro.get_geotop_metadata_lithok()
>>> selected_meta = gtp_meta_lithok.select_units("kz") # Select a single lithology
>>> selected_meta = gtp_meta_lithok.select_units(["zf", "zm", "zg"]) # Select multiple lithologies