rubin_sim.utils.cartesian_from_spherical(longitude, latitude)

Transforms between spherical and Cartesian coordinates.

@param [in] longitude is a numpy array or a number in radians

@param [in] latitude is a numpy array or number in radians

@param [out] a numpy array of the (three-dimensional) cartesian coordinates on a unit sphere.

if inputs are numpy arrays: output[i][0] will be the x-coordinate of the ith point output[i][1] will be the y-coordinate of the ith point output[i][2] will be the z-coordinate of the ith point

All angles are in radians

Also, look at xyz_from_ra_dec().