spherical_to_cartesian¶
- halotools.utils.spherical_to_cartesian(ra, dec)[source]¶
Calculate cartesian coordinates on a unit sphere given two angular coordinates. parameters
- Parameters:
- raarray
Angular coordinate in degrees
- decarray
Angular coordinate in degrees
- Returns:
- x,y,zsequence of arrays
Cartesian coordinates.
Examples
>>> ra, dec = 0.1, 1.5 >>> x, y, z = spherical_to_cartesian(ra, dec)