Skip to main content

Healpix tools package for Python

Project description

https://badge.fury.io/py/healpy.svg https://anaconda.org/conda-forge/healpy/badges/version.svg https://github.com/healpy/healpy/actions/workflows/cibuildwheel.yml/badge.svg Documentation Status https://mybinder.org/badge_logo.svg https://zenodo.org/badge/DOI/10.5281/zenodo.2605425.svg http://joss.theoj.org/papers/10.21105/joss.01298/status.svg

Description

healpy is a Python package to handle pixelated data on the sphere. It is based on the Hierarchical Equal Area isoLatitude Pixelization (HEALPix) scheme and bundles the HEALPix C++ library.

HEALPix was developed to efficiently process Cosmic Microwave Background data from Cosmology experiments like BOOMERANG and WMAP but it is now used in other branches of Astrophysics to store data from all-sky surveys. The target audience used to be primarily the Cosmology scientific community but currently anyone interested in handling pixelated data on the sphere is very welcome to propose new features.

For an introduction to HEALPix and healpy, see Methods for CMB map analysis.

Capabilities

healpy provides utilities to:

  • convert between sky coordinates and pixel indices in HEALPix nested and ring schemes

  • find pixels within a disk, a polygon or a strip in the sky

  • apply coordinate transformations between Galactic, Ecliptic and Equatorial reference frames

  • apply custom rotations either to vectors or full maps

  • read and write HEALPix maps to disk in FITS format

  • upgrade and downgrade the resolution of existing HEALPix maps

  • visualize maps in Mollweide, Gnomonic and Cartographic projections

  • transform maps to Spherical Harmonics space and back using multi-threaded C++ routines

  • compute Auto and Cross Power Spectra from maps and create map realizations from spectra

The documentation can be found at https://healpy.readthedocs.io, tutorial at https://healpy.readthedocs.io/en/latest/tutorial.html, or execute it on mybinder

Requirements

  • Python 3.10, 3.11, or 3.12

  • Numpy (tested with version >=1.19)

  • Matplotlib

  • Python development package is required for some distribution (e.g., python-dev package for Ubuntu)

  • Astropy

Quick installation with Pip

The quickest way to install Healpy is with pip (>= 1.4.2), which automatically fetches the latest version of Healpy and any missing dependencies:

pip install --user healpy

If you have installed with pip, you can keep your installation up to date by upgrading from time to time:

pip install --user --upgrade healpy

See INSTALL.rst for further details and other installation options.

Optional

Healpy depends on the HEALPix C++ and cfitsio C libraries. Source code is include with Healpy and you do not have to install them separately.

However, if you have them installed already, Healpy should detect and reuse them instead of building them from source. To use your own installations of HEALPix and cfitsio, you will also need:

See INSTALL.rst for further instructions.

Known issues

  • Building with OpenMP support: the underlying HEALPix C++ library can be built to use OpenMP to speed up some operations on systems with multiple cores. Most, but not all, modern C/C++ compilers support OpenMP, the notable exception being clang.

    If your Healpy build fails with an error message about being unable to link against -lgomp, then this typically means that Healpy detected an already-installed HEALPix C++ library that was built with OpenMP support, but you are trying to build Healpy with a compiler that does not support OpenMP. Try cleaning the build with python setup.py clean –all, and set the environment variables CC and CXX to point to an OpenMP-capable compiler, such as gcc/g++.

  • Healpy does not currently support Windows. See https://github.com/healpy/healpy/issues/25.

  • Incompatibility with cfitisio from HEASOFT: due to a conflict of header file names it is currently not possible to use the cfitsio library provided with the HEASOFT package for compilation of HEALPix C++. HEASOFT’s include directory contains a file called “rotmatrix.h” which clashes with HEALPix’s own rotmatrix.h.

  • Compilation problems in the C++ package: some gcc versions (we have reports for 4.4.5 and 4.4.6) crash with an internal compiler error during compilation of libsharp. Unfortunately we have not found a workaround for this compiler problem. To our knowledge, it has been fixed in gcc 4.4.7 and in the 4.5.x and newer versions.

  • Healpy pixel functions, e.g. ang2pix, do not support 32-bit platforms. See https://github.com/healpy/healpy/issues/194.

