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

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10macOS 10.9+ x86-64

healpy-1.16.5-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.5-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.5-cp39-cp39-macosx_10_9_x86_64.whl (7.8 MB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

healpy-1.16.5-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.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (23.2 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ ARM64

healpy-1.16.5-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.5.tar.gz.

File metadata

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

File hashes

Hashes for healpy-1.16.5.tar.gz
Algorithm Hash digest
SHA256 9f99cd5ed2d8791dbfcefe1552a73e550ec85b87637127938756280008d0ed29
MD5 8c6d4b9c9fd87489827e1c08b918d383
BLAKE2b-256 76f79442e25555c4952584a0c6d9d350964955b73101a6a5fca98e74344bf9e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ba99a0c262ae389db2bc9a78b107e1d33944608ca492767f636a94144156f464
MD5 e9372ed6a7aae4b898e1180dc0c6755d
BLAKE2b-256 bf57c0c8a2410e7d71ee601cbc0185335677f18b09e71c9b5422a5d9ae0c9823

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 40b0363b781b8c471b2fe40fa54f8b82810b8a80d19c1e86f2e4114c0118ee55
MD5 c12cd9b0ca7a6082c455765bf5f63879
BLAKE2b-256 c567dfc2b6d051a3c3bfd1e22d0f7770fb2b412807dfc9744e005e4d8a42763a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ec39b58daf8303f7df125fb4fa690b70a6edf88e5644990d940edf656e9e984a
MD5 c647a15dc55647daafe3e658e3f21e64
BLAKE2b-256 ddd680390c86be62854c754418e0ecdd5eec78ba99cef3ac7097d8775c12e981

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 666bf645caf813f53393d60ef388e5daf19d9b0d81bd8a133793b7f61d1c61dd
MD5 07775c281e31ecf162bc352feb163e13
BLAKE2b-256 07299985eaccc7448f70a285b442fff35df58ed382f95bfaa7ff2d3f9179186a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f87784a3912fd6253c9aa8118ed0d55c224564e1b94875a1a213feed0395aa1e
MD5 17ce389a2275ba38950b32d2a1646fdf
BLAKE2b-256 d40603fd4990a7dce1b088bddd734bad122b364a2dedf486b124eb4c3c78606a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a6bd59a2d1fd6ec24a7ddf409b027b31a7b6dedbbb82866142249983a3056ca4
MD5 2fc45d77288302641b6444d6f6897d9a
BLAKE2b-256 162e61a1a133572caf1738a517385cbb993faa1a947f7c763bf165ff40035c94

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b7b70298346f09382fae55b8b44d338e214239e634f8b3afbf23842f8967e475
MD5 b5833ea4488cce7f8cc645c804807fb0
BLAKE2b-256 2492e21b5c489249e2d482fbc06943c6c60f5c7c4a89f59f37a3be885ae6b9bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 dca8842bec5c35d793edc8aa3757a57ed32c55c9e175340125fd68cfa4d67086
MD5 3804ea5bfaf1c2ef7a4a017e614be4bf
BLAKE2b-256 ee20fe7d9831a6a81c3fdb0637f7aa703767039b31e363adaa53a39a639c15f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f988b3505e950e0d63b59d1e0b344e5c0e905f28848309ef3ff51cf5672841d0
MD5 25f080b3f56a0943c0dbf5b7c54fe423
BLAKE2b-256 b6c8f367e3ca63d528d2c57c758dd2e0b915f0cd80fe3206b7c9263be68fb0c7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e9fc6a94aaeee154630e09b9857890d8eed7e839f740c67c94095d42c8253a51
MD5 f78c51d08b6c0352a3b74e366bd27a90
BLAKE2b-256 4774d2209269a82f9acb104e7f8429389ad796c41943730bc0155e9be1d30e59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 e7611cbb5d085a1d579d773c7922ac72a67e22686fe5167417ae9c9807b85ed6
MD5 7fbb244b6d235dfd379e1459e74930e1
BLAKE2b-256 e69ac2da373272b7a20d0515c5a04febde230c0cba10d1348a0d74fe234825c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.5-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 2d72f2468d9ffee1d78db0bffb6a75b09cfd5064c05c4b17a08fe579a1bbd81d
MD5 04f5dd06dde7345ee5df947f09698575
BLAKE2b-256 f0bd2e60288e26bb37114efaceab2bfc32627725d03bbd20d0c96ef72d5911cb

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