cdshealpix.nested.xy_to_lonlat

cdshealpix.nested.xy_to_lonlat(x, y, num_threads=0)

Project coordinates from the HEALPix space to the sky coordinate space.

Parameters:
xnumpy.ndarray

Position on the X axis of the HEALPix plane, \(x \in [0, 8[\)

ynumpy.ndarray

Position on the Y axis of the HEALPix plane, \(y \in [-2, 2]\)

num_threadsint, optional

Specifies the number of threads to use for the computation. Default to 0 means it will choose the number of threads based on the RAYON_NUM_THREADS environment variable (if set), or the number of logical CPUs (otherwise)

Returns:
(lon, lat)(astropy.coordinates.Longitude, astropy.coordinates.Latitude)

The coordinates on the sky

Examples

>>> from cdshealpix import xy_to_lonlat
>>> import astropy.units as u
>>> import numpy as np
>>> x = np.array([0.5, 1.5])
>>> y = np.array([0.5, 0.5])
>>> lon, lat = xy_to_lonlat(x, y)