variogramvario_estimate(direction..) #236
-
Hello, i am trying to find an optimal angle for my anisotropy. The description sais " If multiple directions are given, a set of variograms will be returned" , so far i could only make it work as in the example: But if i put more than the main and orthogonal directions it does not work. How can I input several angles then ? Sorry for the silly question and thank you, Cecilia |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hey there! There are no silly questions. Cheers, Sebastian |
Beta Was this translation helpful? Give feedback.
-
For example, this is working for me: import numpy as np
from matplotlib import pyplot as plt
import gstools as gs
angle = np.pi / 8
model = gs.Exponential(dim=2, len_scale=[10, 5], angles=angle)
x = y = range(101)
srf = gs.SRF(model, seed=123456)
field = srf((x, y), mesh_type="structured")
# small search steps up to 90 degree
search_angles = [i * np.pi / 8 for i in range(5)]
directions = [[np.cos(ang), np.sin(ang)] for ang in search_angles]
bin_center, varios = gs.vario_estimate(
(x, y),
field,
mesh_type="structured",
direction=directions,
)
for var, ang in zip(varios, search_angles):
plt.plot(bin_center, var, label=f"{np.rad2deg(ang)}")
plt.legend()
plt.show() |
Beta Was this translation helpful? Give feedback.
For example, this is working for me: