skillfed

astropy-healpix

BSD-licensed HEALPix for Astropy

astropy-healpix v2.0.1 274.4K downloads/30d#8,191 on PyPI62
Permissive license BSD 3-Clause Active released

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-healpix

uv

uv add astropy-healpix

poetry

poetry add astropy-healpix

Installing 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

Intended Audience :: Science/ResearchOperating System :: OS IndependentProgramming Language :: CProgramming Language :: CythonProgramming Language :: Python :: 3Programming Language :: Python :: Implementation :: CPythonTopic :: Scientific/Engineering :: AstronomyTopic :: Scientific/Engineering :: Physics

Tags

healpix spherical pixelizationcelestial sphere coordinate indexingastronomy spatial binninghealpix python astronomyall-sky survey pixelation
astronomyspatial-indexingcoordinates

More Physics packages