cart_to_sphere

clustertools.util.coordinates.cart_to_sphere(x, y, z, vx, vy, vz)[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