Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plurigaussian fields #370

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Plurigaussian fields #370

wants to merge 24 commits into from

Conversation

LSchueler
Copy link
Member

Plurigaussian simulations (PGS) are a great way to easily increase the flexibility of Gaussian random fields. With this PR I want to directly incorporate them into GSTools. It not only includes the implementation, but also unittests and a few examples, with which users can familiarize themselves with PGS, as I do not find them very intuitive at first.

However, I still have a few open questions:

  • Should PGS really be a class? I mostly did this for GSTools to keep a more or less constant structure. But I don't see any benefits of using a class here. It only makes it a bit more complicated to use PGSs, as you have to first create an instance and then call it, instead of only calling a pgs function. Any opinion on this point @MuellerSeb ?

  • At one point we might have to think about a new structure for the examples. In 01_random_field we have examples for general field generation, but based on the randomization method and some examples showing the Fourier method. Then we have 04_vector_field with the vector field generation. And now we have 11_plurigaussian. What do you think @MuellerSeb , should we discuss this soon?

  • Is the argument facies the best name for a method which is used in many different fields?

  • Any other paper(s) we should cite?

@LSchueler LSchueler added enhancement New feature or request help wanted Extra attention is needed labels Nov 19, 2024
@LSchueler LSchueler added this to the 1.7 milestone Nov 19, 2024
@LSchueler LSchueler requested a review from MuellerSeb November 19, 2024 17:20
@LSchueler LSchueler self-assigned this Nov 19, 2024
I'm not able to install old numpy versions locally and the exception
documentation of numpy is non existent and I can't bother to go through
its source code, so I'll just see what the actions show.
I don't understand why `np.AxisError` doesn't work for np 2.x
@LSchueler
Copy link
Member Author

LSchueler commented Nov 20, 2024

Wow, that's a curious detail I stumbled upon...

And for some reason, the old numpy.AxisError didn't work for me with numpy 2.x, which was moved to numpy.exceptions.AxisError, but for backwards compatibility was supposed to be kept in the old place too.

@LSchueler
Copy link
Member Author

Thanks to @EJRicketts's feedback, I updated the examples and fixed a bug, where the L field could have an offset.

@EJRicketts
Copy link

Thank you or sharing this with me, it's nice to see that the offset has been sorted :) This was my only major comment.

In general, I think it would be nice to include an example that shows the use of conditional random fields and also periodic random fields.

For field scale problems with associated experimental observations, combining a well chosen lithotype with conditional random fields can be quite powerful in getting nice realistic representations.

With respect to the periodic case, periodicity in the input fields will result in periodicity in the final field, which for my research purposes have been useful in material characterisation. I published some work on this for cementitious materials recently: https://doi.org/10.1007/s11242-024-02074-z
It would be easy to replicate these results for the example, but perhaps a more geoenvironmental example would be best! In any case, a small mention of the paper in the example would be much appreciated 😊

Regarding citing works, there is a nice book on PGS: https://link.springer.com/book/10.1007/978-3-642-19607-2
The authors are (mostly) from the birth place of PGS (Mines-Paristech), some of which are the original authors who took the idea of truncated random fields and extended it to PGS. It feels important to include this.
Xavier Emery has also had quite a big influence on PGS, so it might be worth citing their work also: https://doi.org/10.1016/j.cageo.2007.01.006

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants