[SciPy-User] How can I interpolate array from spherical to cartesian coordinates?
Charles R Harris
Tue Feb 12 00:07:56 CST 2013
On Mon, Feb 11, 2013 at 8:48 PM, Joseph Smidt <firstname.lastname@example.org> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User