VisualizationΒΆ

The HealPixProjection routines can easily be used to display a full sky map with different projections. In the hpproj.visu module, several projection have been implemented

import matplotlib.pyplot as plt
import numpy as np
import healpy as hp
from astropy.wcs import WCS
from hpproj import mollview

# Ring like healpix map
nside = 2**6
hp_map = np.arange(hp.nside2npix(nside))
hp_header = {'NSIDE': nside,
             'ORDERING': 'RING',
             'COORDSYS': 'G'}

# Projection of the map and plotting
_ = mollview(hp_map, hp_header)
fig = plt.figure()
ax = fig.add_subplot(1,1,1, projection=WCS(_.header))
ax.imshow(_.data, origin='lower', interpolation='none')
ax.grid()
ax.set_title('mollview')

(Source code)

Note that these maps have a proper WCS header and thus can be easily used to overplot markers and artists.

Other classical projections have been implemented

(Source code)