Variography¶
Introduction¶
Libraries¶
import plotly.io as pio
pio.renderers.default = 'sphinx_gallery'
GeoLime package can be imported as such:
import geolime as geo
Data¶
Data used in this tutorial are coming from the Walker Lake Dataset, introduced by Isaaks and Srivastava and used in many geostatistical examples.
data = geo.datasets.load("walker_lake/walker_lake_sample.csv")
data.head()
x | y | z | v | u | t | |
---|---|---|---|---|---|---|
0 | 11.0 | 8.0 | 0.0 | 0.0 | NaN | 2 |
1 | 8.0 | 30.0 | 0.0 | 0.0 | NaN | 2 |
2 | 9.0 | 48.0 | 0.0 | 224.4 | NaN | 2 |
3 | 8.0 | 69.0 | 0.0 | 434.4 | NaN | 2 |
4 | 9.0 | 90.0 | 0.0 | 412.1 | NaN | 2 |
GeoLime PointCloud are created from coordinates (XYZ) and an object name.
point_cloud = geo.PointCloud('WalkerLake', data[['x', 'y', 'z']])
Properties are added in the same fashion. The v property is added to the PointClound in order to perform experimental variography.
point_cloud.set_property('V', data['v'])
Experimental variography¶
Definition of lags and lag tolerance¶
Creation of 10 lags of 20 meters with a lag tolerance of 50%.
lags, tol = geo.generate_lags(20, 50, 10)
lags
array([ 0., 20., 40., 60., 80., 100., 120., 140., 160., 180.])
tol
10.0
VarioMap of the V property, using 20 different azimuth to compute the values and an angular tolerance of 20 degrees.
VarioMap¶
geo.vario_map(
geo_object=point_cloud,
attribute='V',
region=None,
lags=lags,
tol=tol,
n_az=20,
atol=20
)
VarioContour¶
VarioContour compute the same results but displays it in a continuous form, allowing to better distinguish the trends.
geo.vario_contour(
geo_object=point_cloud,
attribute='V',
region=None,
lags=lags,
tol=tol,
n_az=20,
atol=20
)
1D Semi Variogram¶
Once major trends have been identified on the variomap, 1D semi-variogram is computed to determine an approximating theoretical model.
vario_exp_160_major = geo.variogram(
object=point_cloud,
attribute='V',
region=None,
geographic_azimuth=160,
dip=0,
pitch=0,
lags=lags,
tol=tol,
atol=45
)
vario_exp_160_minor = geo.variogram(
object=point_cloud,
attribute='V',
region=None,
geographic_azimuth=70,
dip=0,
pitch=0,
lags=lags,
tol=tol,
atol=45
)
geo.plot_semivariogram(
variograms=[vario_exp_160_major, vario_exp_160_minor],
display_npairs=True
)
Fitting A Model¶
A theoretical model is created and can be plotted on top of the experimental variogram.
Theorethical model available in GeoLime are :
- Nugget
- Spherical
- Gaussian
- Exponential
Create a Model¶
model = (
7000 * geo.Nugget(dimension=2)
+ 88000 * geo.Spherical(
dimension=2,
metric=geo.Metric(angles=160,scales=[70,30])
)
)
GeoLime Metric Object allows users to specify anisotropy in geostatistics algorithm. It enables users to directly input geologist angles (Azimuth, Dip & Pitch) as angles for the anisotropic scales.
Plotting Model on top of 1D Semi Variogram¶
geo.plot_semivariogram(
variograms=[vario_exp_160_major, vario_exp_160_minor],
model=model,
model_angles=[{"azi":160.,"dip":0.,"pitch":0.}, {"azi":70.,"dip":0.,"pitch":0.}]
)