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

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8macOS 10.9+ x86-64

healpy-1.16.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.7 MB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

healpy-1.16.1-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.16.1.tar.gz.

File metadata

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

File hashes

Hashes for healpy-1.16.1.tar.gz
Algorithm Hash digest
SHA256 6d691b0a77fdf699672de09d39d82a640cfcc8ca03ae55022fb71e6edda69d2f
MD5 e5993b888192847eee9b622bb3b06f51
BLAKE2b-256 5a40b2716c5b57c90f7a240177825275d86c29684373dc77e9eb9176a43c485a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8d2faf7ed84ae1222efbd7149595ad8d484d77562b32aa838f98a0253305a317
MD5 3526f7cbc42bad1d51f61045d13273c9
BLAKE2b-256 a59aeef07eeba99cc6ea456ef24447032538c828ac5582aa03733e06a4b71bd3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ca3161612d0813f44187b37b565f8d93f0e772817aa6d777ccddf1833028fce2
MD5 da413a261692537e847e1080fcbf3082
BLAKE2b-256 2b662a7a6be19906e612e59a067d36737ea0907a4cd7ad90ebc1db36e4bb5088

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ab2634197099423afd1be9e4efe820c112f5b4f21efd11608c704a90837ef848
MD5 bd193dd1e878108289666b6fa4602f09
BLAKE2b-256 b9a1fd19dcfdc044df8a58603de4840b100290846fa58db75cd084118df18e2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 ed8c8e2fa4f175d85498a586f33c5ca19863036d4352c758ccbfb36e8f2c2719
MD5 f3b7d3405d8cdc05c71d040faf4b1e01
BLAKE2b-256 f0131b1312ebc52b333be118a7a596c0d20f4131655074727892b29943ff7f82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 25480026e8ab34a4093482cee2f2e3a4419cb4eeb0b0372dcefce97dfd4efca0
MD5 dd2204af8275cfffca0457afe8e394c3
BLAKE2b-256 6f311336e45b6a6c92014dcacddd9305931a01a10274471dc8e0b73c6c4143f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 644a9e24201341859018f6383952c4a136f54d43d2582068340c96afd13c918a
MD5 e55cc8638cd3b7f95b5fdff3289c947c
BLAKE2b-256 b502fa9a6b98c568d707bc7568d9a2d25fc57ba056153b467c393ff93058757f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2b8dd4672f4a78869650f2474c2a5a0781f65c804f2703ff63c425af2566c7aa
MD5 bbebd66ca9adeb76c11f33ede46d49ed
BLAKE2b-256 d15ca767a5debf32e963ebddd13b32222c80de614708d7f3fc6c7e866974099b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 dbf81fa243b6116c50c3b3f2f9db1a71cb2aa86d8f63c852b694f266e2a82e3d
MD5 53459d78448917a56af9c0fdf2871385
BLAKE2b-256 b86c361f83aa1f63ee6b583490f7ab1abd344dec02e2c793e6f2e5498a9e47da

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