Tutorials

# Creating Fancier Fields

%matplotlib widget
import matplotlib.pyplot as plt
plt.ioff()
# turn of warnings
import warnings
warnings.filterwarnings('ignore')

Only using Gaussian covariance fields gets boring. Now we are going to create much rougher random fields by using an exponential covariance model and we are going to make them anisotropic.

The code is very similar to the previous examples, but with a different covariance model class Exponential. As model parameters we a using following

• variance $\sigma^2=1$
• correlation length $\ell=(12, 3)^T$
• rotation angle $\theta=\pi/8$
import numpy as np
import gstools as gs

x = y = np.arange(0, 101)
model = gs.Exponential(
dim=2,
var=1,
len_scale=[12.0, 3.0],
print(model)
model = gs.Exponential(dim=2, var=1, len_scale=12, anis=1/4, angles=np.deg2rad(22.5))
print(model)