Working em3d.py to scan some cubes. More work is needed to test everything.