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

Out of memory error #15

Open
henry2004y opened this issue Sep 1, 2019 · 2 comments
Open

Out of memory error #15

henry2004y opened this issue Sep 1, 2019 · 2 comments

Comments

@henry2004y
Copy link

henry2004y commented Sep 1, 2019

Hi,

I was trying to do the interpolation onto a 3D grid. With the number of scattered points ~2*10^6 and the method Multiquadratic(), I had a OutOfMemoryError. Based on what I've seen briefly in the backtrace source code, there is somewhere in the Distance package that requires a n*n matrix, where n is the number of scattered points. Is that right? Is it possible to do the interpolation at this size currently?

I also tried Shepard(). It turns out that there're also allocations of some large matrix which throws OutOfMemoryError with a large number of points to be evaluated when calling evaluate.

In MATLAB or Python, I noticed that for 3D scattered data interpolation only two methods are presented: nearest neighbor and linear. The methods in this package is different from what the other two mean by linear right? Is there an equivalent method of linear in Julia?

Thanks ahead.

@eljungsk
Copy link
Owner

eljungsk commented Sep 3, 2019

Hi,

This is a major drawback of the current methods in this package (except for NearestNeighbor()), since they need the distance between all sampling points.

I would really like to have an implementation of a fast linear method corresponding to the ones in Python or MATLAB. However, these use a Delaunay triangulation of the sampling points, and as far as I know, the only Julia library providing such a triangulation works only in 2D. I started an implementation two years ago by wrapping the Qhull library that both Python and MATLAB use for the Delaunay triangulation, but that was a major pain and I gave up.

I am not aware of any other Julia package that would be able to perform interpolation of scattered data for larger data sets. Maybe a solution for you could be to use the linear methods from Python using PyCall.jl?

@henry2004y
Copy link
Author

Actually calling griddata directly from Python is my current working approach. I also found the 3D Delaunay support somehow missing in the Julia community, which is quite sad.

Thanks for your answer!

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

2 participants