-
Hi to all, I am new here, great package! import gstools as gs
x = y = range(100)
model = gs.Gaussian(dim=2, var=1, len_scale=10)
srf = gs.SRF(model, seed=20170519)
field = srf.structured([x, y])
srf.plot() #ok is Gaussian
print('Gaussian:')
print(field)
gs.transform.normal_to_lognormal(srf)
srf.plot() #ok is log normal
print('Gaussian (should be lognormal?):')
print(field)
field = srf.structured([x, y])
print('Gaussian (should be lognormal?):')
print(field) All three field prints get the same result. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi EnxEng! Thanks for the feedback, very much appreciated! Try this code: import gstools as gs
x = y = range(100)
model = gs.Gaussian(dim=2, var=1, len_scale=10)
srf = gs.SRF(model, seed=20170519)
field = srf.structured([x, y])
srf.plot() #ok is Gaussian
print('Gaussian:')
print(field)
gs.transform.normal_to_lognormal(srf)
field_log_norm = srf.field # the transformation is saved internally
srf.plot() #ok is log normal
print('Log-Normal:')
print(field_log_norm)
field_gau_again = srf.structured([x, y])
print('Gaussian again, the srf.structured method overwrites the internally saved transformed field:')
print(field_gau_again) Is that what you are looking for? @MuellerSeb Is there a good reason why the transformations do not return the transformed field? |
Beta Was this translation helpful? Give feedback.
Hi EnxEng!
Thanks for the feedback, very much appreciated!
Try this code:
Is that what you are looking for?
@MuellerSeb Is there a good rea…