Support

For specific HOWTO questions please create a question on StackOverflow and tag it with the healpy tag, so that answers will be easily searchable on google.

If you think you found a bug or you have install issues, open an issue on GitHub: https://github.com/healpy/healpy/issues

Contribute

Project development takes place on github, http://github.com/healpy/healpy, please open an issue over there for reporting bugs or suggest improvements. Collaboration is very welcome, just fork the project on github and send pull requests back to the main repository.

Developers

Core developers:

  • Cyrille Rosset

  • Andrea Zonca

  • Martin Reinecke

  • Leo Singer

  • Daniel Lenz

List of contributors: https://github.com/healpy/healpy/graphs/contributors

Acknowledgements

  1. Cite the HEALPix and healpy papers, see the CITATION file in the repository.

  2. Add an acknowledgment statement: “Some of the results in this paper have been derived using the healpy and HEALPix packages”.

  3. at the first use of the HEALPix acronym, a footnote placed in the main body of the paper referring to the HEALPix web site, currently http://healpix.sf.net

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

healpy-1.18.1.tar.gz (4.8 MB view details)

Uploaded Source

Built Distributions

healpy-1.18.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.8 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ x86-64

healpy-1.18.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.7 MB view details)

Uploaded CPython 3.13 manylinux: glibc 2.17+ ARM64

healpy-1.18.1-cp313-cp313-macosx_14_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.13 macOS 14.0+ ARM64

healpy-1.18.1-cp313-cp313-macosx_13_0_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.13 macOS 13.0+ x86-64

healpy-1.18.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

healpy-1.18.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.7 MB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ ARM64

healpy-1.18.1-cp312-cp312-macosx_14_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

healpy-1.18.1-cp312-cp312-macosx_13_0_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.12 macOS 13.0+ x86-64

healpy-1.18.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

healpy-1.18.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.7 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

healpy-1.18.1-cp311-cp311-macosx_14_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

healpy-1.18.1-cp311-cp311-macosx_13_0_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.11 macOS 13.0+ x86-64

healpy-1.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

healpy-1.18.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

healpy-1.18.1-cp310-cp310-macosx_14_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

healpy-1.18.1-cp310-cp310-macosx_13_0_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.10 macOS 13.0+ x86-64

File details

Details for the file healpy-1.18.1.tar.gz.

File metadata

  • Download URL: healpy-1.18.1.tar.gz
  • Upload date:
  • Size: 4.8 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for healpy-1.18.1.tar.gz
