coord2healpix

Contents

coord2healpix#

gaiaunlimited.utils.coord2healpix(coords, frame, nside, nest=True)#

Calculate HEALPix indices from an astropy SkyCoord. Assume the HEALPix system is defined on the coordinate frame frame.

Parameters:
  • coords (astropy.coordinates.BaseCoordinateFrame) – The input coordinates. This can be SkyCoord for any other specific frame instance that can be converted to a SkyCoord.

  • frame (str) – The frame in which the HEALPix system is defined. Should be a valid name from astropy.coordinates.

  • nside (int) – The HEALPix nside parameter to use. Must be a power of 2.

  • nest (bool) – True if the HEALPix uses nested scheme.

Returns:

An array of pixel indices with the same shape as the input coords.

Raises:

ValueError – The specified frame is not supported.