[SciPy-user] [Fwd: 3D interpolation over irregular data]

James Turner jturner@gemini....
Wed Jul 30 13:46:25 CDT 2008

Hi Mark,

> I've an array of velocities at 80,000 points, irregularly spaced (from a
> CFD analysis).  I'd like to generate the interpolated velocity at any
> position in the domain, to map the data to an acoustics analysis on a
> different mesh.
> I tried a least squares approach but the errors are too large using
> polynomials and trigonometric functions.  My conclusion is that I need a
> nearest-neighbour type interpolation routine.

If you don't have any joy with the other suggestions, there are some
useful routines by Renka in Netlib, at least one of which is 3D,
though I believe they are also piecewise polynomials (and in ForTran,
of course, so need wrapping).


I also have a program implementing the Hubble Telescope's "Drizzle"
algorithm in 3D, which is similar to nearest neighbour or linear,
but unfortunately it's written in an obscure language that would
make it difficult to use from Python unless you are prepared to
install STScI's PyRAF. I also suspect it will only work well for
data that are mildly irregular and it may be fiddly to set up for
your application, but anyway, just so you have the option...
The paper is at http://xxx.lanl.gov/abs/astro-ph/9708242.

Are the points really irregular in 3D, or just in 1-2 of the
dimensions? If any dimension is regularly spaced, you might be able
to simplify the problem by resampling in 1-2D at a time?

Stefan might also have suggestions ;-). But maybe the radial basis
functions will do the trick... I'll have to look at those.



More information about the SciPy-user mailing list