A Go-lang implementation of the HEALPix projection and pixelization of a sphere. This package is early stage and not yet recommended for integration. However, features incorporated into the master branch generally have good test coverage.
The HEALPix pixelization is 'equal-area' for each pixel: a pixel at the equator of the sphere contains the same resolution of data as a pixel at the poles (unlike many pixelizations based on more common projections). The resolution increments as a scaled, squared power of 2, and this package supports spheres divided into up to 12*((2^29)^2) pixels, i.e. 29 different levels of resolution.
HEALPix supports two basic pixel numbering schemes:
- Nested - useful for efficient querying of nearest neighbors for individual pixels
- Ring - useful for efficient spherical harmonic computations
A third numbering scheme, Nested Unique, allows for the selection of pixels at different scales of resolution, allowing for 'sparse' HEALPix queries and data set representations in addition to the default 'dense' representation.
- - Querying nearest neighbors
- - Support 'Nested Unique' pixel numbering (for multiresolution)
- - Support Cartesian 3-vector 'positions'
- - Querying discs
- - Querying polygons
- - Multiresolution pixel range sets
The following prior works were studied carefully to aid the implementation of this package.
Gorski, et al. "HEALPix: A Framework for High-Resolution Discretization and Fast Analysis of Data Distributed on the Sphere" The Astrophysical Journal, 622:759–771, 2005 April 1. Link
I. Martinez-Castellanos, et al. "Multiresolution HEALPix Maps for Multiwavelength and Multimessenger Astronomy" The Astronomical Journal, vol. 63, no. 6, 2022 May 11. Link
Reinecke & Hivon. "Efficient data structures for masks on 2D grids" Astronomy and Astrophysics, vol. 580, 2015 August 19. Link