astropy-healpix
BSD-licensed HEALPix for Astropy
What it is and what it does
astropy-healpix is a Python implementation of the HEALPix (Hierarchical Equal Area isoLatitude Pixelization) algorithm, a standard method in astronomy for dividing the celestial sphere into equal-area pixels. It wraps optimized C code originally written for astrometry.net and is maintained as part of the Astropy project. The package enables efficient spatial indexing, coordinate transformations, and all-sky data binning—essential operations for survey astronomy, cosmology, and large-scale sky analysis.
The package depends on numpy for array operations and astropy for coordinate handling. It provides compiled wheels for modern Python versions (3.10+) across macOS, Linux, and Windows platforms, reducing installation friction. With active maintenance and no known security vulnerabilities, it integrates directly into the Astropy ecosystem for researchers and developers working with celestial coordinate systems and large-scale astronomical datasets.
Use it for:
- Bin all-sky survey data into equal-area pixels for efficient spatial analysis and visualization
- Index and query celestial coordinates using HEALPix hierarchical structure for fast neighbor searches
- Convert between celestial coordinates and HEALPix pixel indices in large astronomical catalogs
- Generate all-sky maps and perform spherical harmonic analysis on pixelated sky data
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides HEALPix spherical pixelization for astronomy and astrophysics applications, enabling efficient spatial indexing and coordinate operations on the celestial sphere.
Yes. Active maintenance, permissive BSD license, no security vulnerabilities, and pre-built wheels for modern Python versions make this a low-friction choice. Install it if you work with all-sky surveys, need efficient spherical pixelization, or are building within the Astropy ecosystem. The medium compile-time friction is offset by wheel availability and the package's role as a standard tool in observational astronomy.
Install
astropy-healpix on PyPI
pip
pip install astropy-healpixuv
uv add astropy-healpixpoetry
poetry add astropy-healpixInstalling astropy-healpix
Before you install
Medium install friction due to compiled C and Cython components, but well-supported across modern Python versions (3.10+) and major platforms with pre-built wheels. Actively maintained by the Astropy project with recent releases.
License in practice
BSD 3-Clause permissive license allows commercial and private use with minimal restrictions; you must retain copyright and license notices in distributions.
Quickstart
pip install astropy-healpix
import astropy_healpix
import numpy as np
# Basic HEALPix operations with numpy arrays and astropy coordinates
Requires Python 3.10 or later; compiled C/Cython components require a C compiler at build time if wheels are unavailable.
Verify before relying
- Specific HEALPix resolution levels and performance characteristics for large-scale sky surveys
- Integration patterns with other Astropy ecosystem packages beyond numpy and astropy
Package facts
| License | BSD 3-Clause (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 2 — numpy, astropy |
| Maintenance | actively maintained — 25 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 274,428/month — #8,191 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: astropy_healpix-2.0.1-cp310-abi3-macosx_10_9_x86_64.whl; astropy_healpix-2.0.1-cp310-abi3-macosx_11_0_arm64.whl; astropy_healpix-2.0.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; astropy_healpix-2.0.1-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; astropy_healpix-2.0.1-cp310-abi3-musllinux_1_2_x86_64.whl; astropy_healpix-2.0.1-cp310-abi3-win_amd64.whl; astropy_healpix-2.0.1-cp314-cp314t-macosx_10_15_x86_64.whl; astropy_healpix-2.0.1-cp314-cp314t-macosx_11_0_arm64.whl; astropy_healpix-2.0.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; astropy_healpix-2.0.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; astropy_healpix-2.0.1-cp314-cp314t-musllinux_1_2_x86_64.whl; astropy_healpix-2.0.1-cp314-cp314t-win_amd64.whl
Keywords: astronomy, astrophysics, astropy, healpix, coordinates
Tags
More Physics packages
NetworkX provides data structures and…
permissive · top 1,000 on PyPI
sympySymPy is a Python library for symbolic…
permissive · top 1,000 on PyPI
pydicomPydicom reads, modifies, and writes DICOM…
permissive · top 5,000 on PyPI
albumentationsAlbumentations applies image transformations to…
permissive · top 5,000 on PyPI
CoolPropCoolProp provides thermodynamic and transport…
permissive · top 5,000 on PyPI
pyquaternionProvides quaternion representation,…
permissive · top 5,000 on PyPI
healpyhealpy wraps the HEALPix C++ library to handle…
copyleft · top 15,000 on PyPI
regionsRegions provides tools for defining,…
permissive · top 15,000 on PyPI
reprojectReproject astronomical images between different…
permissive · top 15,000 on PyPI
gwcsGWCS provides tools for managing World…
unclear · top 15,000 on PyPI
astropy-iers-dataProvides IERS Earth Rotation and Leap Second…
permissive · top 5,000 on PyPI
asdf-astropyProvides ASDF serialization plugins for astropy…
unclear · top 15,000 on PyPI
photutilsPhotutils provides tools for detecting and…
permissive · top 15,000 on PyPI
astroqueryAstroquery provides a Python interface to query…
permissive · top 15,000 on PyPI
PyAVMPyAVM reads, writes, and embeds Astronomy…
permissive · top 15,000 on PyPI
pyvoPyVO provides Python access to Virtual…
permissive · top 15,000 on PyPI