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.9, 3.10, or 3.11

  • 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

  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.17.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.17.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

healpy-1.17.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

healpy-1.17.3-cp312-cp312-macosx_14_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

healpy-1.17.3-cp312-cp312-macosx_12_0_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.12macOS 12.0+ x86-64

healpy-1.17.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

healpy-1.17.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ ARM64

healpy-1.17.3-cp311-cp311-macosx_14_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

healpy-1.17.3-cp311-cp311-macosx_12_0_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.11macOS 12.0+ x86-64

healpy-1.17.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

healpy-1.17.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ ARM64

healpy-1.17.3-cp310-cp310-macosx_14_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

healpy-1.17.3-cp310-cp310-macosx_12_0_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.10macOS 12.0+ x86-64

healpy-1.17.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

healpy-1.17.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (8.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

healpy-1.17.3-cp39-cp39-macosx_14_0_arm64.whl (2.7 MB view details)

Uploaded CPython 3.9macOS 14.0+ ARM64

healpy-1.17.3-cp39-cp39-macosx_12_0_x86_64.whl (2.8 MB view details)

Uploaded CPython 3.9macOS 12.0+ x86-64

File details

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

File metadata

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

File hashes

Hashes for healpy-1.17.3.tar.gz
Algorithm Hash digest
SHA256 4b9f6ae44c6a5a2922b6542b2086d53cc3a6b51543d856d18406fb984edbec5f
MD5 41bc14918fbd5faa36cff2d586906052
BLAKE2b-256 1a98f4a7ba9541fa692b85d5b0f9500059bed519e93ae6e65fc49a204abb2d72

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.17.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4afac0cb7f6bebbf821fbe0dc17da5ab8dffdb60bdee9b04451b30c06d94ddd3
MD5 c3c783ae94287bbde9fe37fcc200334d
BLAKE2b-256 a36bc1beb3b9916bccd760f9ef1b982d3c46c2c07b2d7e4f5002462daa5584ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.17.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 39577afa822c03d321211373eb18116711796762f2288ff399df8c139a7f53dc
MD5 7bdb0b38ee9bb4551ec42f1d8e9c71ab
BLAKE2b-256 c3dfc0b446c47ab0caf2e93a85c5ff10b17eadd480db094cf55d4c059469f33e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.17.3-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 7ae3632a05c588a76bcac187a8e7cbb065c4d4051af47875a0e162cd28ca2243
MD5 f4ee469638660545b6710536be2a9971
BLAKE2b-256 8155d094f64633c419b7e3d83c83c96ed5b9233c08350003d0a1e8baa379d1d4

See more details on using hashes here.

File details

Details for the file healpy-1.17.3-cp312-cp312-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.17.3-cp312-cp312-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 465e8627ffafeefff94e7705614f3fbb0c517dd4f04d33aa15bfe704c0e9352e
MD5 17c5d1ce0343a39959a15f25aadc3e2f
BLAKE2b-256 a3ae4ec064052bf796da5a80100ee972ce817a0ad3df378fb700d37cd0f178e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.17.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f27a8f897a15279a5f240bb17f24d784a69a28f0830ed00fffee5070c5aadec
MD5 4dbba671d8877036df3d6bcb0995ef54
BLAKE2b-256 c8aef0cca6d36822627bbb45615ca08db549b38dffda0713c7034827665d3de9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.17.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4669267121a170792416e4310b3d6f9d9819059ecd4be61b4adc443911adc57e
MD5 46df3394a713c46e5b60755cec38b609
BLAKE2b-256 3430bcbaa0fda5e9e085c0c8f591af9a1a9156573a81f9036efab573464ece61

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.17.3-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 1d8c60405fde26362ed10eba474fd4c9c075d819c5574fd7f99cda2f827711d5
MD5 76d7cfe25562c76a1cea2347b6e76631
BLAKE2b-256 0d2225eb96c1d897858411adb0ded4bda798859ed36b445ef8e03980363240ef

See more details on using hashes here.

File details

Details for the file healpy-1.17.3-cp311-cp311-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.17.3-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 b1d942184d54e1422c19fd1ea8c35eaea6cdef8c678e3bd287f5322f600db466
MD5 794280018b80c0d5b4d396e5f1398e88
BLAKE2b-256 95293904a73b6b5f2f570ef31fc9058538279e8261f2fe3fdf9c030c7e151853

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.17.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9792a37410605dd746508bc9cb8b3b1421d789fcb3e79cd9e3249aee8ff22920
MD5 326224be04e743599ccab64617de6ea3
BLAKE2b-256 e0fa12d69fb118f912744f55202b850e109c16752747d6565565ab9136648f50

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.17.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 cd908103b524734c5beb01741714accb9f61a567563abf1c76c99e611c286756
MD5 befd6ade95ee93f7e5837c47aee6049b
BLAKE2b-256 b8d7e34d1c259ff12643e5f74af3dd88299b91cd5b2991cc550269f2fa914ee0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.17.3-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 f5cfddd9891ab586fde558462c3b2e998c5d0d8ffe1bcbfb127a89265a119385
MD5 f44ef00bec882c9d099c09c5aec5b06c
BLAKE2b-256 d880a3ad266e3105548223d201f580a8387f4773bb81763cd1ed8b1c6e3df1e3

See more details on using hashes here.

File details

Details for the file healpy-1.17.3-cp310-cp310-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.17.3-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 13ed8e7f3204e37139d0f4fbb1d9b7d4dd73564a3972770567ee50a1fa8c0fec
MD5 b6238c660ce36f6a6de3f55fde976502
BLAKE2b-256 b323c9605d44fb61697d7d141b1eebc4d4e8a71e5b20932a214a1548fdb2c626

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.17.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ea016d3ffa69396ec145ec0f630fd2f34f659b0fe5d33d17666bc9b57c043237
MD5 dd834a2f7027ebe9b9066f0bc7bdd5f7
BLAKE2b-256 f745ac3c0efba65e33eceda4c90408252d283938de9cd1d7c04bafec60bd8ecd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.17.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 bc12ed80c985c909272736e959a4d98c8d0b7bfbe7f34accb0c00658da1d0d59
MD5 d087cabc7bf51c66c8aaadda75fb3f5e
BLAKE2b-256 9fba0bd1b8ad4db865b71b70b136fedd5f486d725ef8ac45e0845199a610a158

See more details on using hashes here.

File details

Details for the file healpy-1.17.3-cp39-cp39-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for healpy-1.17.3-cp39-cp39-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 5a50e3db968ac5168669cd4bd8b1b8e2db34031483f731e687c6c3e55c31a294
MD5 a640576e3731d4c1bcd248abe32dbbce
BLAKE2b-256 40f80962f2b75ea84d6bbaf2a75d253a01d9fc6158e2a27eec7fd67473c2cc95

See more details on using hashes here.

File details

Details for the file healpy-1.17.3-cp39-cp39-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.17.3-cp39-cp39-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 77d5cd25e6d01cada2c8e61f1a35307ff66bbd1b0620304bdeae0c606ca0e21f
MD5 78b53854d4e87e183515defbb2b8acd3
BLAKE2b-256 75e5a1112e1cf3c7c6d42b37a810d6da1a01f772c8002b834b1906f7fa3f8ab9

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