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 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
ndarray

Declustered weights wi of each data point i.

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 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
ndarray

declustered weights wi of each data point i.

Note

  • counts the number ni of samples inside a moving window centered on point i.
  • weight wi is mv/ni where mv is the mean of all the ni.

compositing(drillholes, attribute_list, composit_len=2.0, minimum_composit_len=0.0, residual_len=2.0, ref_z_value=None) 🍋

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 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:

Name Type Description Default
drillholes Drillholes

GeoLime Drillholes object.

required
attribute_list List[str]

List of grade names to be composited.

required
composit_len Optional[float]

Lenght of new composits. Defaults to 2.

2.0
minimum_composit_len Optional[float]

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

0.0
residual_len Optional[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

Returns:

Type Description
DataFrame

Composited DataFrame of drillhole.

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
ndarray

Drillholes with a new column containing an id corresponding to a duplicated group for each point (x,y).

ClosestPointValue (SurfaceSequenceEstimator) 🍋

Deterministic method for creating surfaces from drillholes and constraints matrix.

compute_thickness(self, 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
DataFrame

Updated constraints matrix.

determine_topography(self) 🍋

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

Returns:

Type Description
DataFrame

Updated constraints matrix.

Note

Future version might envisage add of topographic data.

fill_constraints(self) 🍋

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

fill_missing_constraint(self, domain) 🍋

Interpolate unknown data on a domain conditioned with known data.

Parameters:

Name Type Description Default
domain str

Domain to compute thicness.

required

Exceptions:

Type Description
NotImplementedError

If given method is not implemented.

ValueError

If constraints has less than 3 points.

Returns:

Type Description
DataFrame

Updated constraints matrix.

fix_constraint_simple(self, domain) 🍋

Update matrix constraints by checking value and threshold.

Parameters:

Name Type Description Default
domain str

Domain to compute thicness.

required

Returns:

Type Description
DataFrame

Updated constraints matrix.

remove_overlapps(self, domain) 🍋

Replace data overlapping over above and below domain.

Parameters:

Name Type Description Default
domain str

Domain to compute thicness.

required

Returns:

Type Description
DataFrame

Updated constraints matrix.

thickness_to_elevation(self, domain) 🍋

Convert thickness elevation to elevation information.

Parameters:

Name Type Description Default
domain str

Domain to compute thicness.

required

Returns:

Type Description
DataFrame

Updated constraints matrix.

update_constraints(self, 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
DataFrame

Updated constraints matrix.

Note

Future version might envisage add of topographic data.

update_elevation_threshold_below(self, domain) 🍋

Update elevation thresholds of below unit.

Parameters:

Name Type Description Default
domain str

Domain to compute thicness.

required

Returns:

Type Description
DataFrame

Updated constraints matrix.

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.

interpolator: DrillholesInterpolationMethod property readonly 🍋

Return drillholes interpolation method used.

method: SurfaceEstimationMethod property readonly 🍋

Return estimation method used.

build_constraints(self, 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(self, 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[geolime.base.enums.ExternalSurfaceInterpolationMethod, geolime.base.enums.GeolimeSurfaceInterpolationMethod]

Interpolation Method used to compute on GriddedSurface.

required
kwargs

Extra arguments used by interpolation method.

{}

dh_to_constraint(dh, domain_col, domain_seq) 🍋

Build constraints matrix of lithological domains from a drillhole and a lithological sequence.

Parameters:

Name Type Description Default
dh Drillholes

Drillholes object.

required
domain_col str

Property name of the lithological domain.

required
domain_seq List[str]

Sequence of lithological domain from top to bottom.

required

Returns:

Type Description
DataFrame

Constraints "matrix" as pandas DataFrame.

point_interpolation(x_t, y_t, x_input, y_input, z_input, interpolation_method=<DrillholesInterpolationMethod.RBF: 'RBF'>) 🍋

Interpolate data on unknown coordinates conditionated with known data.

Parameters:

Name Type Description Default
x_t ndarray

X target coordinates.

required
y_t ndarray

Y target coordinates.

required
x_input ndarray

X conditioning data coordinates.

required
y_input ndarray

Y conditioning data coordinates

required
z_input ndarray

Interpolated attribute, known data from conditioning.

required
interpolation_method DrillholesInterpolationMethod

Mathematical interpolator. Defaults to SurfaceInterpolationMethod.NEAREST.

<DrillholesInterpolationMethod.RBF: 'RBF'>

Exceptions:

Type Description
NotImplementedError

If given method is not implemented.

Returns:

Type Description
ndarray

Interpolated value.

surface_interpolation(input_coordinates, input_values, grid_surf, property_name, interpolator, **kwargs) 🍋

Interpolate data on unknown coordinates conditionated with known data.

Parameters:

Name Type Description Default
input_coordinates ndarray

Conditioning data coordinates.

required
input_values ndarray

Conditioning data values.

required
grid_surf GriddedSurface

Target object for interpolation.

required
property_name str

New property name on grid_surf.

required
interpolator Union[geolime.base.enums.ExternalSurfaceInterpolationMethod, geolime.base.enums.GeolimeSurfaceInterpolationMethod]

Interpolation method used to estimate on surface.

required
kwargs

Interpolator extra arguments.

{}

Exceptions:

Type Description
NotImplementedError

If given method is not implemented.

Back to top