HEALPix comprises a suite of Fortran 90, C++, IDL, Java and Python routines providing both stand-alone facilities and callable subroutines as an alternative for those users who wish to build their own tools. A set of C subroutines and functions is also provided, see more.
We are interested to show a procedure for installing Healpy using pip. Healpy is the Python Package which depends on the HEALPix C++ and CFITSIO C libraries and requires supporting Python libraries such as Numpy, Matplotlib and PyFITS. However, Python development package is required for some distribution (e.g., python-dev package for Ubuntu). Ipython and Cython Cython packages can also be useful although not required. Source code for both HEALPix C++ and CFITSIO C libraries is included with Healpy and is built automatically, so you do not need to install them separately.
Go to
Python Packages for Scientific Computing
We try to list some regarded most useful Scientific Python Distributions which are central for scientific computing. Firstly, install pip for Python 2: sudo apt-get install...If pip is not installed in your system, open the Terminal and code:
Code: Select all
sudo apt-get install python-pip
Code: Select all
pip install --user healpy
Code: Select all
pip install --user --upgrade healpy
- :~$ python
- >>> import matplotlib.pyplot as plt
- >>> import numpy as np
- >>> import healpy as hp
- >>> hp.mollview(np.arange(12))
- >>> plt.show() #Try fig = plt.figure() then fig.savefig('Sphere.png')
The output should be this image:
Look for more meaningful examples at Healpy tutorial and GitHub
If you experience some errors during installation, please check: http://stackoverflow.com/questions/2567 ... atplotllib.
See also Healpy, a Python wrapper for Healpix.
For alternative installation,visit this page
Check also smoothing sky maps with healpy
Installing healpy with pip, enables you to keep your installation up to date by upgrading from time to time:
Code: Select all
pip install --user --upgrade healpy