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.

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.0.tar.gz (4.8 MB view details)

Uploaded Source

Built Distributions

healpy-1.18.0-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.0-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.0-cp313-cp313-macosx_14_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.13 macOS 14.0+ ARM64

healpy-1.18.0-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.0-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.0-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.0-cp312-cp312-macosx_14_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

healpy-1.18.0-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.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.8 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

healpy-1.18.0-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.0-cp311-cp311-macosx_14_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

healpy-1.18.0-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.0-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.0-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.0-cp310-cp310-macosx_14_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.10 macOS 14.0+ ARM64

healpy-1.18.0-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.0.tar.gz.

File metadata

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

File hashes

Hashes for healpy-1.18.0.tar.gz
Algorithm Hash digest
SHA256 6a12fd8f804c8a6d193dc43d1dcdf636808830e1ccc0aa7c53d83e394bb15289
MD5 7ab4d77330bf48e4b0f51e5b8a81c06e
BLAKE2b-256 7fd2239fb1bd8b75049bae1a64152d22108400fa4aba06859f3199935646c36f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2ac2d27084c0dfebe1a6a5fdbdfe0d209ac3186aca013da75fc4408909408692
MD5 5c9291f83a43c2406315d30add480eb1
BLAKE2b-256 d274fa54bb7d69d6edfde8eea555b6521a0a5cec9519bacebe41900ce9032a99

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 70bceca47af30db487add238d64f940381f5bc2e08d0a87c727a5202dea96ce4
MD5 8aaf8b99b5032938bb320af4efa876d8
BLAKE2b-256 f624590aeb2b7dc6858bf7171e757d709921feba38ae14dfea41a931e55ab081

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp313-cp313-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 31d6eab426a5a97655934a45b5b8954dad4a4a66d48e8185994cc57fa81d2791
MD5 68d9a3582015730ab8a89c593b5d539e
BLAKE2b-256 9f0d37ea46c22094f8acfc274cfce3f1793a5388de4f2684db7040e2dd7d9bfb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp313-cp313-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 e84a9d176c31796b4730d6486368ec5a6aeea17faab0219e3b2cb5978a053478
MD5 605f5a0d9883058bf032bc4216527ee9
BLAKE2b-256 7fa21dc1c0ba84578e9c89ab4df75f7e8c1000f53a6f303fca7dfa4512a00c35

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f2934319dd4c9a6bf9a7e8ed0df6d609ae6ba7af1c57d167a5db77b78592bb5c
MD5 3d5008c286190b46b83347c0cf43ac05
BLAKE2b-256 0492989ce55bdb99d09ec40199830984e7746c17362a6637733c75bac6675453

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7f55884283d244311ec0f1e0c8aefc31f23db8087cd2c41fd76f31daf42ed9ba
MD5 85de3d6966ad4e2a5c7cd7f03e94daaa
BLAKE2b-256 16d71c95dde283bffdfbcd4531c245e96b7aeb873b8d49c981e317af5b656420

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 52107cf2e7f664cf589ef7fdf41b90d458f30a1a544f6db45a7ac2f5d44a2967
MD5 35c5d89153232052b03482298512d716
BLAKE2b-256 529f4228f98e904ac27b259c782ffb592dc5490520536903e099c324e135ecff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp312-cp312-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 1b7e4d2c0bee7872fb060c2f669784adf26fb0fffa92c2388f88cd854b2a7e43
MD5 24619f201be2da932e2c0d82a9afefcf
BLAKE2b-256 a68f6a54ef3a7328e76d1b6c83305519e381cf37aeed16dd96633c34682eb42a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 eb64b5141784f347c338833e1319bd9f3a2c0637b4e8102a9fec444bfc3b1d1b
MD5 c7533a920cee2f7ae1ff8341ea0075ca
BLAKE2b-256 1c7687a16420213b2b8a65bee33aeff04bc09eb58c6b99a73db7a0ea12b5938c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b8a61092e9242fae9a8980325d7d27283247031df7d9eda6471f21cc7d21ca21
MD5 3cb33058d37ab998374824f6381f8215
BLAKE2b-256 ac7973b015e19082df9e6a499efdecd12b2a2a58c7bbdc57dc1c26f8ccad9425

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 a90a3654a76d20008e35ae56c1f65e5202f5ae7a2ef14d3e61847be3c5112503
MD5 96b3a7fb9b505beac3a62bd3e5d7fbe4
BLAKE2b-256 7d720610216519ec14045d0d5a7a18f0d1fa20f51598844f37647d91ae656d61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp311-cp311-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 60af92bee79a10634be7733a14eba7dda218c8827913388fa268b8f4bb1f84b6
MD5 e1e2a9e604c2cf6806bab9ffb9927a57
BLAKE2b-256 b7d7b8c2ff7d918bc1a81e78747867d3a68b34a6bf55be073676296854efd93f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c3f39961f7101776f859ba8661f7097db5d01af1854bf3c3c00a3920eacc3a9a
MD5 f9f311aadca9adb46efc4def3a936ab2
BLAKE2b-256 dc49b3d627c93fefc982fcce7f4ac75cc4032739dada8a586d517c4ffea6b758

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b99d28f69391d1aa836692f865075dd6f8f5c0a476103153763c73fe607193d2
MD5 582f209b9a8269286ede1c4a3f060de9
BLAKE2b-256 af1fccd194c3df789c3d2f072c2c8d47537757573e612e823da6cee59ff7c21e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 ae10f09ed666fa09f2db5b869bf32601cc6203ee2e16edfaac7d0b4412243bdb
MD5 d90895fef264264326c280cb3b2f464c
BLAKE2b-256 de5d4c97e2c60a3bcd6ab6fe26c1bb18f764e1562391dc214a9313604c94b104

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.18.0-cp310-cp310-macosx_13_0_x86_64.whl
Algorithm Hash digest
SHA256 ed318fc2f4f4ee738eaff8a414805e928960b51201f10aa8581bd40bd4d4404f
MD5 add01563b0d4dbd74bcf3622f505b03c
BLAKE2b-256 dee26af0cd97a5be6e57f45b8da1b4a49e2904978778afebc7fc58c3360753dd

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 Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page