Skip to content

variogramvario_estimate(direction..) #236

Answered by MuellerSeb
cecidip asked this question in Q&A
Discussion options

You must be logged in to vote

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()

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@cecidip
Comment options

Answer selected by cecidip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants