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.16.6.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.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (24.6 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

healpy-1.16.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (23.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ ARM64

healpy-1.16.6-cp312-cp312-macosx_10_9_x86_64.whl (7.8 MB view details)

Uploaded CPython 3.12macOS 10.9+ x86-64

healpy-1.16.6-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.6-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.6-cp311-cp311-macosx_10_9_x86_64.whl (7.8 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

healpy-1.16.6-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.6-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.6-cp310-cp310-macosx_10_9_x86_64.whl (7.8 MB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

healpy-1.16.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (24.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

healpy-1.16.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (23.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ ARM64

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

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

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

File metadata

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

File hashes

Hashes for healpy-1.16.6.tar.gz
Algorithm Hash digest
SHA256 0ab26e828fcd251a141095af6d9bf3dba43cec6f0f5cd48b65bf0af8f56329f1
MD5 3ce7788da61cc6e8ad38c9cd0267ed04
BLAKE2b-256 2a73d2215e43c122098daad1a666f621479cca0fd04ca89976170896d9afe03a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9d13dd979e804d2d7e80f5121b0acf46f94dcddfac757ebb01cecbcb3304b285
MD5 7f77997eeba617fbde206cef8dc8765e
BLAKE2b-256 d55aeb6888933a44ba3151f70b11be2684ff23b9d3ba242b5f6dc78c52242908

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.6-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f72338a29fc776a4031cb2e9b7bd9306cbe2f0b6355e9541716b38ad23ba880d
MD5 91967114db60c5ad8cb5bdb0fdce2280
BLAKE2b-256 5229a605d9ddd3d4c54cbb59280732be5c0d821216ae21a4d5094839e84da049

See more details on using hashes here.

File details

Details for the file healpy-1.16.6-cp312-cp312-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for healpy-1.16.6-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 12b5c5ea0c767b7ae7659b18bd4c42b11384765b44b9205b27147ab4686657bf
MD5 04aa50753fa45a51b35d8a4fe5d26895
BLAKE2b-256 9eab233744e6381e50c0525246698e3e644ea556b2874b88591df47878106668

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fd5adc827a90dffa72158b8a576143459d06dbd3afc52c2ff5c4a566aafcb049
MD5 9dcd96f195b41fd937d8c3ca6f807505
BLAKE2b-256 f834bf388eb082e302a269b5afa037a6b892113cbc5cd38e3659d6cc839695ef

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.6-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3324fc5aa737188db8017819d4ecb18c11315873481f31d97aceb29958591f40
MD5 2b28ae479bd1f438bcff27b47a4acf89
BLAKE2b-256 ad5b1c3062484364d19f977ca5a4b76c84632907d90b348c048ee790e94b10e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.6-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 366a269b239eeabf924d4a069cce5f2f1d72c7af24132d59f95fec09f670a38a
MD5 f1d2b0a8a8e72d04f85493bde764ae40
BLAKE2b-256 735910e1a32527ade484da9aaf505b54126555272164b8e7a816bcb9aed12130

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 af4469864f465fc4bc3752543812ab1161d84eff4a8aead3842d56ea1b2585bb
MD5 50449f0a42c2f4e1ecd095c51401ee54
BLAKE2b-256 5b61db79e31cae4226bbcac8cec6285c2f481562fd52148c911ba8663df16a1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.6-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6be3ca85cb78f3f243f660f3105d362615843f32c1ff53ffdead5ea1ffe07eb6
MD5 dc844816ea672b75679efdbaeb611005
BLAKE2b-256 24fdb6f71062c6deef36cd5c3e51ad95c333a8ae3211b259e66e891be85d99f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.6-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1cad7ed1d7030eeb06081240f669c9107db1282678512c85f5cf6eef1bea01bb
MD5 5710f259d8493b4a9e8477dd43f81195
BLAKE2b-256 8b1fc7b5315db9290afe2c3ee98eacad76b88d120295c0f08d2f6d758296474c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 754fed0f2313f805535ea44e37a538b8d7b58b377cdfe8f36accdf8fec417f4a
MD5 72cc22d23b642ee3156f05e5fce6d9b9
BLAKE2b-256 028a50e86daa5173aa7bdc4077c5481667cdab969540e6ffb02b971ceaeb7047

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.6-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7e5a284e7ec4cc06b7b222098ab0961a3b31f72014f0194b3cfd62e4dcd2963e
MD5 22aec0a7395053e4696664499d909329
BLAKE2b-256 cebc942a380606d328f756a1e1c87ec02a106b084e4a18c69231d86e28589789

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.6-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0a0e0b725c9fa2777f184c70beed87ff7c8dfa1869aca1fc370b40057db5c739
MD5 1587a8547c9bbdb4b3592d64d9f01bea
BLAKE2b-256 55300a4a628f528a0427ca10a30c2d471881ac3cec43b31e8dab670ecc65940c

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