This documentation is for astroML version 0.2

This page


astroML Mailing List

GitHub Issue Tracker


Scipy 2012 (15 minute talk)

Scipy 2013 (20 minute talk)


If you use the software, please consider citing astroML.

WMAP plotting with HEALPixΒΆ

This example uses the astromL.datasets.fetch_wmap_temperatures() functionality to download and plot the raw WMAP 7-year data. The visualization requires the healpy package to be installed.

# Author: Jake VanderPlas <>
# License: BSD
#   The figure is an example from astroML: see
import numpy as np
from matplotlib import pyplot as plt

# warning: due to a bug in healpy, importing it before pylab can cause
#  a segmentation fault in some circumstances.
import healpy as hp

from astroML.datasets import fetch_wmap_temperatures

# Fetch the wmap data
wmap_unmasked = fetch_wmap_temperatures(masked=False)

# plot the unmasked map
fig = plt.figure(1)
hp.mollview(wmap_unmasked, min=-1, max=1, title='Raw WMAP data',
            fig=1,, unit=r'$\Delta$T (mK)')