## 3 Image Reconstruction and the MIR Algorithm
### Principle of MIR Algorithm  
The main principle of these algorithms is to calculate the difference in the dielectric constant also called relative permittivity of the targeted human tissue. An array of antennas is set around the target tissue (breast or brain). The tissue is penetrated with signals and the backscattered signal are stored. In order to create the energy map of the targeted tissue, the energy value for each pixel in the imaging area is calculated and saved. Due to the distance between antennas and points, points correspond to signal shifts creating a signal delay in time. Therefore, delay values are calculated first to align the signals and get the energy for each pixel. The input signals are then processed to find out the location and size of malignant tissue. The position of maligned tissue is located by analyzing the energy level for all pixels based on the difference in dielectric properties of healthy and malignant tissue. Figure 1 illustrates the basic principle of the MIST beam-forming for a single focal point in the imaged object. The backscattered signals received on each antenna for a single focal point are time aligned and summed together to get the energy. The process is repeated for total number of points to create an image. To produce the energy map, the amplitude of backscattered signals is calculated for all pixels. In order to make sure that all the signals summed properly, delay shift values for all pixels are calculated. Since delay shift values are proportional to the distance between antennas and imaging points, the distance between antenna and pixel therefore needs to be calculated first. This depends on the total number of antennas and stored input points. The distance is calculated using the equation below [47]. \[\tau_{n}(\overrightarrow{r})=\frac{\sqrt{(x-x_{o})^{2}+(y-y_{o})^{2}}*N}{d}, \tag{1}\]  
where \(x\) and \(y\) are the \(x\), \(y\) coordinates of antennas, \(x_{o}\) and \(y_{o}\) are the position of pixel in the imaged tissue in Cartesian coordinates, \(\tau_{n}\) is the propagation time of signal \(n\), \(\overrightarrow{r}\) is the focal point in the imaging object, \(d\) is the diameter, and \(N\) represents the total number of input points. Then, the intensity values are calculated as:  
\[I\left[n\right]=\left|\sum_{i=1}^{N}A_{n}\left(\tau_{n}\left(\overrightarrow{r }\right)\right)\right|^{2}, \tag{2}\]  
where \(A_{n}\) represents the signal of antenna \(A\) at location \(n\). Algorithm 1 gives the pseudo-code for sequential Python-based implementation of the MIR algorithm. The algorithm first read sensors data and antenna's location in order to compute delay and pixel values. Two loops are used to get delay shift values for each signal based on all antennas. The loop is repeated to compute the matrix of pixels. The body of the loop is based on Equation (1). The number of delay shift samples is calculated by multiplying the total number of samples. Finally, delay shift values are stored and used to calculate the final values of energy. Figure 1: Microwave imaging via space-time (MIST) beam-forming process for a focal point. \(S_{1}\), \(S_{2}\), and \(S_{3}\) are backscattered signal. These signals are first time shifted and then summed together to find the energy for the specified focal point.