Note
Go to the end to download the full example code.
Understanding the Influence of Variograms
Up until now, we have only used very smooth Gaussian variograms for the underlying spatial random fields. Now, we will combine a smooth Gaussian field with a much rougher exponential field. This example should feel familiar, if you had a look at the previous examples.
Now, we generate fields with a Gaussian and an Exponential variogram.
The lithotypes will consist of a circle which contains one category and the surrounding is the second category.
# no. of grid cells of the lithotypes
M = [200, 200]
# radius of circle
radius = 25
x_lith = np.arange(M[0])
y_lith = np.arange(M[1])
lithotypes = np.zeros(M)
mask = (x_lith[:, np.newaxis] - M[0] // 2) ** 2 + (
y_lith[np.newaxis, :] - M[1] // 2
) ** 2 < radius**2
lithotypes[mask] = 1
With the two SRFs and the lithotypes ready, we can create the PGS.
pgs = gs.PGS(dim, [field1, field2])
P = pgs(lithotypes)
And now the plotting of the two Gaussian fields, the lithotypes, and the PGS.

In this PGS, we can see two different spatial structures combined. We see large and rather smooth structures and shapes, which are surrounded by very rough and unconnected patches.
Total running time of the script: (0 minutes 1.973 seconds)