geolime

Classes:

ABCMeta(name, bases, namespace, **kwargs)

Metaclass for defining Abstract Base Classes (ABCs).

Anamorphosis(data, data_min, data_max, …)

BlockModel(data, metadata)

Covariance(dim, angles, 0.0, 0.0], scales, …)

CovarianceElem(dim, angles, scales, …)

Drillholes(data, metadata)

Enum(value)

Generic enumeration.

Exponential(dim, angles, scales, convention)

Gaussian(dim, angles, scales, convention)

GeometricalObject(data, metadata)

Parent class of every object

Grid(metadata, convention)

Grid2D(metadata)

Grid3D(metadata)

GridPatternGenerator(grid, discr)

MaxPerCategoryNeighborhood(dim, angles, …)

MinMaxPointsNeighborhood(dim, angles, …)

Neighborhood()

Nugget(dim, angles, scales, convention)

PatternGenerator()

Point(*args)

A zero dimensional feature

Polygon(data, metadata)

Proj(projparams, preserve_units, **kwargs)

Performs cartographic transformations.

Project(*args, **kwargs)

Project Class Parameters that a constant over a “project” such as coordinate systen,unit system or z direction.

ProjectMeta

MetaClass to ensure only one instance of Project in a script.

ScalarMappable([norm, cmap])

A mixin class to map scalar data to RGBA.

SortingRank(value)

An enumeration.

Spherical(dim, angles, scales, convention)

StatKind(value)

An enumeration.

Surface(data, mesh, metadata)

product

product(*iterables, repeat=1) –> product object

threadpool_limits([limits, user_api])

Change the maximal number of threads that can be used in thread pools.

Data:

Callable

Callable type; Callable[[int], str] is a function of (int) -> str.

Dict

The central part of internal API.

List

The central part of internal API.

Functions:

abstractmethod(funcobj)

A decorator indicating abstract methods.

angle_between_vectors(v1, v2)

Compute the angle between two vectors using the dot product

anisotropic_distance([a])

Anisotropic distance between two points according to the anisotropy matrix a.

arg_sort_near_points(p, x[, distance])

Function to compute the indexes indicating the order in which the rows of x are close to p according to the distance distance (from small distance to large distance)

arithmetic(angle)

Convert an angle from geographic to arithmetic

average_kriging(xcoords, xdat, targets, cov, var)

Ordinary / Simple kriging algorithm (punctual).

block_kriging(xcoords, xdat, points, cov, neigh)

Block kriging function.

block_kriging_nodes(xcoords, xdat, point, …)

Punctual kriging function for a specific block node

bounding_polygon_from_points(points_df, crs)

Compute bouding concave polygon of a set of points.

bounding_polygon_from_sub_points(sub_points_gdf)

Compute bouding concave polygon of a subset of points.

cdist(XA, XB[, metric])

Compute distance between each pair of the two collections of inputs.

ce(kriging, stdev, anam)

Conditional expectation

ceil(x, /)

Return the ceiling of x as an Integral.

cell_declus_mean_vs_cell_size(drillholes, …)

param drillholes

drillholes to decluster in x, y, z

cell_declustering(drillholes, size_x, …)

Compute declustered weights by Cell Declustering algorithm from C.

change_of_support(anam, cov_raw, …[, nlag])

Compute the change of support coefficient

check_grid_above_surf(bm, surface, …)

Write in a dataframe for each block if above or under a surface

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.

compute_weights(xcoords, targets, cov)

Compute kriging weights according to a covariance model

compute_weights_idw(dist, power)

Compute IDW weights

coord_to_lat_lon(bm[, proj_in])

Take x,y,z column of dataframe and convert x/y to latitude/longitude in two new columns proj_in by default is Lambert 93 out_proj (espg:4326) corresponds to lat/lon official reference

covariance(values, indices)

Compute the covariance given an array of values for a set of pairs

create_grid_2d(origin, n_dim, cell_size[, angle])

Create a 2D grid from mesh parameters.

create_grid_3d(origin, n_dim, cell_size[, angle])

Create a 3D grid from mesh parameters.

create_mplcontour_from_grid(bm, column[, …])

Creates a matplotlib contour from a bm and a property.

cvv(cov[, pattern_generator, lag, method])

Applies a covariance model to a given grid for variance calculus

df_to_gdf(df[, x_col, y_col, crs])

Converts a DataFrame to a GeoDataFrame

df_xy_to_arr2d(bm[, attribute])

Take x,y,z column of bm to make a 2D array, with attribute as values.

direct_block_simu_init(target_grid, xcoords, …)

Initialize conditional simulation against observed values (in Gaussian space).

direct_block_simulations_on_a_set(…[, …])

Applies Simple Kriging on conditional simulations

directional_vector(dimension, …[, deg])

Compute directional vector from angles

discrete_gaussian_kriging(target_grid, …)

Apply discrete gaussian kriging on a grid.

discrete_gaussian_kriging_block(point, …)

Apply discrete gaussian kriging on a grid block

discrete_gaussian_kriging_by_index(points, …)

