This tutorial is built on the following tutorial in Matlab: http://xray.bmc.uu.se/~huldt/molbiofys/tutorial.pdf
Chapter 1. Projection images [ IPython nbviewer ]
Chapter 2. Diffraction concepts [ IPython nbviewer ]
Chapter 3. Resolution [ IPython nbviewer ]
Chapter 4. A look at 3D reconstructions [ IPython nbviewer ]
Chapter 5. Sampling, periodicity and crystals [ IPython nbviewer ]
Chapter 6. Phase retrieval [ IPython nbviewer ]
Appendix. Q&A [ IPython nbviewer ]
Mayavi is a scientific data visualizer written in Python, which uses VTK and provides a GUI via Tkinter. In this tutorial, Mayavi is used for 3D data visualization, especially its mlab module.
The latest version of Mayavi, called Mayavi2, is a component of the Enthought Canopy . For those who use anaconda instead of Enthought Canopy, Mayavi can also be easily installed using conda (check the latest version avaiable before running it):
conda install -c anaconda mayavi=4.5.0
If you want to compile the files and install Mayavi manualy, see this official documentation for more details.
Mayavi provides two different ways of displaying in Jupyter notebook, static images and X3D elements, which produces fully interactive 3D scene.
The X3D feature is quite easy to use and has nice display outputs. The only requirement is to install the x3dom Javascript and CSS files locally, which is already shipped with Mayavi package. Simply run the following command should work.
jupyter nbextension install --py mayavi --user
Generating a static image is much more complicated than it looks. Off screen rendering needs to be enabled for this to work. More details about using Mayavi in Jupyter notebook and how to set off screen rendering can be found here .