Summary

Tomographic reconstruction creates three-dimensional views of an object by combining two-dimensional images taken from multiple directions, for example in how a CAT (computer-aided tomography) scanner allows 3D views of the heart or brain.Data collection can be rapid, but the required computations are massive. Further, many common experimental perturbations can degrade the quality of tomographs, unless corrections are applied. Unless automated tools make these corrections, beamline staff can be overwhelmed by data that can be collected far faster than corrections and reconstruction can be performed. To address the needs for image correction and tomographic reconstruction in an instrument independent manner, the TomoPy code was developed, which is a parallelizable high performance reconstruction code. 

Using tomopy

To initialize the environment use the module command:

xwhich tomopy

 Local path for tomopy:
    /software/anaconda3/5.2/envs/tomopy/bin/tomopy 

 Provided by module(s)
   ... module load maxwell tomopy; which tomopy: /software/anaconda3/5.2/envs/tomopy/bin/tomopy

 Documentation: https://confluence.desy.de/display/IS/tomopy
 URL:           https://github.com/tomopy/tomopy
 Manual:        https://tomopy.readthedocs.io/
 License:       https://github.com/tomopy/tomopy/blob/master/LICENSE.txt

/software/anaconda3/5.2/envs/tomopy/bin/tomopy
  This is a dummy placeholder! Read the documentation on confluence!
  https://confluence.desy.de/display/IS/tomopy


module load maxwell tomopy
python      
>>> import tomopy
>>> tomopy.__version__
'1.7.0' # might change over time

# taken from https://tomopy.readthedocs.io/en/latest/ipynb/tomopy.html
>>> import dxchange
>>> import matplotlib.pyplot as plt

# Set the path to the micro-CT data to reconstruct.
>>> fname = '/software/anaconda3/5.2/envs/tomopy/lib/python3.6/site-packages/tomopy/data/tooth.h5'

# Select the sinogram range to reconstruct.
>>> start = 0
>>> end = 2

# tooth.h5 data set file format follows the APS beamline 2-BM and 32-ID data-exchange file format definition. Major synchrotron file format examples are available at DXchange.
>>> proj, flat, dark, theta = dxchange.read_aps_32id(fname, sino=(start, end))

# Plot the sinogram:
>>> plt.imshow(proj[:, 0, :], cmap='Greys_r')
>>> plt.show()


Using tomopy in jupyter

The tomopy jupyter kernel is not installed not to overload the list of available kernels. You can easily install a jupyter kernel yourself:

module load maxwell tomopy
ipython kernel install --user --name=tomopy

Restart your jupyter server, the tomopy kernel should be there. See https://tomopy.readthedocs.io/en/latest/ipynb/tomopy.html for an example.