lib.catalog.utils.sky_to_cartesian¶
- lib.catalog.utils.sky_to_cartesian(dist, ra, dec, degree=True, dtype=None)¶
Transform distance, RA, Dec into cartesian coordinates.
- Parameters
dist (array) – Distance.
ra (array) – Right Ascension.
dec (array) – Declination.
degree (default=True) – Whether RA, Dec are in degree (
True) or radian (False).dtype (numpy.dtype, default=None) –
numpy.dtypefor returned array.
- Returns
position – position in cartesian coordinates; of shape (len(dist),3).
- Return type
array