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

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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

healpy-1.16.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (24.6 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

healpy-1.16.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (23.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

healpy-1.16.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (24.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

healpy-1.16.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (23.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

healpy-1.16.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (24.5 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

healpy-1.16.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (23.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

healpy-1.16.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (24.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

healpy-1.16.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (23.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

File details

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

File metadata

File hashes

Hashes for healpy-1.16.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a54b685ffdb42df7a0ccc1dcab49a14d86cb3463682007ec6e1d2b4b330ec2e4
MD5 625b8262a009b892376bd23b4c2484a3
BLAKE2b-256 344e4c13a77b3bf60516d0ac79f7b9ab48c689c255c51916805a4fc45174fed3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 71df33adb95b8fdc48bbe9d4703eecf806e4dad2450da5eb8815233d79bc6364
MD5 26ea8f4513e1ffd8b79d86d56f4034d9
BLAKE2b-256 dfd6afa00af02863a7e94cb2e633c0d5c638cadd7a2bc63324e30d0f4cbbda65

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0151b0af04c373925fe5eb1901e9cbcaed9dd8967315bc638273e81314d72ff0
MD5 9d34acb058dc698f31c54dbf2aec7d53
BLAKE2b-256 11124b91866cbbfdcb1b34ca97c52efc4bf59483188a45eb41af196a8978f1cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8687eeb6b5e5aa48ff8daab4838c6054230c23ce975f738200168e26e9169840
MD5 5b448ae4c070584815bfb4fbdc3b9284
BLAKE2b-256 b9707c1c6b9a8020de5626c4fa9472b294f1193a43349deb805fdf4b6c26b1f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5cf1d7194472d1da4c0d90b0a4cd5800a1be4c75d6c3329ff2aec7aa6c97ae6c
MD5 7f6db2d1ea6d8c26a7d623650fcaacc4
BLAKE2b-256 ce326109b61b122369276aa42bfcf6e487329f14e56ea6697553a7043e2d6e5c

See more details on using hashes here.

File details

Details for the file healpy-1.16.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for healpy-1.16.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f8d6e08143366c9f7e4ef34d19a5f28da66a5aaa05bd8cc74cf1b8573a151e6d
MD5 50a31b24d3959b46ee00aef90881e940
BLAKE2b-256 ddd226f7c5746c083b30fd9278237d5dfe5d21dd9b1b2df2645c75137af08fb1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3c4054398dfcc40a4b6553b39198c34180688db298d1b38fe23d977f325d88d6
MD5 59edf48a31a65ff5ddd4b104fb542dc1
BLAKE2b-256 9807a1a3b2694bd7d9b0a28f197b3d17a645300ef519004b2be3cb7629c126db

See more details on using hashes here.

File details

Details for the file healpy-1.16.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for healpy-1.16.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b6cc2878668f42bb5058fd3af3be688671449dd2da7a99289f5f6c17373f4c29
MD5 59b16a76450f127a4a44be2b4826a4d6
BLAKE2b-256 de100ec6f7ab178b3a7712cf19a30bb8446d813d73eeb8c9bd4b9a32cc3128fd

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