Interactive 3D plot of a sky map

python
astrophysics
Published

March 12, 2013

update May 2024: See the new version of this tutorial

Mayavi is a Python package from Enthought for 3D visualization, here a simple example of creating a 3D interactive map starting from a HEALPix pixelization sky map:




Here the code:


The output is a beautiful 3D interactive map, Mayavi allows to pan, zoom and rotate.
UPDATE 13 Mar: actually there was a bug (found by Marius Millea) in the script, there is no problem in the projection!

Mayavi can be installed in Ubuntu installing python-vtk and then sudo pip install mayavi.