[SciPy-User] How can I interpolate array from spherical to cartesian coordinates?

Charles R Harris charlesr.harris@gmail....
Tue Feb 12 00:07:56 CST 2013


On Mon, Feb 11, 2013 at 8:48 PM, Joseph Smidt <josephsmidt@gmail.com> wrote:

> 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.
>
>
I'm not clear on what you are trying to do, but I'm guessing you have
sample points on a sphere and you want to find interpolated values at other
points on the sphere, the cartesian coordinates being a means rather than
an end. Is that the case? If not, can you be more explicit.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20130211/3106529c/attachment.html 


More information about the SciPy-User mailing list