[SciPy-User] another interpolation question

Christopher Barker Chris.Barker at noaa.gov
Thu Feb 17 12:38:45 EST 2011


On 2/17/11 7:50 AM, Bryan Woods wrote:
> I am looking for a (fast as possible) way to interpolate my data from a
> coarse to fine grid where the limits may not match.

what do you mean by "limits" -- does that mean you may be extrapolating 
-- always a problem!

> I saw ndimage.map_coordinates but it seems to want i,j coordinates
> whereas I have 1D lat,lon coordinate arrays.

so your input points are not regularly spaced? Ifso, then you need a 
routine dsigned for that. A couple options:

natural neighbor interpolation:

See the natgrid toolkit referenced here:
http://matplotlib.sourceforge.net/users/toolkits.html


Radial basis functions:
http://www.scipy.org/Cookbook/RadialBasisFunctions


For straight linear, you should be able to do a delauney triangulation, 
and simple linear interpolation from that, though I don't know of a 
package that does this out of the box.

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov



More information about the SciPy-User mailing list