hydrobox.geostat.universal_kriging¶
- hydrobox.geostat.universal_kriging(variogram, grid_resolution, drift_functions, exact=True, cond_err='nugget', pseudo_inv=True, pseudo_inv_type='pinv', return_type='plot', **kwargs)¶
Use a scikit-gstat
Variogramto estimate spatial properties of a sample. Uses this variogram to interpolate using kriging. The Kriging is done with theUniversalclass. Refer to the docs ofUniversalto learn about the parameters.For universal kriging you need to specify the interal drift term of the field. Then, this auto-regression will be taken into account for kriging. This is useful for fields, that acutally show a drift. If that is not the case, refer to
ordinary_krigingorext_drift_krigingfor external drifts.Note
Right now, there are only very limited possibilities to specify an interpolation grid. Only setting the resolution of the result like:
50x50is possible by passing the integer50. More fine-grained control will be added with a future release.- Parameters
variogram (skgstat.Variogram) – Variogram used for kriging
grid_resolution (int) – Resoultion of the interpolation grid. The resolution will be used in all input data dimensions, which can lead to non-quadratic grid cells.
drift_functions (str) – The drift function used to perform regression kriging on the values of the sample. Can be either
'linear'or'quadratic'. Polynomials of higher order are currently only supported, if you useUniversaldirectly.exact (bool) – If True (default), the input data will be matched exactly. Refer to
Universalfor more info.cond_err (str, float, list) – Measurement error, or variogram nugget. Refer to
Universalfor more info.pseudo_inv (bool) – If True, the Kriging is more robust, but also slower. Refer to
Universalfor more info.pseudo_inv_type (str) – Type of matrix inversion used if pseudo_inv is True. Refer to
Universalfor more info.return_type (str) – Specify how the result should be retuned. Can be the kriging class itself (
'object'), the interpolated grid ('grid') or a plot of the grid ('plot').
- Return type
- Returns
results (numpy.ndarray, numpy.ndarray) – Interpolation grid and kriging error grid
fig (plotly.graph_objects.Figure, matplotlib.Figure) – Figure of the result plot.