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.15.1.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.15.1-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.15.1-cp310-cp310-macosx_10_9_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

healpy-1.15.1-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.15.1-cp39-cp39-macosx_10_9_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

healpy-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

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

Uploaded CPython 3.8macOS 10.9+ x86-64

healpy-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.6 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

healpy-1.15.1-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.15.1.tar.gz.

File metadata

  • Download URL: healpy-1.15.1.tar.gz
  • Upload date:
  • Size: 4.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for healpy-1.15.1.tar.gz
Algorithm Hash digest
SHA256 35de2b9e16189d31da34fadf9608d2a59d73ae5301ffdb6b4f99282bad4cb05f
MD5 d677ca493bd7694850028ce559443e9e
BLAKE2b-256 ec758e8e546ef8f173555ce097ba98487a510f6a56764ed28ea3e6d11ad684cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 47667b2c3dfe392632d9aa6059f7c7a75275930d0a4387886c10f532b4f3bb83
MD5 9492ba719469f11c6e50f6978201941a
BLAKE2b-256 04cd4d91244ad8888eacefb15f58b43f0f608dc1e5d3a8b701b76af9f5064f79

See more details on using hashes here.

File details

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

File metadata

  • Download URL: healpy-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.10, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for healpy-1.15.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3e7cbf9289dceb3e1daede9856668c06cfdf47c22611788465a075fe6f5cc687
MD5 f33b1be8477dd821c46b26d96f330220
BLAKE2b-256 4e1638fa90de51b213fc2c89a405ff624626b5a111cb0131b3046c68c23e3777

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4da5d096a292cf742d71c7b4d7226566b3bc31848d66be566a04df122e48ab6a
MD5 3bb0121489545c2a62d6579f6705bfa3
BLAKE2b-256 2ac0e4386bab755deeb03266aeacc6a461bb37b633ec8f4c499940f0601d8701

See more details on using hashes here.

File details

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

File metadata

  • Download URL: healpy-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for healpy-1.15.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 bdbee01a04a33d791c0adcdece446a8e65654654b9212bcdc043ab2730eaea2c
MD5 24fd3078f3f40ff074ba64fbefd078cf
BLAKE2b-256 20fbcb9d522b1b352fd10ad1e391cd7e49ddc1895f6f1cd05b31c1254f4ea3f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3e2bbbc365cfc7921daf687df2b551fdfe87089c570b0cb838610e1508c915e4
MD5 1e96292cd0ce194c7d722c41ab6172a9
BLAKE2b-256 819a379af39890cdf6e8a17fe9d519c674945bd9a577e9e6bef6eb3a726063a3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: healpy-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for healpy-1.15.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e17047869cfee8bc1769a9af81f30079ef99512082b54eb5da6b629060cdf429
MD5 21e0a5888bc01a61f78220af11b3e97f
BLAKE2b-256 0add5d03cf208e09834d01906c518715bd1c7807f9b8f8c7aad8ca7b15b559a5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.15.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 db69a7ada847199c4da157ff96bf8df9c11a8cdfc627d379ca163d5aa19ccf12
MD5 d62df36883111729dac8b4c8383d08a5
BLAKE2b-256 5fc64138020a4a4167018d573e6d9198ac1f37033854612b08313ba0683ae556

See more details on using hashes here.

File details

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

File metadata

  • Download URL: healpy-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 7.0 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for healpy-1.15.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b994ac3455ddd25ff8c2614a07c8a87202619c4c03caec96761a882fa58b1b2c
MD5 c950751fec44d8c226ab25f97a4ce078
BLAKE2b-256 64538c41c3a33caaa62b4ffef87324ea43f471b757ca9779aeba349ccf876e99

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