[SciPy-User] How can I interpolate array from spherical to cartesian coordinates?
Joseph Smidt
josephsmidt at gmail.com
Mon Feb 11 22:48:31 EST 2013
I have an array of density values in spherical coordinates. More
specifically I have an array called density with shape (180,200,200). I
also have an array called r_coord, theta_coord and phi_coord also with
shape (180,200,200) being the spherical coordinates for the density array.
I would like to map this density to cartesian coordinates using python. I
will need therefore a new array density_prime which is interpolated over
cartesian coordinates x_coord, y_coord and z_coord. I found
scipy.ndimage.interpolation.map_coordinates which looks promising but I
can't figure out how to get it to work.
Any help would be appreciated. Thanks.
--
------------------------------------------------------------------------
Joseph Smidt <josephsmidt at gmail.com>
Theoretical Division
P.O. Box 1663, Mail Stop B283
Los Alamos, NM 87545
Office: 505-665-9752
Fax: 505-667-1931
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20130211/95536a27/attachment.html>
More information about the SciPy-User
mailing list