geost.base.BoreholeCollection.slice_depth_interval#

BoreholeCollection.slice_depth_interval(upper_boundary: float | int = None, lower_boundary: float | int = None, relative_to_vertical_reference: bool = False, update_layer_boundaries: bool = True)#

Slice data based on given upper and lower boundaries. This returns a new object containing only the sliced data.

Parameters:
  • upper_boundary (float | int, optional) – Every layer that starts above this is removed. The default is None.

  • lower_boundary (float | int, optional) – Every layer that starts below this is removed. The default is None.

  • relative_to_vertical_reference (bool, optional) – If True, the slicing is done with respect to any kind of vertical reference plane (e.g. “NAP”, “TAW”). If False, the slice is done with respect to depth below the surface. The default is False.

  • update_layer_boundaries (bool, optional) – If True, the layer boundaries in the sliced data are updated according to the upper and lower boundaries used with the slice. If False, the original layer boundaries are kept in the sliced object. The default is False.

Returns:

New instance of the current object containing only the selection resulting from application of this method. e.g. if you are calling this method from a Collection, you will get an instance of a Collection back.

Return type:

New instance of the current object.

Examples

Usage depends on whether the slicing is done with respect to depth below the surface or to a vertical reference plane.

For example, select layers in boreholes that are between 2 and 3 meters below the surface:

>>> boreholes.slice_depth_interval(2, 3)

By default, the method updates the layer boundaries in sliced object according to the upper and lower boundaries. To suppress this behaviour use:

>>> boreholes.slice_depth_interval(2, 3, update_layer_boundaries=False)

Slicing can also be done with respect to a vertical reference plane like “NAP”. For example, to select layers in boreholes that are between -3 and -5 m NAP, use:

>>> boreholes.slice_depth_interval(-3, -5, relative_to_vertical_reference=True)