Skip to content

Drillholes Operations🍋

cell_declustering(obj, obj_region, obj_attribute, size_x, size_y, size_z, nb_off) 🍋

Compute declustered weights by Cell Declustering algorithm from C. Deutsch.

Parameters:

Name Type Description Default
obj GeoRefObject

Object to decluster in x, y, z.

required
obj_region str

Object region or condition to apply declustering.

required
obj_attribute str

Object attribute to apply declustering.

required
size_x int

Cell size in x direction.

required
size_y int

Cell size in y direction.

required
size_z int

Cell size in z direction.

required
nb_off int

Number of offsets.

required

Returns:

Type Description
np.ndarray

Declustered weights wiw_i of each data point ii.

moving_window_declus(obj, obj_region, obj_attribute, diam_x, diam_y, diam_z, geometry) 🍋

Compute declustered weights by Moving Window algorithm.

Parameters:

Name Type Description Default
obj GeoRefObject

Object to decluster in x, y, z.

required
obj_region str

Object region or condition to apply declustering.

required
obj_attribute str

Object attribute to apply declustering.

required
diam_x int

Ellipsoid diameter in x direction.

required
diam_y int

Ellipsoid diameter in y direction.

required
diam_z int

Ellipsoid diameter in z direction.

required
geometry DeclusteringGeometry

Geometry to be used for the window. BALL -> which_in_ball PARALLELEPIPED -> __which_in_parallelepiped

required

Returns:

Type Description
np.ndarray

declustered weights wiw_i of each data point ii.

Note

  • counts the number nin_i of samples inside a moving window centered on point ii.
  • weight wiw_i is mvni\frac{m_v}{n_i} where mvm_v is the mean of all the nin_i.

compositing(drillholes, attribute_list, composit_len=2.0, minimum_composit_len=0.0, residual_len=2.0, ref_z_value=None, method=DesurveyingMethod.TANGENTIAL, dip_convention=DipDownward.NEGATIVE) 🍋

Regularize drillholes into composites of same lengths.

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 Attribute.TO. If the last sample is longer than the residual length it will be considered as a separate composite, having a shorter one in the Attribute.TO. 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:

Name Type Description Default
drillholes Drillholes

GeoLime Drillholes object.

required
attribute_list List[str]

List of grade names to be composited.

required
composit_len float

Lenght of new composits. Defaults to 2.

2.0
minimum_composit_len float

Minimum length of coverage in order to be used. Defaults to 0.

0.0
residual_len float

Minimum residual length setting if residual is added to last one. Defaults to 0.

2.0
ref_z_value Optional[float]

Elevation value to clip beginning of composit. Defaults to None.

None
method DesurveyingMethod

Desurveying method.

DesurveyingMethod.TANGENTIAL
dip_convention DipDownward

Convention of dip downward angle sign.

DipDownward.NEGATIVE

Returns:

Type Description
Drillholes

Composited Drillholes.

find_duplicate(drillholes, max_distance=1.0) 🍋

Seek for the duplicates in drillhole - only in (x,y).

Add a new column with an id corresponding to a duplicated group.

Parameters:

Name Type Description Default
drillholes Drillholes

GeoLime Drillholes object.

required
max_distance Optional[float]

Maximum radius for search. Defaults to 1.

1.0

Returns:

Type Description
np.ndarray

Numpy array containing an id corresponding to a duplicated group for each point (x,y).

SurfaceSequenceEstimator 🍋

Object for creating surfaces from a drillhole based on a lithological sequence.

Attributes:

Name Type Description
method SurfaceEstimationMethdo

Interpolation variable used.

interpolator DrillholesInterpolationMethod

Mathematical interpolator used.

domain_sequence: DrillholesInterpolationMethod property 🍋

Return drillholes domain sequence.

interpolator: DrillholesInterpolationMethod property 🍋

Return drillholes interpolation method used.

method: SurfaceEstimationMethod property 🍋

Return estimation method used.

build_constraints(data, domain_col, domain_sequence) 🍋

Build constraints matrix based on drillholes data. Specify minimum and maximum value for each domain for drillholes.

Parameters:

Name Type Description Default
data Drillholes

Drillholes Object.

required
domain_col str

Property name of the lithological domain.

required
domain_sequence List[str]

Sequence of lithological domain from top to bottom.

required

surface_creation(grid_surf, interpolator, kwargs) 🍋

Create surfaces from filled constraints matrix and a gridded surface with topographic attribute (elavation data).

Parameters:

Name Type Description Default
grid_surf GriddedSurface

GriddedSurface used to compute elevation.

required
interpolator Union[ExternalSurfaceInterpolationMethod, GeolimeSurfaceInterpolationMethod]

Interpolation Method used to compute on GriddedSurface.

required
**kwargs

Extra arguments used by interpolation method.

{}

ClosestPointValue 🍋

Bases: SurfaceSequenceEstimator

Deterministic method for creating surfaces from drillholes and constraints matrix.

compute_thickness(domain) 🍋

Compute thickness of a domain based on elevation data.

Parameters:

Name Type Description Default
domain str

Domain to compute thicness.

required

Returns:

Type Description
pd.DataFrame

Updated constraints matrix.

determine_topography() 🍋

Determine fist lithological domain as topography. Needed for interpolation initialization.

Returns:

Type Description
pd.DataFrame

Updated constraints matrix.

Note

Future version might envisage add of topographic data.

fill_constraints() 🍋

Fill constraints matrix with a naive interpolation on unknown data and constraint out of bound points with previously computed constraints.

fill_missing_constraint(domain) 🍋

Interpolate unknown data on a domain conditioned with known data.

Parameters:

Name Type Description Default
domain str

Domain to compute thicness.

required

Raises:

Type Description
NotImplementedError

If given method is not implemented.

ValueError

If constraints has less than 3 points.

Returns:

Type Description
pd.DataFrame

Updated constraints matrix.

fix_constraint_simple(domain) 🍋

Update matrix constraints by checking value and threshold.

Parameters:

Name Type Description Default
domain str

Domain to compute thicness.

required

Returns:

Type Description
pd.DataFrame

Updated constraints matrix.

thickness_to_elevation(domain) 🍋

Convert thickness elevation to elevation information.

Parameters:

Name Type Description Default
domain str

Domain to compute thicness.

required

Returns:

Type Description
pd.DataFrame

Updated constraints matrix.

update_constraints(domain) 🍋

Update constraints using information from above and below units.

Parameters:

Name Type Description Default
domain str

Domain to compute thicness.

required

Returns:

Type Description
pd.DataFrame

Updated constraints matrix.

Note

Future version might envisage add of topographic data.

update_elevation_threshold_below(domain) 🍋

Update elevation thresholds of below unit.

Parameters:

Name Type Description Default
domain str

Domain to compute thicness.

required

Returns:

Type Description
pd.DataFrame

Updated constraints matrix.