geost.base.Collection.get_layer_base#
- Collection.get_layer_base(column: str, values: str | list[str], min_thickness: float = 0, include_in_header: bool = False)[source]#
Find the depth at which a specified layer occurs last, starting at min_depth and looking downwards until the first layer of min_thickness is found of the specified layer.
- Parameters:
column (str) – Name of the column to search for the specified value or values.
values (int | float | str | list[str] | slice) – Value or values to search for in the specified column. If a slice is provided, the function will search for values within the specified range.
min_thickness (float, optional) – Minimum thickness of the layer to consider. Layers thinner than this value will be ignored. The thickness of a layer is calculated as the difference uppermost top and the lowermost bottom of consecutive elements that meet the value criteria. If None, no minimum thickness is applied which returns the first encountered layer.
- Returns:
Borehole ids and base levels of selected layers in meters below the surface.
- Return type:
pd.DataFrame
Examples
Get the base depth of layers in boreholes where the lithology in the “lith” column is sand (“Z”):
>>> base = boreholes.get_layer_base("lith", "Z") # Returns a pandas Series
To include the result in the header object of the collection, use the “include_in_header” option:
>>> boreholes.get_layer_base("lith", "Z", include_in_header=True) # Modifies the header and returns None