@@ -217,12 +217,12 @@ p1 = GaussianProcess(GaussianVariogram(range=10.0))
217
217
p2 = GaussianProcess(GaussianVariogram(range=30.0))
218
218
219
219
Random.seed!(2023)
220
- d1 = rand(p1, g, [:Z => Float64], LUMethod() )
221
- d2 = rand(p2, g, [:Z => Float64], LUMethod() )
220
+ d1 = rand(p1, g)
221
+ d2 = rand(p2, g)
222
222
223
223
fig = Mke.Figure()
224
- viz(fig[1,1], d1.geometry, color = d1.Z , axis = (; title="range: 10"))
225
- viz(fig[2,1], d2.geometry, color = d2.Z , axis = (; title="range: 30"))
224
+ viz(fig[1,1], d1.geometry, color = d1.field , axis = (; title="range: 10"))
225
+ viz(fig[2,1], d2.geometry, color = d2.field , axis = (; title="range: 30"))
226
226
fig
227
227
```
228
228
@@ -243,14 +243,14 @@ p1 = GaussianProcess(GaussianVariogram(range=10.0, sill=1.0))
243
243
p2 = GaussianProcess(GaussianVariogram(range=10.0, sill=9.0))
244
244
245
245
Random.seed!(2023)
246
- d1 = rand(p1, g, [:Z => Float64], LUMethod() )
247
- d2 = rand(p2, g, [:Z => Float64], LUMethod() )
246
+ d1 = rand(p1, g)
247
+ d2 = rand(p2, g)
248
248
249
249
f(x) = ustrip(first(to(centroid(x))))
250
250
251
251
fig = Mke.Figure()
252
- Mke.lines(fig[1,1], f.(d1.geometry), d1.Z , color = "black", axis = (; title="sill: 1"))
253
- Mke.lines(fig[2,1], f.(d2.geometry), d2.Z , color = "black", axis = (; title="sill: 9"))
252
+ Mke.lines(fig[1,1], f.(d1.geometry), d1.field , color = "black", axis = (; title="sill: 1"))
253
+ Mke.lines(fig[2,1], f.(d2.geometry), d2.field , color = "black", axis = (; title="sill: 9"))
254
254
fig
255
255
```
256
256
@@ -273,14 +273,14 @@ p1 = GaussianProcess(GaussianVariogram(range=10.0, nugget=0.1))
273
273
p2 = GaussianProcess(GaussianVariogram(range=10.0, nugget=0.2))
274
274
275
275
Random.seed!(2023)
276
- d1 = rand(p1, g, [:Z => Float64], LUMethod() )
277
- d2 = rand(p2, g, [:Z => Float64], LUMethod() )
276
+ d1 = rand(p1, g)
277
+ d2 = rand(p2, g)
278
278
279
279
f(x) = ustrip(first(to(centroid(x))))
280
280
281
281
fig = Mke.Figure()
282
- Mke.lines(fig[1,1], f.(d1.geometry), d1.Z , color = "black", axis = (; title="nugget: 0.1"))
283
- Mke.lines(fig[2,1], f.(d2.geometry), d2.Z , color = "black", axis = (; title="nugget: 0.2"))
282
+ Mke.lines(fig[1,1], f.(d1.geometry), d1.field , color = "black", axis = (; title="nugget: 0.1"))
283
+ Mke.lines(fig[2,1], f.(d2.geometry), d2.field , color = "black", axis = (; title="nugget: 0.2"))
284
284
fig
285
285
```
286
286
@@ -294,13 +294,13 @@ p1 = GaussianProcess(GaussianVariogram(range=10.0, nugget=0.0))
294
294
p2 = GaussianProcess(GaussianVariogram(range=10.0, nugget=0.1))
295
295
296
296
Random.seed!(2023)
297
- d1 = rand(p1, g, [:Z => Float64], LUMethod() )
297
+ d1 = rand(p1, g)
298
298
Random.seed!(2023)
299
- d2 = rand(p2, g, [:Z => Float64], LUMethod() )
299
+ d2 = rand(p2, g)
300
300
301
301
fig = Mke.Figure()
302
- viz(fig[1,1], d1.geometry, color = d1.Z , axis = (; title="nugget: 0.0"))
303
- viz(fig[2,1], d2.geometry, color = d2.Z , axis = (; title="nugget: 0.1"))
302
+ viz(fig[1,1], d1.geometry, color = d1.field , axis = (; title="nugget: 0.0"))
303
+ viz(fig[2,1], d2.geometry, color = d2.field , axis = (; title="nugget: 0.1"))
304
304
fig
305
305
```
306
306
@@ -325,13 +325,9 @@ geospatial correlation. The most widely used are the `GaussianVariogram`, the
325
325
γ2 = SphericalVariogram()
326
326
γ3 = ExponentialVariogram()
327
327
328
- fig = Mke.Figure()
329
- Mke.Axis(fig[1,1])
330
- varioplot!(γ1, maxlag=2.0, color = "teal", label = "Gaussian")
331
- varioplot!(γ2, maxlag=2.0, color = "slategray3", label = "Spherical")
332
- varioplot!(γ3, maxlag=2.0, color = "brown", label = "Exponential")
333
- Mke.axislegend("Model", position = :rb)
334
- fig
328
+ fig = funplot(γ1, maxlag=2.0, color = "teal")
329
+ funplot!(fig, γ2, maxlag=2.0, color = "slategray3")
330
+ funplot!(fig, γ3, maxlag=2.0, color = "brown")
335
331
```
336
332
337
333
The faster is the increase of the function near the origin, the more "erratic" is the process:
@@ -345,14 +341,14 @@ p2 = GaussianProcess(SphericalVariogram(range=10.0))
345
341
p3 = GaussianProcess(ExponentialVariogram(range=10.0))
346
342
347
343
Random.seed!(2023)
348
- d1 = rand(p1, g, [:Z => Float64], LUMethod() )
349
- d2 = rand(p2, g, [:Z => Float64], LUMethod() )
350
- d3 = rand(p3, g, [:Z => Float64], LUMethod() )
344
+ d1 = rand(p1, g)
345
+ d2 = rand(p2, g)
346
+ d3 = rand(p3, g)
351
347
352
348
fig = Mke.Figure()
353
- viz(fig[1,1], d1.geometry, color = d1.Z , axis = (; title="model: Gaussian"))
354
- viz(fig[2,1], d2.geometry, color = d2.Z , axis = (; title="model: Spherical"))
355
- viz(fig[3,1], d3.geometry, color = d3.Z , axis = (; title="model: Exponential"))
349
+ viz(fig[1,1], d1.geometry, color = d1.field , axis = (; title="model: Gaussian"))
350
+ viz(fig[2,1], d2.geometry, color = d2.field , axis = (; title="model: Spherical"))
351
+ viz(fig[3,1], d3.geometry, color = d3.field , axis = (; title="model: Exponential"))
356
352
fig
357
353
```
358
354
@@ -419,7 +415,7 @@ g = EmpiricalVariogram(img, :Z, maxlag = 50.0)
419
415
```
420
416
421
417
``` {julia}
422
- varioplot (g)
418
+ funplot (g)
423
419
```
424
420
425
421
::: {.callout-note}
@@ -437,27 +433,26 @@ specific directions:
437
433
gₕ = DirectionalVariogram((1.0, 0.0), img, :Z, maxlag = 50.0)
438
434
gᵥ = DirectionalVariogram((0.0, 1.0), img, :Z, maxlag = 50.0)
439
435
440
- varioplot(gₕ, showhist = false, color = "maroon")
441
- varioplot!(gᵥ, showhist = false, color = "slategray")
442
- Mke.current_figure()
436
+ fig = funplot(gₕ, showhist = false, color = "maroon")
437
+ funplot!(fig, gᵥ, showhist = false, color = "slategray")
443
438
```
444
439
445
440
In this example, we observe that the blobs are elongated with a horizontal
446
441
range of 30 pixels and a vertical range of 10 pixels. This is known as
447
442
geometric ** anisotropy** .
448
443
449
444
We can also estimate the variogram in all directions on a plane with the
450
- ` EmpiricalVarioplane ` :
445
+ ` EmpiricalVariogramSurface ` :
451
446
452
447
``` {julia}
453
- gₚ = EmpiricalVarioplane (img, :Z, maxlag = 50.0)
448
+ gₚ = EmpiricalVariogramSurface (img, :Z, maxlag = 50.0)
454
449
```
455
450
456
- The varioplane is usually plotted on a polar axis to highlight the different
457
- ranges as a function of the polar angle:
451
+ The variogram surface is usually plotted on a polar axis to highlight the
452
+ different ranges as a function of the polar angle:
458
453
459
454
``` {julia}
460
- planeplot (gₚ)
455
+ surfplot (gₚ)
461
456
```
462
457
463
458
::: {.callout-note}
0 commit comments