[SciPy-user] 2D interpolation from a set of irregularly spaced positions in python?

Robert Kern rkern at ucsd.edu
Tue Jul 19 09:43:21 CDT 2005

Eric Emsellem wrote:
> Hi,
> I have a very simple problem which I am not able to solve with my 
> current knowledge of scipy/python/...
> I have a set of positions X, Y, and intensities Z provided in 1D arrays.
> The positions are NOT at all on a regular grid.
> Now for a new position Xnew, Ynew I would like to get the *interpolated* 
> Znew value, and if possible trying different schemes such as "bilinear", 
> "cubic", etc... I also would like to know if my point is EXTRApolated or 
> not so I can decide what to do (either take the extrapolated value or 
> exclude it).

Look at Scientific.Functions.Interpolation . It's only one scheme, but 
it does the job.


Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter

More information about the SciPy-user mailing list