sphere_to_cart

clustertools.util.coordinates.sphere_to_cart(r, phi, theta, vr, vphi, vtheta)[source]

Convert cartesian coordinates to spherical coordinates

Parameters:
x,y,z,vx,vy,vzfloat

positions and velocities in cartesian coordinates

Returns:
r,theta,phi,vr,vtheta,vphifloat

positions and velocities in spherical coordinates