sphere_to_cart#

pycraf.geometry.sphere_to_cart(r, phi, theta, broadcast_arrays=True)[source]#

Spherical coordinates from Cartesian representation.

Parameters:
rQuantity

Radial distance [m]

phiQuantity

Azimuth [deg]

thetaQuantity

Elevation [deg]

broadcast_arraysbool, optional

If ‘True’, output arrays will be broadcasted to dense matrices, otherwise the returned arrays will be a sparse representation (default: True)

Returns:
x, y, zQuantity

Cartesian position [m]

Notes

Unlike with the mathematical definition, theta is not the angle to the (positive) z axis, but the elevation above the x-y plane.