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

Options for alternative spatial interpolation methods #113

Merged
merged 5 commits into from
Nov 29, 2016

Conversation

Jacketless
Copy link
Contributor

Added a few lines fields alternative interpolation method arguments to
be passed to SciPy’s RegularGridInterpolator interpolator method.

At present, fields’ self.interp_method defaults to linear, and must
be set manually by the user for each field.

@mlange05 or @erikvansebille can you take a quick look at this?
Field.interpolator2D is cached method, and so I’m concerned that my
additions may not actually do anything if the field.interp_method is
changed after initialisation (which it always is at present).

Added a few lines fields alternative interpolation method arguments to
be passed to SciPy’s `RegularGridInterpolator` interpolator method.

At present, fields’ `self.interp_method` defaults to linear, and must
be set manually by the user for each field.

@mlange05 or @erikvansebille can you take a quick look at this?
`Field.interpolator2D` is cached method, and so I’m concerned that my
additions may not actually do anything if the field.interp_method is
changed after initialisation (which it always is at present).
@mlange05
Copy link

Yes, this looks nice and it should not interfere with caching at all - the RegularGridInterpolator object is cached and you're only changing a constructor argument. Would be nice to add the new parameter to the dosctring for Field.

@erikvansebille
Copy link
Member

I like it too, @Jacketless! Also, we need to make very clear that this interp_method only applies to Scipy-mode. This can be done

  1. in the docstring, or
  2. as a warning message when interp_method is changed but execute is in JIT

In JIT, we've written our own linear interpolation method, and while eventually we want more options there too, that's not really a priority for the v0.9 we're working towards at the moment

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.

None yet

3 participants