lib.catalog.utils.cartesian_to_sky

lib.catalog.utils.cartesian_to_sky(position, wrap=True, degree=True)

Transform cartesian coordinates into distance, RA, Dec.

Parameters
  • position (array of shape (N,3)) – Position in cartesian coordinates.

  • wrap (bool, default=True) – Whether to wrap RA in \([0, 2 \pi]\).

  • degree (bool, default=True) – Whether RA, Dec are in degree (True) or radian (False).

Returns

  • dist (array) – Distance.

  • ra (array) – Right Ascension.

  • dec (array) – Declination.