[SciPy-User] Interpolation in 3D with interp2d

denis denis-bz-gg@t-online...
Thu Aug 5 08:11:40 CDT 2010


Jana, Andreas,

Take a look at http://scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data
and http://en.wikipedia.org/wiki/Natural_neighbor for a picture.

To use radial basis functions on N given data points,
one first solves an N x N linear system, so N can't be more than 1000
or so;
then each interpolated point takes time ~ N.
Also there are arbitrary choices of basis family and r0 -- your
mileage will vary.

As an alternative to RBFs I'd suggest the combination of scipy KDTree
and inverse-distance weighting given under
http://stackoverflow.com/questions/3104781/inverse-distance-weighted-idw-interpolation-with-python
.
KDTree finds the nearest say 8 neighbours to a point to interpolate,
then you take a weighted average of the 8 values A(f,z).
This works for data in 2d, 3d, 10d too.
But for your 2d data, Gridding_irregularly_spaced_data is faster and
simpler.

cheers
  -- denis


More information about the SciPy-User mailing list