GeoStat-Framework / GSTools

GSTools - A geostatistical toolbox: random fields, variogram estimation, covariance models, kriging and much more
https://geostat-framework.org
GNU Lesser General Public License v3.0
546 stars 72 forks source link

Random fields generated with same seed but different covariance models #101

Closed chrisdelat closed 4 years ago

chrisdelat commented 4 years ago

I'm trying to compare the influence of covariance model on my results. When I generate random fields with the same seed but using different covariance models the resulting fields do not look as similar as I would expect and as I've seen in other publications doing similar work. Is it possible to generate the "same" random field with different small-scale"roughness" corresponding to the covariance model used?

I've attached an example using Seed=10 for Exponential, Gaussian, and Matern covariance model. You can see they are similar (even with different color scales), but there are also some significant differences. Is this the expected behaviour?

Thank you! 2D_VsProfile_Seed10_Gaussian.pdf 2D_VsProfile_Seed10_Matern.pdf 2D_VsProfile_Seed10_Exponential.pdf

MuellerSeb commented 4 years ago

Hey there, the more I think about this, the less I think this can be done in a rigorous way. The generation is based on sampling from the spectral density distribution of the covariance model. If this spectral density is changing, the sampling is altered as well. This could only be preserved, when using another spectral method like the simple "Fourier Method", which is deterministic. But it is not implemented ATM, since we only provide the "randomization method" (See here for details)

You could try to generate conditioned fields (see here) with the same conditioning values preserving the max and min values, so you can see the different transitions depending on the covariance model. (sth like a grid of alternating +1 and -1 values at a distance of 2 with len_scale=1 in the models)

This behavior is not unexpected, since the definition of "similar" fields is quite unspecific.

But I am really curious about these publications you are talking about. Could you provide a link or DOI, so that I could have a look?

Hope that helps a bit! Cheers, Sebastian

chrisdelat commented 4 years ago

Hi Sebastian,

Thanks for the quick reply. Attached are a couple examples of what I mean from:

(1) Haruo Sato's textbook on Seismic Wave Propagation and Scattering in the Heterogeneous Earth: https://link.springer.com/book/10.1007/978-3-642-23029-5

(2) Frankel and Clayton's paper on Finite difference simulations of seismic scattering: https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/JB091iB06p06465

In their figures you can clearly see that is it the same background spatial distribution but with different small-scale roughness. I don't know how they generated these, I just assumed it was with a random seed, and based on Sato's description it does seem that it is the seed. My goal is to replicate this with many different seeds.

From Sato: "Changing different seeds for the generation of random phase spectra, we are able to synthesize different realizations of random media as shown in Fig. 2.6. Those examples schematically illustrate different types of 2-D random media for the same 'epsilon' and a. "

Frankel_RandomFields Sato_RandomFields

LSchueler commented 4 years ago

It seems that you want to do some kind of stochastic analysis with an ensemble of spatial random field realisations.

If that is the case, you do not need similar patterns for each single realisation of the different covariance models. In the end, you will be interested in some stochastic measures (means, variances or maybe the complete PDF). For this you only need some kind of week convergence.

If I got you wrong and you want to actually perform your studies on single fields, you could maybe start off with a very rough field (truncated power law? - that's probably the same as "self similar" in the plot) and smooth that with increasingly larger spatial filters (upscaling). You could determine the correlation lengths of the smoothed out fields with the variogram estimation routines provided by GSTools.

chrisdelat commented 4 years ago

Yes, you're right. My convergence study indicates that the intensity measures in which I'm interested converge within about 10 realizations for means and 30 realizations for standard deviations. I've done this with hundreds of other parameter permutations and now with the covariance models as well. For certain things it is nice to make a one-to-one comparison using the same seed, as I think there are insights to be gained from that, but for now I'm satisfied with the ensemble approach.

Thanks for your help, Chris

LSchueler commented 4 years ago

That's actually the first time I've heard of a case, where the Fourier method has an advantage over the randomization method for random field generation. Thanks for that insight!

I'll close this issue, but feel free to open it again or to create a new one.