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

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9macOS 10.9+ x86-64

healpy-1.15.2-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.2-cp38-cp38-macosx_10_9_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

healpy-1.15.2-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.2-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.2.tar.gz.

File metadata

  • Download URL: healpy-1.15.2.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.2.tar.gz
Algorithm Hash digest
SHA256 d559ad287a78d3b500919a5cb9e4dff3cb63c1b3a2e23edf62819c871ccacf7f
MD5 e9518a20effe71de73c7195ce023e76e
BLAKE2b-256 9824fa88a0b5ccca13e427052168435e933709abdd4757481816d5d51092678c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.15.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 46a8e023cafc4d9076b80a96ac9b060175973e719f5a6934578b1470de48c816
MD5 02a34db56aaaf607addce3debe9fedb3
BLAKE2b-256 b4e730a3f28ce7d2a28e7a5de1a0954ed1305ecc998dff6a104c8190036a07b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: healpy-1.15.2-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.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 6cb706590711d9bbe423066d6c3f93b6fa9f5594bd99f832b991f3635b2aff11
MD5 b210dedcb05a155617dfb12783286f5c
BLAKE2b-256 b501052bcde92d08c71b10179a3a7de3cec86044ae5efc275520199f7376e8e6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.15.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4c8d7a279815446d12d6cc3e2c030d893dac785ac65f11314e2932638970c5f8
MD5 4bacb17669cbe9746108454c7bdf1ce0
BLAKE2b-256 d7e4880a917300adc98d9fe915db3d04fa5c6f3e6914d85b6697e8a77463a34a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: healpy-1.15.2-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.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 b8edda2ba872eb74ccb422b20978b8b66a576f43ad1e9a4ddfb27decfe620065
MD5 d4936652936c482fb26edd5a9219ab8d
BLAKE2b-256 7544436ba5727e43b5e4939f71cd1d87deb71de12a6758ce6262e8d8be175b6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.15.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 790959ac1e5a88b3e0cffed3743c87f7d00e43021c6391b830368721e565a045
MD5 58cb7ca965076a0d00131b24d79a5e58
BLAKE2b-256 91e17f60a41572a18342e789ff3a1b898528c2e6683e99fcd03e930897733127

See more details on using hashes here.

File details

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

File metadata

  • Download URL: healpy-1.15.2-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.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f3ff6a7d25c0b057cb0e50cb01de8d22bae8d3d493ddcc08b7606e3c7bcf36a7
MD5 1cfaeef03f093dccf3447fc4b90eb339
BLAKE2b-256 1916b69af5b135b14106283653d9dde043a2a906bbfd3d744de0e545bbecea0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.15.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8070a5de53c0655cd753511c4596b8d94e5319604d2093c0cf6bbe9919a971a9
MD5 66f312b394e823d9f08c431a63a51691
BLAKE2b-256 f6f133c66eb22a2d669c24fb53c24d4e7d5025c19317811484b900d85ea99b40

See more details on using hashes here.

File details

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

File metadata

  • Download URL: healpy-1.15.2-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.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 226cb8b4a0d882327453ed06bae9bea71e4769d8e6dce990f25270d4c9aa46ca
MD5 484b888f3afff93d5ebfcda86b8c465c
BLAKE2b-256 45f863c6684d52a6d49ab25c44b1d09fb438264992d379529689b8da08e32711

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