Adding this possibility will allow the user to be able to use the nested argument. Furthermore, give the healpix numbering scheme of Gaia, nested should be the default argument.
def get_healpix_centers(order):
"""Get centers of HEALPix as astropy coordinates.
Args:
order (int): The order of the pixelisation
Returns:
astropy.coordinates.SkyCoord: coordinates of the centers.
"""
nside = hp.order2nside(order)
npix = hp.order2npix(order)
ipix = np.arange(npix)
ra, dec = hp.pix2ang(nside, ipix, lonlat=True)
return coord.SkyCoord(ra * u.deg, dec * u.deg)
The function get_healpix_centers now takes an optional nest argument. It still defaults to False, which is the behaviour of hp.pix2ang. (commit 2950c2d)
Adding this possibility will allow the user to be able to use the nested argument. Furthermore, give the healpix numbering scheme of Gaia, nested should be the default argument.
def get_healpix_centers(order): """Get centers of HEALPix as astropy coordinates.