geost.base.Collection.get_layer_top#

Collection.get_layer_top(column: str, values: str | list[str], min_thickness: float = None, min_fraction: float = None, include_in_header: bool = False) Series | None[source]#

Find the depth at which a specified layer first occurs, 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.

  • min_fraction (float, optional) – Whether or not to allow for disturbing layers: layers that do not meet the value criteria in between. The minimum fraction is the minimal fraction of the ‘min_thickness’ that must meet the value criteria. If None, the entire layer must meet the criteria. Note that ‘min_fraction’ is only applied when ‘min_thickness’ is specified.

  • include_in_header (bool, optional) – If True, include the result in the header table of the Collection. In this case, the method does not return anything (i.e. None). If False, a pandas.Series is returned. The default is False.

Returns:

Borehole ids and top levels of selected layers in meters below the surface.

Return type:

pd.Series or None

Examples

Get the top depth of layers in boreholes where the lithology in the “lith” column is sand (“Z”):

>>> tops = boreholes.get_layer_top("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_top("lith", "Z", include_in_header=True) # Modifies the header and returns None