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

Improve Map Interpolation Performance #672

Merged
merged 11 commits into from
Feb 14, 2018
Merged

Conversation

zhut19
Copy link
Contributor

@zhut19 zhut19 commented Feb 9, 2018

Following the stack over flow thread.
We try to improve map interpolation performance by

  1. Using cKDTree
  2. Vectorize InterpolateAndExtrapolate class call function

Here is a computing time comparison between different codes
fun_with_interpolation

Following the stack over flow [thread](https://stackoverflow.com/questions/34812372/interpolate-unstructured-x-y-z-data-on-best-grid-based-on-nearest-neighbour-dist).
We try to improve map interpolation performance by
1) Using cKDTree
2) Vectorize InterpolateAndExtrapolate class call function
@zhut19 zhut19 requested a review from feigaodm February 9, 2018 19:42
@zhut19 zhut19 removed the request for review from feigaodm February 10, 2018 00:56
Check if the input is vectors or not and choose between __call__ or v__call__
@zhut19 zhut19 requested a review from feigaodm February 13, 2018 15:17
@feigaodm feigaodm merged commit 497c9d5 into master Feb 14, 2018
@feigaodm feigaodm deleted the interpolation_patch_1 branch February 14, 2018 04:09
zhut19 added a commit that referenced this pull request Feb 16, 2018
In response to issue #674 and problem raised in issue #675, we would retract we would comment out the np vectorization part from pr #672. And keeps the cKTree part
@zhut19 zhut19 mentioned this pull request Feb 16, 2018
feigaodm pushed a commit that referenced this pull request Feb 16, 2018
* Retract feature in InterpolationMap

In response to issue #674 and problem raised in issue #675, we would retract we would comment out the np vectorization part from pr #672. And keeps the cKTree part
zhut19 added a commit that referenced this pull request Oct 8, 2018
Part of #672, then retracted in #676. Now, instead of np.vectorize, this pr uses python build-in map function. The change made here won't affect processing speed, but only to enable inputting something like ((x0, x1 ... xi), (y0, y1 ... yi), (z0, z1 ... zi)) and returns (v0, v1 ... vi)
feigaodm pushed a commit that referenced this pull request Oct 15, 2018
* Allow passing nd array to InterpolatingMap

Part of #672, then retracted in #676. Now, instead of np.vectorize, this pr uses python build-in map function. The change made here won't affect processing speed, but only to enable inputting something like ((x0, x1 ... xi), (y0, y1 ... yi), (z0, z1 ... zi)) and returns (v0, v1 ... vi)

* more if's to speed up npoints input
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

Successfully merging this pull request may close these issues.

2 participants