[SciPy-User] 2D Interpolation

Jose Gomez-Dans jgomezdans@gmail....
Sat Jan 9 10:18:22 CST 2010


Hi Bruce!

2010/1/8 Bruce Ford <bruce@clearscienceinc.com>


Here's your problem:

>  coords = array([xnew,ynew])
>
interpolated = ndimage.map_coordinates(test_array, coords, order=3)
>

coords (and hence xnew and ynew) need to be specified in array units, so you
need to calculate where your 1 degree grid falls within the 2.5 degree
original grid, so you can define

ynew = numpy.linspace (0,360,360)/2.5
xnew = numpy.linspace (0,180, 180)/2.5
coords = numpy.array([xnew, ynew])

and feed that into map_coordinates.

Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100109/5f789966/attachment.html 


More information about the SciPy-User mailing list