-
Notifications
You must be signed in to change notification settings - Fork 1
Description
I added an interpolator to the ND data scratch class. Let's us this to discuss/improve it. At the moment you have to add an interpolator manually to the array by calling
nddata.add_linear_interpolator()
this creates a scipy RegularGridInterpolator
then you can evaluate it using the evaluate method, which has a keyword for the interpolation method. At the moment 'linear' and 'nearest' (these 2 are covered by the scipy RegularGridInterpolator).
The idea was to add more methods to this evaluate function, that call into other interpolators (if we want other methods at all). So you would for example have
hist.add_spline_interpolator()
hist.evaluate(..., method=spline)
An example how the interpolation works is also in https://github.com/joleroi/nddata/blob/master/NDData_demo.ipynb
Do you think that's a good idea?
Do you think we should add the regular grid interpolator by default?
cc @cdeil