cart2spherical

Import in python using from mcutils.utils.spherical import cart2spherical

mcutils.utils.spherical.cart2spherical(x, y, z)[source]

Converts to spherical coordinates

Parameters
  • x – x-component of the vector

  • y – y-component of the vector

  • z – z-component of the vector

Returns

tuple with (r, phi, theta)-coordinates