gstools.variogram¶
GStools subpackage providing tools for estimating and fitting variograms.
Variogram estimation¶
vario_estimate_unstructured (pos, field, …) |
Estimates the variogram on a unstructured grid. |
vario_estimate_structured (field[, direction]) |
Estimates the variogram on a regular grid. |
-
gstools.variogram.
vario_estimate_unstructured
(pos, field, bin_edges, sampling_size=None, sampling_seed=None)[source]¶ Estimates the variogram on a unstructured grid.
The algorithm calculates following equation:
Notes
Internally uses double precision and also returns doubles.
Parameters: - pos (
list
) – the position tuple, containing main direction and transversal directions - field (
numpy.ndarray
) – the spatially distributed data - bin_edges (
numpy.ndarray
) – the bins on which the variogram will be calculated - sampling_size (
int
orNone
, optional) – for large input data, this method can take a long time to compute the variogram, therefore this argument specifies the number of data points to sample randomly Default:None
- sampling_seed (
int
orNone
, optional) – seed for samples if sampling_size is given. Default:None
Returns: the estimated variogram and the bin centers
Return type: - pos (
-
gstools.variogram.
vario_estimate_structured
(field, direction='x')[source]¶ Estimates the variogram on a regular grid.
The indices of the given direction are used for the bins. The algorithm calculates following equation:
Warning
It is assumed that the field is defined on an equidistant Cartesian grid.
Notes
Internally uses double precision and also returns doubles.
Parameters: - field (
numpy.ndarray
) – the spatially distributed data - direction (
str
) – the axis over which the variogram will be estimated (x, y, z)
Returns: the estimated variogram along the given direction.
Return type: - field (