[SciPy-User] How to map spherical coordinate data to cartesian grid?
Steve Miller
tweetsforzion at gmail.com
Thu Apr 17 10:10:35 EDT 2014
Dear all. I was send 4 long 1D arrays (flattened) representing 3D data in
spherical coordinates:
rho: density array
r: spherical coordinate r array
th: spherical coordinate theta array
phi: spherical coordinate phi array
where the r, th, and phi arrays are the coordinates for the density array
rho. These arrays are not uniformly spaces in r, th and phi.
I would like to map rho to cartesian coordinates of a 3D cube. IE, define:
X, Y, Z = mgrid[etc...]
Is there a handy scipy routine that will map/interpolate these rho values
in spherical coordinates across my new cartesian box? Naively I thought I
could use something like map_coordinates but I am unclear how I would use
this for this calculation. Could someone provide a simple example script
for how I could use scipy to do this? Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20140417/160809cb/attachment.html>
More information about the SciPy-User
mailing list