Abstract
The processing of tomographic synchrotron data requires advanced and efficient software to be able to produce accurate results in reasonable time. In this paper, the integration of two software toolboxes, TomoPy and the ASTRA toolbox, which, together, provide a powerful framework for processing tomographic data, is presented. The integration combines the advantages of both toolboxes, such as the user-friendliness and CPU-efficient methods of TomoPy and the flexibility and optimized GPU-based reconstruction methods of the ASTRA toolbox. It is shown that both toolboxes can be easily installed and used together, requiring only minor changes to existing TomoPy scripts. Furthermore, it is shown that the efficient GPU-based reconstruction methods of the ASTRA toolbox can significantly decrease the time needed to reconstruct large datasets, and that advanced reconstruction methods can improve reconstruction quality compared with TomoPy's standard reconstruction method.
Introduction
Modern synchrotron light sources are capable of producing massive 3D datasets in minutes, with detectors capturing projections at kHz frame rates. To maximize the utility of these experiments, researchers require real-time feedback to adjust instrument parameters or observe dynamic processes in situ. However, a significant computational bottleneck exists. TomoPy is widely used for its robust data handling and artifact removal capabilities but relies primarily on CPU-based reconstruction, which is prohibitively slow for iterative methods. Conversely, the ASTRA toolbox provides high-performance GPU-accelerated reconstruction but lacks the necessary pre-processing and data-reading infrastructure. This paper presents a seamless integration of these two toolboxes to bridge this gap.
Methods
The integration provides a high-level Python interface within TomoPy that leverages ASTRA's computational engine. By specifying method='tomopy:astra' in the reconstruction function, TomoPy automatically handles coordinate system translation and data transfer to ASTRA. The system utilizes NVIDIA CUDA to offload back-projection and forward-projection tasks to the GPU. Additionally, the framework supports extensibility through ASTRA plugins, allowing new algorithms like Total Variation (TV) minimization to be easily incorporated into the TomoPy workflow.
Experimental Setup and Datasets
The performance and quality of the integration were evaluated using two datasets:
- Benchmarking Dataset: A 1200x1024 projection dataset used to compare CPU vs. GPU computation times.
- Experimental Synchrotron Data: Data from the 32-ID beamline at the Advanced Photon Source (APS). The sample was contained in a diamond anvil cell, resulting in a "limited-angle" problem where only 137° of rotation was accessible. This dataset served as a rigorous test for reconstruction quality under challenging conditions.
Results and Discussion
The integration achieved dramatic performance improvements. For the SIRT algorithm, utilizing 4 GPUs resulted in a speedup of approximately 600 times compared to an 8-core CPU configuration. Specifically, reconstructing 200 slices with SIRT took less than 4 minutes on GPUs, whereas the same task required over 32 hours on the CPU.
Beyond speed, the integration enables the practical use of advanced iterative methods that significantly improve image quality. In the limited-angle diamond anvil cell experiment, standard analytical methods like Gridrec produced severe artifacts. In contrast, the iterative and TV-minimization methods accessible via ASTRA effectively suppressed these artifacts, as shown in Figure 1.
Conclusion
The integration of TomoPy and ASTRA transforms iterative reconstruction from an overnight process into a routine task. While currently optimized for Linux environments and subject to GPU memory limits, the framework provides a scalable path for synchrotron data processing. Future work will focus on expanding the plugin ecosystem to include machine learning-based denoising and specialized phase-contrast kernels.
Summary updated