# Real-Time Tomography of Gas-Jets with a Wollaston Interferometer
## 3 Data Analysis for Interferometry and Real-Time Tomography
### Real-Time Computation of the Density Reconstruction  
Real-time tomographic reconstruction requires large computational resources. Since the ML-EM algorithm can be parallelized, real-time reconstruction can be achieved using either multi-core Central Processing Units (CPUs) or Graphical Processing Units (GPUs). The measurement can be divided into three different parts as sketched in Figure 11. In the first step, the actual image is taken. The blade is held at a fixed position, and the gas jet opens. In this  
Figure 10: Convergence studies of ML-EM for various degrees of Gaussian noise \(\sigma\) and the number of projection angles \(N_{a}\). Convergence is observed after 7–10 iterations. Figure 9: Reconstruction by ML-EM from seven projections with artificial Gaussian noise, \(\sigma=0.01\). experiment, the gas jet's open-close frequency is limited by the vacuum pump to about 2 Hz. Since we average over 10 shots of the gas jet, to improve the statistics, the time needed for each step in angle is fixed to approximately 5 s. Between two projection measurements at different angles, the blade has to be moved (second step). The maximal angular velocity is 1 deg/s; hence, for a complete measurement (90 deg), the total driving time is about 90 s.  
The last step of the measurement is the tomographic reconstruction of the density distribution. Since driving the blade does not require any computational resources, this process can be done in parallel. As soon as the stage is moving, the computation of the density distribution can be started. After approximately 10 s, the first estimate of the 2D density distribution is available and improves consecutively with the number projections from different angles. The time required to reconstruct the density for \(N_{a}=7\) projections is below 2 s.  
In order to create the parallel implementation of the algorithm, the TomoPy package for Python [20] together with the Astra toolbox [21] was used. TomoPy is a Python-based framework for tomographic image reconstruction and data processing tasks developed at the Advanced Photon Source of Argonne National Laboratory. TomoPy includes many functions to perform pre-processing and image reconstruction using different algorithms [20]. The Astra toolbox is an open-source project developed at the University of Antwerp. The toolbox provides tomographic image reconstruction of 2D and 3D datasets. The toolbox uses Compute Unified Device Architecture (CUDA) to offload the reconstruction algorithms to the GPUs, but most of the 2D algorithms can also be executed on the CPU [21]. Using the TomoPy toolbox, the algorithm described in Section 3.2.1 is implemented in Python to perform the image reconstruction. Additionally, the Astra toolbox is used in order to target the GPU platform. The GPU platform is mostly targeted in order to evaluate the potential to perform real-time 3D image reconstruction, as for the 2D reconstruction, the power of the CPU is mostly sufficient. Reconstruction times of the algorithm are shown in Figure 12. The figure shows reconstruction times using 1, 4 and 8 CPU cores, as well as reconstruction offloaded to the GPU. The hardware used in the reconstruction was 2\(\times\) Intel Xeon E5-2609 v2 CPUs and 1\(\times\) NVIDIA Tesla K40c. The time represented in the figure shows only the reconstruction time without input and output operations, which are constant for all the implementations. The benchmark was done for a 3D reconstruction using 100 slices. With these technologies, the bottle neck of the experiment is clearly not the computational part anymore. Even when, for example, a stage like the U-651 from Physik Instrumente (PI) with a maximal speed of 540 deg/s were been used, the time needed to drive the blade could be pushed below one second, still on the same order as the computation. Figure 11: Time line of density reconstruction with \(N_{a}=7\) projection measurements. The angles are chosen such that more projections are acquired in the direction parallel to the shock front, maximizing the information about the shock.