Apply discrete gaussian kriging on a set of grid indices.

discrete_gaussian_weights(target_node, …)

Compute Discrete Gaussian Kriging weights

display_grid(target_grid, grid_val[, …])

Display a grid content

distance_matrix(x1, x2[, distance])

Computes the distance matrix of two sets of points in the Euclidean space according to a distance.

drape_drillholes_to_surface(surface, drillholes)

Compute the true elevation of drillholes given coordinates and the corresponding surface.

euclidian_distance(x, y)

Compute the Euclidean distance between two points.

evaluate_hermite_expansion(x[, coeff])

Evaluate at x a function determined by its coefficients in the Hermite expansion.

evaluate_hermite_expansion_for_metal(val, …)

Evaluate germite expansion for metal

evaluate_hermite_expansion_for_metal_memsafe_variable(…)

evaluate_hermite_expansion_memsafe(x[, coeff])

Evaluate at x a function determined by its coefficients in the Hermite expansion.

evaluate_hermite_expansion_memsafe_variable(x, …)

Evaluate at x a function determined by its coefficients in the Hermite expansion.

extend_grid_2d(bm, extension)

Extends a regular 2d bm with a given extension.

extract_dxf_contour_to_mpl(dxf)

Create a mpl contour of a dxf surface

fill_cov(param, cov)

Append additional information to covariance element (angles and scales)

fill_missing_x_y(bm)

filter_with_scales(x[, p, scales])

Function to return the indexes of the points which are in a sphere in the Euclidean space.

find_duplicate_dm(drillholes[, max_distance])

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

flatten_grid(bm[, sorting_type])

Flatten a DataFrame that has many rows with same (x,y).

gauss_score(z[, weights])

Function to obtain the (standard) Gaussian scores of a sample.

gaussian_anamorphosis(z[, yzmin, yzmax, …])

Function to obtain a Gaussian anamorphose model for a sample.

gdf_from_image(image, pixel_resolution, origin)

Transform image (numpy 2D array) into a geopandas dataframe.

gdf_to_df(gdf[, copy])

Converts a DataFrame to a GeoDataFrame

geary_c(coords, values[, w])

Geary’s C spatial autocorrelation metric

generate_lags(lag, plag, nlags)

Generate lags array to be used with variogram

grid_2d_from_bounds(origin, extent, cell_size)

Create a 2D grid from mesh bounds and cell size.

grid_3d_from_bounds(origin, extent, cell_size)

Create a 3D grid from mesh bounds and cell size.

group_data(target_grid, xcoords, xdata)

Create a dataset from point mean in common blocks

guess_dx_dy(x_array[, y_array, z_array])

Return the dx,dy of a grid guess from the x,y values

hermite_coefficients_anamorphosis(n, z[, …])

Function to obtain the Hermite coefficients of a Gaussian anamorphose model function.

hermite_coefficients_piecewise_linear(n, x, y)

Computes the Hermite coefficients of a piece-wise linear function continuous in an interval, with a desired extension outside the interval.

hermite_polynomials(x, n)

Function to compute the Hermite polynomials up to order n.

idw(points, coords, values[, power])

Inverse Distance Weighting algorithm.

import_drillholes(collar_df[, survey_df])

Create a geolime object Drillholes from different csv

in_angle(vdir, atol)

Return a function that checks for an index vector if it belongs to an angular range.

in_range(target, atol)

Check if target angle lies within a range of angles (defined by an angle tolerance)

in_slice(trend, plunge, vdir[, width, height])

Return a function that check whether a vector (cartesian coordinates) lies within a slice (defined by a width and a height in meters)

in_which_block(x, grid)

Return indexes of block containing point

init_params(cov, vario[, constraints, …])

Initialize parameters for variogram model fitting

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.

inverse_anamorphosis_from_obs(z[, yzmin, …])

Function to obtain the (pseudo-)inverse of a Gaussian anamorphose model for a sample date.

inverse_anamorphosis_theoretical(z, anam[, …])

Compute theoretical inverse anamorphosis for a single value.

inverse_var_function(var, anam[, nlag])

Compute inverse variance

linear_desurveying(drillholes)

Take assay and collar dataframes to compute true location of points in the drillhole

metal(kriging, stdev, anam, cutoff)

Conditional expectation for metal

model_fit(variograms[, cov, constraints, …])

Fit a variogram model from an experimental semivariogram

model_regularize(variogram, model, …[, …])

Semi-variogram regularization from a covariance model.

moran_i(coords, values[, w])

Moran’s I spatial autocorrelation metric

moving_window_declus(drillholes, diam_x, …)

Compute declustered weights by Moving Window algorithm.

moving_window_mean_vs_cell_size(drillholes, …)

param drillholes

drillholes to decluster in x, y, z

norm(x[, ord, axis, keepdims])

Matrix or vector norm.

normalize(a, center)

(Adapted from Apach Commons normalizeAngle, MathUtils sources) Normalize an angle in a 2pi; wide interval around a center value.

ore(kriging, stdev, anam, cutoff)

Conditional expectation for ore

