healpy
Healpix tools package for Python
Decision gist · record as of 2026-08-14
Yes, if you work with all-sky or spherical survey data in astrophysics. The package is production-stable, actively maintained, has no security issues, and prebuilt wheels make installation straightforward on supported platforms. The GPL-2.0 copyleft license is standard in academic astronomy but requires review for commercial use. Not suitable for Windows systems.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a C++ compiler and development headers; healpy does not support Windows.
- Python 3.10 or later required.
- Medium friction: prebuilt wheels available for Python 3.10–3.14 on Linux, macOS, and musllinux, but the package bundles HEALPix and cfitsio C++ libraries.
License · maintenance · safety
GPL-2.0-only (copyleft) — GPL-2.0-only copyleft: any derivative work or distribution must also be open-source under GPL-2.0 or compatible terms. Suitable for research and open-source projects; commercial use requires careful licensing review.
last release 2026-07-23 (22 days) · last repo commit 2026-07-27 · 319 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 301,258 downloads/mo, #7,839 on PyPI
Alternatives
Verify before relying
pip install healpy
import healpy as hp
import numpy as np
# Create a simple HEALPix map
nside = 64
m = np.random.randn(hp.nside2npix(nside))
# Convert sky coordinates to pixel indices
pix = hp.ang2pix(nside, theta=1.0, phi=2.0)
# Visualize in Mollweide projection
hp.mollview(m)- Whether matplotlib is a runtime dependency or only required for visualization features
- Whether prebuilt wheels include OpenMP support or if compilation is needed on some systems
- Performance characteristics for large-scale all-sky survey datasets
What it is and what it does
healpy is a Python wrapper around the HEALPix C++ library, designed to work with pixelated data distributed uniformly across the sphere. It was originally developed for Cosmic Microwave Background analysis but is now used across astrophysics for all-sky survey data storage and manipulation. The package provides utilities to convert between sky coordinates and pixel indices, transform between reference frames (Galactic, Ecliptic, Equatorial), read and write FITS-format maps, and compute spherical harmonics transforms using multi-threaded C++ routines.
The package depends on numpy and astropy as runtime dependencies, with optional matplotlib support for visualization. It ships prebuilt wheels for modern Python versions (3.10–3.14) on Linux, macOS, and musllinux, reducing compilation friction for most users. However, it bundles the HEALPix and cfitsio C++ libraries, so installation may require a C++ compiler on some systems. The codebase is actively maintained and carries no known security vulnerabilities.
Use it for
- Analyze Cosmic Microwave Background maps from experiments like WMAP or Planck by converting sky coordinates to HEALPix indices and computing power spectra.
- Process all-sky survey data (e.g., radio, infrared, X-ray) by upgrading/downgrading map resolution and applying coordinate transformations.
- Visualize spherical data in multiple projections (Mollweide, Gnomonic, Cartographic) for publication-ready figures.
- Transform maps between spherical harmonics space and pixel space for efficient filtering or statistical analysis.
- Find pixels within arbitrary sky regions (disks, polygons, strips) for targeted data extraction from large surveys.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work with all-sky or spherical survey data in astrophysics.
The package is production-stable, actively maintained, has no security issues, and prebuilt wheels make installation straightforward on supported platforms. The GPL-2.0 copyleft license is standard in academic astronomy but requires review for commercial use. Not suitable for Windows systems.
Install
healpy on PyPI
Before you install
Medium friction: prebuilt wheels available for Python 3.10–3.14 on Linux, macOS, and musllinux, but the package bundles HEALPix and cfitsio C++ libraries. Active maintenance (latest release 22 days old, last commit 2026-07-27) and no known vulnerabilities.
Requires a C++ compiler and development headers; healpy does not support Windows. Python 3.10 or later required.
License in practice
GPL-2.0-only copyleft: any derivative work or distribution must also be open-source under GPL-2.0 or compatible terms. Suitable for research and open-source projects; commercial use requires careful licensing review.
Quickstart
pip install healpy
import healpy as hp
import numpy as np
# Create a simple HEALPix map
nside = 64
m = np.random.randn(hp.nside2npix(nside))
# Convert sky coordinates to pixel indices
pix = hp.ang2pix(nside, theta=1.0, phi=2.0)
# Visualize in Mollweide projection
hp.mollview(m)
Verify before relying
- Whether matplotlib is a runtime dependency or only required for visualization features
- Whether prebuilt wheels include OpenMP support or if compilation is needed on some systems
- Performance characteristics for large-scale all-sky survey datasets
Package facts
| License | GPL-2.0-only copyleft |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 2 packagesnumpyastropy |
| Maintenance | Actively maintained 22 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 301,258 / month, #7,839 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: Science/ResearchOperating System :: POSIXProgramming Language :: C++Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: AstronomyTopic :: Scientific/Engineering :: Visualization |
Evidence: healpy-1.20.0-cp310-cp310-macosx_13_0_x86_64.whl; healpy-1.20.0-cp310-cp310-macosx_14_0_arm64.whl; healpy-1.20.0-cp310-cp310-macosx_15_0_arm64.whl; healpy-1.20.0-cp310-cp310-manylinux_2_28_aarch64.whl; healpy-1.20.0-cp310-cp310-manylinux_2_28_x86_64.whl; healpy-1.20.0-cp310-cp310-musllinux_1_2_aarch64.whl; healpy-1.20.0-cp310-cp310-musllinux_1_2_x86_64.whl; healpy-1.20.0-cp311-cp311-macosx_13_0_x86_64.whl; healpy-1.20.0-cp311-cp311-macosx_14_0_arm64.whl; healpy-1.20.0-cp311-cp311-macosx_15_0_arm64.whl; healpy-1.20.0-cp311-cp311-manylinux_2_28_aarch64.whl; healpy-1.20.0-cp311-cp311-manylinux_2_28_x86_64.whl; healpy-1.20.0-cp311-cp311-musllinux_1_2_aarch64.whl; healpy-1.20.0-cp311-cp311-musllinux_1_2_x86_64.whl; healpy-1.20.0-cp312-cp312-macosx_13_0_x86_64.whl; healpy-1.20.0-cp312-cp312-macosx_14_0_arm64.whl; healpy-1.20.0-cp312-cp312-macosx_15_0_arm64.whl; healpy-1.20.0-cp312-cp312-manylinux_2_28_aarch64.whl; healpy-1.20.0-cp312-cp312-manylinux_2_28_x86_64.whl; healpy-1.20.0-cp312-cp312-musllinux_1_2_aarch64.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “healpix pixelation sphere”
- healpyhealpy wraps the HEALPix C++ library to handle pixelated data on the…
- astropy-healpixProvides HEALPix spherical pixelization for astronomy and…
- reprojectReproject astronomical images between different world coordinate…
Give your agent the search over MCP, or paste the wish link into any chat.
More Visualization packages
matplotlib creates static, animated, and interactive visualizations in Python, producing publication-quality figures in multiple formats for scripts, shells, web servers, and graphical interfaces.
Install it if you need to visualize data, generate publication-quality figures, or embed plots in applications.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
Plotly is an interactive, browser-based graphing library that creates charts and visualizations from Python, rendering them as HTML that can be viewed in Jupyter notebooks, standalone files, or web applications.
Generates DOT language source code for graph structures and renders them using the Graphviz graph drawing software installed on your system.
Install it if you need to generate or render graphs from Python.
Streamlit transforms Python scripts into interactive web applications with minimal code, enabling rapid development of data dashboards, reports, and chat interfaces without requiring web development expertise.
Leather is a lightweight Python charting library for quick, no-frills data visualization. It generates charts without requiring perfect styling or extensive configuration.
See also astropy-healpix · reproject · regions · gwcs · spatial_image · Cartopy · leafmap · PyAVM