treams.special.car2sph

Contents

treams.special.car2sph#

treams.special.car2sph(r) = <ufunc 'car2sph'>#

Convert cartesian to spherical coordinates

The cartesian coordinates \((x, y, z)\) are converted to \((r, \theta, \varphi)\) with \(x = r \sin \theta \cos \varphi\), \(y = r \sin \theta \sin \varphi\), and \(z = r \cos \theta\).

Parameters:

r (float, 3-array) – Cartesian coordinates in 3-dimensional space

Returns:

float, 3-array