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

Add a listing of interpolator types to the API documentation #224

Open
davenquinn opened this issue Mar 6, 2025 · 4 comments
Open

Add a listing of interpolator types to the API documentation #224

davenquinn opened this issue Mar 6, 2025 · 4 comments

Comments

@davenquinn
Copy link

There are numerous references to interpolator types in the documentation, but there is no authoritative reference on the range of options available. I finally found one by reading through the code. Ideally, the docs would also be a little more centralized in how they discuss the use cases and input parameters for each interpolation scheme.

interpolator_string_map = {

@lachlangrose
Copy link
Member

Hi @davenquinn, thanks for the feedback. Generally all of the interpolator are for the same task.. except p2 which is experimental. The main difference is the support used for interpolation and as a result the speed of interpretation. FDI is a good choice to start. If you want to contribute to the docs feel free to open a PR.

@EasonWangc
Copy link

您好,感谢您的反馈。通常所有的插值器都是为了同一个任务..除了 P2 是实验性的。主要区别在于用于插值的支撑,因此解释的速度也不同。FDI 是一个不错的选择。如果您想为文档做出贡献,请随时打开 PR。

Hello! I have some confusion regarding the interpolator, and I would appreciate your help in clarifying it. Before interpolation, the attribute values (lithology) in my dataset are discrete numbers ranging from 0 to 10. After interpolation, I tested the accuracy of my interpolation using the model.evaluate_model(xyz) method and found that the interpolated values range from -1 to 10, which includes an extra value of -1 that was not present before. This confuses me, and I suspect that it might be an issue with the interpolation method.

Is it possible to add constraints on the value range in interpolation methods like FDI? Additionally, can I use my own custom-defined interpolation algorithms, such as Kriging?

@lachlangrose
Copy link
Member

hi @EasonWangc, sorry for the delay replying I have been on leave for a few weeks. The loop interpolators are usually trying to interpolate a signed distance field so the values associated with each stratigraphic unit should be the distance from the base/top of the group to that contact. If you use discrete numbers you would need to treat these as interface constraints, which will then additionally require constraints for the gradient norm or unique value constraints.

Yes, you can define your own interpolator in LoopStructural... it is a bit clunky to do at the moment but if you were to build a class using the GeologicalInterpolator as a base and then implement all of the abstract methods it will be compatible with LoopStructural. To register this with LoopStructural you would need to add the interpolator with a string alias to the interpolator_string_map dictionary. The surfe interpolator might do what you need?

Cheers

@EasonWangc
Copy link

EasonWangc commented Mar 31, 2025

I am glad to receive your reply! I am not very proficient in using LoopStructural and do not quite understand how to implement interface constraints. Could you provide some example code or a more detailed explanation? I would greatly appreciate it.

Additionally, I am pleased to know that defining my own interpolator in LoopStructural is possible. I noticed that there is no Kriging interpolation method in LoopStructural; could you provide an example of how to add the Kriging method to LoopStructural?

I also noticed a warning after running my code: "Surfe is not installed, SurfeRBFInterpolator will not be available." I found that in your updates, it seems you have removed the surfepy import. How to deal with this problem?

In any case, thank you for your reply, and I look forward to hearing from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants