Package: healpy
Descriptionhealpyis a Python package to handle pixelated data on the sphere. It is based on theHierarchical Equal Area isoLatitude Pixelization (HEALPix)scheme and bundles theHEALPixC++ library.HEALPixwas 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.Capabilitieshealpyprovides utilities to:convert between sky coordinates and pixel indices inHEALPixnested and ring schemesfind pixels within a disk, a polygon or a strip in the skyapply coordinate transformations between Galactic, Ecliptic and Equatorial reference framesapply custom rotations either to vectors or full mapsread and writeHEALPixmaps to disk in FITS formatupgrade and downgrade the resolution of existingHEALPixmapsvisualize maps in Mollweide, Gnomonic and Cartographic projectionstransform maps to Spherical Harmonics space and back using multi-threaded C++ routinescompute Auto and Cross Power Spectra from maps and create map realizations from spectraThe documentation can be found athttps://healpy.readthedocs.io, tutorial athttps://healpy.readthedocs.io/en/latest/tutorial.html, or execute it onmybinderRequirementsPython3.9, 3.10, or 3.11Numpy(tested with version >=1.19)MatplotlibPython development package is required for some distribution (e.g.,
python-dev package for Ubuntu)AstropyQuick installation with PipThe quickest way to install Healpy is withpip(>= 1.4.2), which automatically fetches the latest version of Healpy and any
missing dependencies:pip install --user healpyIf you have installed withpip, you can keep your installation up to date
by upgrading from time to time:pip install --user --upgrade healpySeeINSTALL.rstfor further details and other installation options.OptionalHealpy depends on theHEALPixC++ 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 ofHEALPixand cfitsio, you will also need:pkg-configHEALPixautotools-style C++ packagecfitsioSeeINSTALL.rstfor further instructions.Known issuesBuilding with OpenMP support: the underlyingHEALPixC++ library can be built
to useOpenMPto 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-installedHEALPixC++ 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 withpython setup.py clean –all, and set the
environment variablesCCandCXXto point to an OpenMP-capable compiler,
such as gcc/g++.Healpy does not currently support Windows.
Seehttps://github.com/healpy/healpy/issues/25.Incompatibility withcfitisiofromHEASOFT: 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 ofHEALPixC++. HEASOFT’s
include directory contains a file called “rotmatrix.h” which clashes withHEALPix’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.
Seehttps://github.com/healpy/healpy/issues/194.SupportFor specificHOWTOquestions please create a question onStackOverflowand
tag it with thehealpytag, 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/issuesContributeProject 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.DevelopersCore developers:Cyrille RossetAndrea ZoncaMartin ReineckeLeo SingerDaniel LenzList of contributors:https://github.com/healpy/healpy/graphs/contributorsAcknowledgementsCite the HEALPix andhealpypapers, see theCITATION filein the repository.Add an acknowledgment statement: “Some of the results in this paper have been
derived using thehealpyandHEALPixpackages”.at the first use of theHEALPixacronym, a footnote placed in the main body
of the paper referring to theHEALPixweb site, currentlyhttp://healpix.sf.netYou can also directly support the maintenance and development ofhealpyviaGithub Sponsors