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.2.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.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (23.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

healpy-1.16.2-cp311-cp311-macosx_10_9_x86_64.whl (7.0 MB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

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

Uploaded CPython 3.10macOS 10.9+ x86-64

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

Uploaded CPython 3.9macOS 10.9+ x86-64

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

Uploaded CPython 3.8macOS 10.9+ x86-64

healpy-1.16.2-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.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.16.2.tar.gz.

File metadata

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

File hashes

Hashes for healpy-1.16.2.tar.gz
Algorithm Hash digest
SHA256 b7b9433152ff297f88fc5cc1277402a3346ff833e0fb7e026330dfac454de480
MD5 ff3015917f100cd7ff058220a7c088c4
BLAKE2b-256 7657add5f1feb33ca3ef50fedb99a356998caaab9b014adb48fd36dcf4847dcd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7955343606655f0219738f411aba9b4b8355386613c40ce9a77dfeb68ab6baf8
MD5 ab3f835d272f4e733e00b906a4aaecac
BLAKE2b-256 796611ede1163e26b43ec6b1b7fa0a43640d346f45cf345b10699f735359708e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3a933010d0f6042da938084494575daadcfda7bdd27454fd0036a4f4fd9411bc
MD5 b853c7a192d61c059a37b13391449b45
BLAKE2b-256 7868263aa1336333384bb61b6529c8e86234b2143908c8131d4c12df38fcea39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e86b360be6c941305ed1cc3f95611fa0601cd6499e58d2dd1412ab313b60011a
MD5 8b2653d756f932a3c52b3280fb1af36d
BLAKE2b-256 186ab5da3fc7f00fdd39ef75de0448c3391cb0af953e5c4310297c11b9e5dc0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f5262965e477d1380c5d006379c137c2c49e142719d9c6df7cdb59b7bf3b5b8e
MD5 3f01fd935daf8d5902ea4e0aac0a81c9
BLAKE2b-256 c64da9a0bb441524d336b610ada88329f48c1147d90b9b2f01f36f51295d0b8d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d0d22943e65e98d3f177538e7bf4633a7acc11c590c64bfffc7fc35f3eb9c021
MD5 2387ac293e3262509a30f65a98217ce2
BLAKE2b-256 51e6bd16843e9f14d98611628481bc794585616073bed66104e7cde32c028afc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7efaac3cf8b885a66a4709cdc378dc9a97cb37c12c8d2eb490bf056fb81ea2b6
MD5 be70301f1a43d7aec1a67889329efaee
BLAKE2b-256 f2aa28dd7bc98a5ee6cb189d6c1412975d5b79feebd930d0b80a42ac6ec1d9ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 71b30644a40871b185c4ce3514de8ca418e1f0991f304dea6c8530105f4cdb83
MD5 8ac90a5c0abc935ffe2e0c16e0b26b56
BLAKE2b-256 7f6a65fafdf515eae2b08c10eeb1687e1ec5f9361a5ee958846bb60705f1f17b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.2-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 31ca2dd5f40af7742b9850ed3cd976d7e382168b852a7e4e2c60cd3d6f435b07
MD5 415bdc60f9758109d9e9d1757201259a
BLAKE2b-256 70008bc48df004dd24c3be7765e06ff0d4c23f7a5ee2430c98685f726dc626f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e500902fd118507b4bb8be581e8afc5a5bc6451bb2cd04b74bb5d74ba620ea12
MD5 dee8c123ec76e242a7bcffc6662ef76f
BLAKE2b-256 aa081a1a7a793e6bdd6c4cd6545c9e2a2970fbc2898754a950b8c4b271312d05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for healpy-1.16.2-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1b661db2050cef679d3cdaeac838557f7d19b9bb0696c1aa75f1cf3f7fe0c778
MD5 546ffa25256f5adff8eae506e69f7176
BLAKE2b-256 37d6188d054070577bdf82c6a057389dd22f3319344b049fe04a52b0b3a3cb62

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