Import in python using from mcutils.utils.spherical import cart2spherical
mcutils.utils.spherical.
cart2spherical
Converts to spherical coordinates
x – x-component of the vector
y – y-component of the vector
z – z-component of the vector
tuple with (r, phi, theta)-coordinates