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.7, 3.8, 3.9, or 3.10

  • Numpy (tested with version >=1.5.0)

  • 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

For more general discussion, you can write to the healpy mailing list: https://groups.google.com/d/forum/healpy

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

  4. You can also directly support the maintenance and development of healpy via Github Sponsors

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

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

healpy-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

healpy-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

healpy-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

healpy-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

healpy-1.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

healpy-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

healpy-1.16.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.7 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

healpy-1.16.0-cp37-cp37m-macosx_10_9_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

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

File metadata

  • Download URL: healpy-1.16.0.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for healpy-1.16.0.tar.gz
Algorithm Hash digest
SHA256 b13a47d90b1e467a4db6f6e2d24d6de46e140a9bc13f2e98b38fcda80d258e57
MD5 2a386129ccad6469d5a3398d0b920923
BLAKE2b-256 5ffb961501c4bb8379cf3307b4aa7cb4d85ae5c4366ba41ad907e4549104bd9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 059da5853e048b7b3efd8afc66a7c79cecf597034220fddcd56c4def0c0f1728
MD5 90e08d8ce2ebdf033277167c1346a92a
BLAKE2b-256 a34ce7f8acbee818b430c9338a9950e7a5c18fc1785552372f2d92e381ce67ca

See more details on using hashes here.

File details

Details for the file healpy-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.16.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7da3a6f47d23f7a76856eab24dedfecc401515b659fc80768a4cc162cebcef85
MD5 8ea86056e5b91343a1db3b1b79791728
BLAKE2b-256 b6bddc9f39c53241a8e40fa86e54ea9e03e4c71c5bad2b0571ab1d8279c321c3

See more details on using hashes here.

File details

Details for the file healpy-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.16.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e16405e342fb18f75c12629186ab6bd745c02a42092200fc07ef872addee8d61
MD5 6e4123c1b140302a64965c6beb62d26b
BLAKE2b-256 63e18fba96a72cf1e950d234f747f8c6f3c04d74ba863755cc24bc475c962509

See more details on using hashes here.

File details

Details for the file healpy-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.16.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 804b8b7c50c8c4ce9116bcec975f0dc7f97ff0d3ef29fc6d6fa08b1e8108aaca
MD5 daf147e1cb2a74c011beb5b90cf7b91c
BLAKE2b-256 6baa29f9027d5a65112062810a039f6b58c9c406827b295e68e2f3e0173dcc3c

See more details on using hashes here.

File details

Details for the file healpy-1.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.16.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 12a9bdf13cf801fa11dbcc5be8f64436d75bf616562fe2647d898e30929f11da
MD5 4f523652a8f5ee8c8880f0fc2b5d2a13
BLAKE2b-256 24ff94409f408b6b19910dc1a773a354b73ea9264638ca0ba6bd8aeee85b1d92

See more details on using hashes here.

File details

Details for the file healpy-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.16.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3015600060dfb220f72f555297121861ad345b8116feda4366114534820d6172
MD5 ea26f3ecf135ab3496a02a180dc2641d
BLAKE2b-256 afe902aec96fe298571f43622b9a57df892516696ef28c6b262a776b6c6bfee0

See more details on using hashes here.

File details

Details for the file healpy-1.16.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.16.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 35e35f8e914d88c40ed0a05183eb26c7e6dc3bad2d1382d564be01dcadaf9398
MD5 0d6f63ae205361f1ac67b46b6935ce5e
BLAKE2b-256 5f07df2692ba71db45e46cf95207fb3b982d0e6e800bd32f2a46af89a4549e99

See more details on using hashes here.

File details

Details for the file healpy-1.16.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.16.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 8c932067696e9fd69617d81f3349fd41a83a321169f7f52f12d3c5e72c24b268
MD5 05f46cb8c7ddb4a4aeb1676fc1c4806a
BLAKE2b-256 362653061982ca41d9b4f399dc1b3d384a3044336a0d3857c009ef540a492e50

See more details on using hashes here.

Supported by

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