ore_metal(zcut, anam)

Apply non Conditional Expectation given hermite coefficients anamorphosis and a cut-off value

pairs_plot_2d(coords, index, projection)

Debug function that displays pairs of points on a 2D projection plane.

pairs_plot_3d(coords, index, title)

Debug function that displays pairs of points on a 3D space.

pairwise(coords)

Computes pairwise distances

pdist(X[, metric])

Pairwise distances between observations in n-dimensional space.

plane_to_dir(azimuth, dip, pitch[, deg])

Convert plane angles to line angles.

plot_semivariogram(variograms[, model, …])

Semivariogram plot

polygon_from_bm(bm, column, crs[, classes, …])

Creates Polygon object from a 3D BlockModel, a property, a CRS, and list of thresholds (ie: cut off grades).

polygon_from_file(file)

Create polygon object from file 2 types of files are accepted : - Shapefile .shp - GeoJSON .geojson

polygon_to_geojson(polygon, output_name)

Export Polygon to GeoJSON

polygon_to_shp(polygon, output_name)

Export Polygon to shapefile

reduce(function, sequence[, initial])

Apply a function of two arguments cumulatively to the items of a sequence, from left to right, so as to reduce the sequence to a single value.

residual(p, vario, cov, nlags)

Residuals to be minimized for model fitting

rot_x(gamma[, deg, clockwise])

Rotation againt the X axis

rot_y(beta[, deg, clockwise])

Rotation againt the Y axis

rot_yxz(angles[, deg, clockwise])

Example of a convention

rot_z(alpha[, deg, clockwise])

Rotation againt the Z axis

rot_zyx(angles[, deg, clockwise])

Example of a convention (RGeoStats)

rotational_angles(angles)

Compute the angles in radians necessary for matrix rotation operation from geographic azimuth, dip and pitch angles defined in degrees

select_index_from_slice(idx, f)

Compare vectors from a set of indices

select_indices(coords, pwdist, lag, tol, …)

Check whether a set of points (linked to their distances) match the input restricted boundaries.

select_indices_from_angle(idx, f)

Compare vectors from a set of indices

select_indices_from_lag(pwdist, lag, tol)

Check whether a set of distances lie within a lag-range.

select_points_inside_polygon(polygon, points)

Filters points in 2D and keep only the one inside the given polygon.

semivariance(values, indices[, weights])

Compute the semivariance given an array of values for a set of pairs

shift(input, shift[, output, order, mode, …])

Shift an array.

simu_grid(Zs, grid[, ind])

Evaluate simulations on an input grid.

simu_grid_init(cov, grid[, nbsimus, nbands, …])

This function will initialize Turning Band method for computing unconditional simulations from a covariance structure.

simu_grid_init_elem(covelem, sill, grid[, …])

Initialize Turning Band method on an atomic covariance element

simu_points(Zs, coords)

Applies unconditional simulations on input coordinates (evaluated as distances).

spherical_3d_random_function_tb(scale, sill, …)

Prepares one simulation with the Turning Band method.

spherical_3d_random_functions_tb(scale, …)

Compute random function with the Turning Band method.

squareform(X[, force, checks])

Convert a vector-form distance vector to a square-form distance matrix, and vice-versa.

surface_from_csv(csv_file)

Create a surface object from a csv (table) file

surface_from_dataframe(dataframe)

Create a surface object from a pandas dataframe

surface_from_dxf(dxf)

Create a surface object from a dxf file

surface_from_stl(stl)

Create a surface object from a stl (cad) file

surface_to_stl(surface, file_name)

Export a geolime surface object to a stl file

transform(p1, p2, x, y[, z, tt, radians, …])

New in version 2.1.2: skip_equivalent

uc(zcut, kriging_gauss_panel, anamblock, r, s)

Apply Uniform Conditoning on a Panel according to a cut off value.

uc_on_grid(anam, panel_grid, data_coords, …)

Apply Uniform Conditioning on a Panel Grid

uc_prepare(anam, panel_center, data_coords, …)

Prepare Uniform Conditioning on a panel by computing panel Kriging and Panel-Point support coefficient

vario_contour(coords, values, lags, tol, …)

Plot VarioContour as Pie Chart.

vario_map(coords, values, lags, tol, n_az, atol)

Plot VarioMap as Pie Chart.

variogram(coords, values, lags, tol, …[, …])

Given boundary input arguments (lag and its associated tolerance, angular reference and its associated tolerance), compute the variogram for a set of points (value associated with cartesian coordinates for a specific point)

vertical_intersection(x, y, surface)

Compute the z coordinates of the vertical intersection between a Trimesh triangulated mesh and a (x,y) coordinates.

which_in_ball(x[, p, r, distance, scales])

Function to return the indexes of the points which are in a (closed) ball in the Euclidean space.

which_nearest_in_ball(x[, p, r, distance, …])

Function to obtain the N closest points of a set of points to the center of a ball which are on that ball.

which_nearest_in_ball_with_max_per_category(x)

Function to obtain the N closest points of a set of points to the center of a ball which are on that ball with a maximum per category.