Algorithm Hash digest
SHA256 ce59ebf3266fb32225e3f7531c3ca40b41d31954ca7b930a6766cc027ed7ebec
MD5 e29dbb0b8ed5318dc415b954effc2ea8
BLAKE2b-256 a4db4d1e7fcd429151edb1e2c6d10365f86de217097e276c0b44dbc197028d21

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6f8f2b0a0e812109fafced5e7033d4cbd4dff1a50a0d5c55e8fc5ccc75b5bdd9
MD5 8146ed5306c4730952b35d31f03bc8d9
BLAKE2b-256 4a72d47179dc45eeb703d96e2d2cea4fd52d823d91223a4334f5af7d4ecb57e9

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 78e74f7bcdad267e1466c7f2ed1992d647713ada175cc5deed6a106d0188d46c
MD5 b646865b8d129106aacbd7485ceaa34c
BLAKE2b-256 e889c3788db2829dd0b66ca7a4150c8dbcf4fbac7fc5adca7a4ae6345df4e018

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp313-cp313-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 7804503860711d891da1142e4ebdbb9973b2cd1df333592c7a707841d7b71d74
MD5 0c1bd7dda42c2a631f3e1f8e81057f5c
BLAKE2b-256 e68ae132f462d4dffdf0598cd1ad2e22576e0dd0bc4c6d18ebae56b0fa27dd79

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp313-cp313-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 f79a766cc9461cf202ecd3b1f4a513b69d07e20f3e4426d2896688d477d8a490
MD5 fbdf71e7f2765f66b9e5e90d2807e0cc
BLAKE2b-256 6c743d1662076c635c89991e4c44ba12e740ba08c6533a92fe6e7c34cd05edc1

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 727adca5f7d480d7a1fbabf159345f1d2bb2240ffcd560dff9de531a878208cc
MD5 ae3889d34d67dfb6011f252486f63146
BLAKE2b-256 21f1f342a9acefa1e02289c2f320cbc247f03cb42af88258b7fb4cd01b2e2f5d

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1badc6dec6ac088c83f3f0d7be9551776cdbea423eb79c54d56160592b491e2e
MD5 1faecfbc58f1ffc6ffc85155a715dcfe
BLAKE2b-256 77575db442a1df9dfcc430739e7bb50de40430942c281df6ebcf1f5f3fbe4853

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 1823e18b80ceda8f87b107bdf78213d1b423780ef64c79730bbd32118e2486ba
MD5 ee24fc4ddfed15e19de2424f07c96663
BLAKE2b-256 76c6fd4d013e28346f27b8ffbb49d3d1a55b726d0ce25f386644740fba29c9e9

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp312-cp312-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 d0ee535c75bb4ea4a256349cc7c1b67853c98e1a3ca08910bab75c650c42c909
MD5 c83a78a03ff049af93748b1944c14255
BLAKE2b-256 e91acb3244453f72d90da57e0f8cf9bf545d8fc9eba3b599a087df731b7aed1b

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2c384ece4390ee7e21b67335da384895841dbc0d3317eb43c9d096d28cb99690
MD5 4ac5f2cc1753beea4ae5738c872eea94
BLAKE2b-256 775ac5002a9eb7a5f8376540b5de39135afdca94dd0a2bdc42bcfaee53dd3ac0

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e56f3ed16ea40f791bc2d2b6f9011e7bcc595356b099b4f4ffacda637280914f
MD5 9c357cda945531aac0cf5685da6dfd23
BLAKE2b-256 bb90b54a9dd62b268221351b874a560d6a908504a70bb85451b69e938e110471

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a14350ff1024b5c15402b8c0c046d614be86062c302ca5cd99825a87dc05d165
MD5 a6c45b7b48a36005d8ca199b389a3df4
BLAKE2b-256 a714a9546f7e7919411d517936aa3e7c8b2dba6061e36f363f240d89cc1c5e16

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp311-cp311-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 7a082509853458d14abb0434323af6a79d0b54e6047a297c2e37ece981ff5f1f
MD5 e5a5f2ee7aab71d4b1a88bd427f046ae
BLAKE2b-256 3da38e53a52618b60fe8cca1a1115d18ec8fb24b4e610a5e471ba5868df21eed

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 87de343f7ffce4570e29dccc9f5bb465ba30ac9e826f7b2c54689630f749c8cf
MD5 1fb37bd16e9966b82299f60c04244d3a
BLAKE2b-256 c81881101c0a20f8eadf06de64e984223f285efaeeae364362aa43b2b2180033

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ca103c8cf16305750135820e53e32c009479d8216baaeffc7f68faed87b5f324
MD5 161dd4856347045562b9357fe6910f4e
BLAKE2b-256 348f9aa168abc9c0e3eaa4f3370ec34bd3c741b6a0a302effe52097cf379bd50

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 ddf62d19e8642c180c829443093170846ab94045014810d69d70b9c1f2058e9b
MD5 b59b7a45f87a6f392a3c3abd34079734
BLAKE2b-256 53d0d9d6cd781bf1c93891c1257a7d3b3199f4ff92a16591ffcfcddaddfd4ed6

See more details on using hashes here.

File details

Details for the file healpy-1.18.1-cp310-cp310-macosx_13_0_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.18.1-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 4821fca8c6ce6b5db41958b873275f21a367c234c69df488312dcca918e24e09
MD5 077cb919ed7fd3050251abf5d183fa43
BLAKE2b-256 8789841b2d99e9ac3b79545a127cc28120cc2d91fa29e02c7c121776ad09057e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page