--- id: healpy version: "1.20.0" license: GPL-2.0-only license_treatment: copyleft maintenance: active --- # healpy — Healpix tools package for Python License: copyleft · Maintenance: active · Downloads: 301.3K/mo ## 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 above — verify before relying. healpy wraps the HEALPix C++ library to handle pixelated data on the sphere, enabling coordinate conversions, map transformations, spherical harmonics analysis, and visualization of all-sky survey data. 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 pip install healpy uv add healpy poetry add healpy ## Installing healpy 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. 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) Requires a C++ compiler and development headers; healpy does not support Windows. Python 3.10 or later required. 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_current - Install friction: medium - Maintenance: active - Downloads: 301.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags healpix pixelation sphere, cosmic microwave background analysis, all-sky survey data processing, spherical harmonics transform, sky coordinate pixelation, mollweide map projection, healpix nested ring scheme, astronomy, spherical-data, healpix [View on SkillFed](https://skillfed.io/packages/healpy) · [View on PyPI](https://pypi.org/project/healpy/)