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 Distribution

healpy-1.16.3.tar.gz (4.4 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.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

healpy-1.16.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (23.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

healpy-1.16.3-cp311-cp311-macosx_10_9_x86_64.whl (7.3 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

healpy-1.16.3-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.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (22.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

healpy-1.16.3-cp310-cp310-macosx_10_9_x86_64.whl (7.3 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

healpy-1.16.3-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.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (23.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

healpy-1.16.3-cp39-cp39-macosx_10_9_x86_64.whl (7.3 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

healpy-1.16.3-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.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (23.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

healpy-1.16.3-cp38-cp38-macosx_10_9_x86_64.whl (7.3 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for healpy-1.16.3.tar.gz
Algorithm Hash digest
SHA256 9fb7ad9c895fa399f814fcf69cafe13027edf8ab92f8d7ccb36e5c4c44f3d147
MD5 11ac43c53f1f935004393bde55667f9e
BLAKE2b-256 cfd45ff0f67f75eb393958b9e32aaf4e5594618757d3be3374c1b60362b20a98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c240a94392cfede7ebd09d0ce1adab868730a852794195821be2d301dc1dde02
MD5 21ed20be043ef5186f36a1cd4ef3dc0b
BLAKE2b-256 4b315f04cf52f79513bcbed49176bab23bc663698912475c5bc128a158d6acde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 00463338492a39b3599a6fdd6eeea99213855a582c31e2c4ed20b37bea718f37
MD5 2b2e48eb0d723f40a4c9b2261bc8677d
BLAKE2b-256 3de70e15ea129c08acf3c13e55ec535f15080482328749b6a687b5b37a3610d8

See more details on using hashes here.

File details

Details for the file healpy-1.16.3-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.16.3-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 185af6172fbb79694fa869f6dbb904123a261f7e0dc4e4dc4dbf319088f75cca
MD5 2424e4e3956a636fb5734c51c557f351
BLAKE2b-256 934e4699ed767d32003013f444cc6eb4906ed01a4f234d2d8577cefec781182f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 63959265c1afc5ae7e85fa393a9161c258f6d989dda280d96fe622d46ebcc511
MD5 d2fbb8f54b2297478998eb8dcdb09b91
BLAKE2b-256 f0b197b31f5430d2a7a6426fd4b95a6fdb5bf035a46e33606ee5a1b8a72c26b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a43a79bceceec563850d0b2773d5e30f7e5c5f37199d47da577b7c26ee17600d
MD5 1a8b3dc05bb1cf3b5d8ae07ec5463d5c
BLAKE2b-256 e054622decd9686051d926e308fb5733ac037a00a54dd553242e81d56a20be02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.3-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1f92761c6c1b63a5acf5492e42cad7c078f6605e1d3b4a3a43a4db68043a12e4
MD5 549f876505daa4e922a4d0b6438f39ec
BLAKE2b-256 f923571c11dbd6da60a9ca9011cfe8c8448c8b6dd2946fbfefbc3c1111739222

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 27896d59d92bdb980987ea45912a7a95c09a0b8f5773a9112a56c7d5f9b4d389
MD5 6f3647bf3439e0a873b2145c6c489e5b
BLAKE2b-256 88da0a46f41bec07348d7a0270058bc2cecbd4cac93e6571c01c0edf0d894561

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 69a3fbd95883e15f36be512ee8420d189e24578fb49f4ccab1f8c6d1f5b71256
MD5 af7e16b24cd7ab1c43b8412268565b92
BLAKE2b-256 390b8ccff9b827d903487ab9f91bb564682b44638678b7a7a3db37b64f00cf33

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.3-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 341ce3373ddcb3ebdad2d39c3e43f6d38ab8542b1b1c077dd0ad889b419fd57b
MD5 7611d99f92d90216cc658b9332ae5d60
BLAKE2b-256 f691d9b407b3023daf89ad884575a22f7f1634a7250454ab93a9bab7a8017a99

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 490389210df1615cdddd2eda4022e61f9dce1f1553f3a0441fb43b82e1afc0df
MD5 06122eefbd063d771024412ef679327e
BLAKE2b-256 3ea0eeb799459aed38b53cdc6797e7f01a990e85e1b06363905010f292b2f452

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ca746e88c2269d7f1e74e54d2d28b786515ed53306ae38ab758c98bbfd4fa9fb
MD5 fffc4da68358db8185b41c1a4f33642d
BLAKE2b-256 ab66cb6bdd3f95783ff15b14361a58224250baf7af1088937f301c884d56b3ca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.3-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 e43a9172b7bf07a420e338b84aeb7a8498f26549d907f0302d126091b202cf57
MD5 1d3912a6877bdbc1495bce6dd0925db2
BLAKE2b-256 f0f48e3eb7f654b35a2adda7584f6eec7ae4be9694eb85c791e8ca9a54c05e92

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