geolime.operations.drillhole.compositing

Classes:

Drillholes(data, metadata)

Data:

List

The central part of internal API.

Functions:

compositing(drillholes, grade_list[, …])

Compositing regularizes data spacing along a drillhole from top to bottom.

compositing_per_dh(dh, grade_list[, …])

Compositing function for a single drillhole.

init_regular_bhid(start_from, end_to, …[, …])

Regularize from / to columns of a single drillhole dataframe based on an origin, an end, acomposite length and an eventual elevation of reference.

geolime.operations.drillhole.compositing.compositing(drillholes: geolime.objects.drillhole.Drillholes, grade_list: List[str], composit_len: float = 2.0, minimum_composit_len: float = 0.0, residual_len: float = 2.0, ref_z_value: float = None)

Compositing regularizes data spacing along a drillhole from top to bottom. Composite with coverage length shorter than minimum composite length will have a nan composit grade value. Compositing might return longer drillhole than original. The residual composite is therefore longer or shorter than the composite length. If the last sample is shorter than the residual length it will be added to the previous composite, having a longer one in the end. If the last sample is longer than the residual length it will be considered as a separate composite, having a shorter one in the end. with the previous one. A reference value can be set in order to adjust the first composite at a certain elevation or its modulo regarding compositing length. This parameter enables to have same spatial limits for Drillholes and estimation grid used later on. Regularization is done by sum product average (sum of the grade time the length divided by the total length) In debug mode, original information used for the sum product average are given.

Parameters
  • drillholes (Drillholes) – GeoLime Drillholes object

  • grade_list (List[str]) – List of grade names to be composited

  • composit_len (float, optional) – Lenght of new composits, 2 by default

  • minimum_composit_len (float, optional) – Minimum length of coverage in order to be used, 0 by default

  • residual_len (float, optional) – Minimum residual length setting if residual is added to last one 0 by default

  • ref_z_value (float, optional) – Elevation value to clip beginning of composit, disabled by default

Returns

GeoLime Drillholes object

Return type

Drillholes

geolime.operations.drillhole.compositing.compositing_per_dh(dh: pandas.core.frame.DataFrame, grade_list: List, composit_len: float = 2.0, minimum_composit_len: float = 0.0, residual_len: float = 0.0, ref_z_value: float = None)

Compositing function for a single drillhole.

Parameters
  • dh (pd.DataFrame) – Single drillhole dataframe

  • grade_list (List) – List of grade names to be composited

  • composit_len (float, optional) – Lenght of new composits, 2 by default

  • minimum_composit_len (float, optional) – Minimum length of coverage in order to be used, 0 by default

  • residual_len (float, optional) – Minimum residual length setting if residual is added to last one 0 by default

  • ref_z_value (float, optional) – Elevation value to clip beginning of composit, disabled by default

Returns

Composited single drillhole dataframe

Return type

pd.DataFrame

Notes

Forked from pygeostats algorithm

geolime.operations.drillhole.compositing.init_regular_bhid(start_from: float, end_to: float, composit_len: float, top_z_dh: float, ref_z_value: float = None)

Regularize from / to columns of a single drillhole dataframe based on an origin, an end, acomposite length and an eventual elevation of reference.

Parameters
  • start_from (float) – Origin of single drillhole

  • end_to (float) – End of single drillhole

  • composit_len (float) – Compositing length of drillhole

  • top_z_dh (float) – Topographic elevation of drillhole

  • ref_z_value (float, optional) – Elvation reference to clip beginning of composite

Returns

Lists of regularized froms and tos

Return type

tuple