## 2 Theory
### Wavefront Propagation  
To simulate the propagation of the diffracted wavefront from the displaced object plane \((x_{0},y_{0})\) to the plane \((x_{1},y_{1})\), at a distance \(\Delta z_{o}\), we used the Rayleigh-Sommerfeld diffraction equation [26]:  
\[u_{o}(x_{1},y_{1})\ =\ \iint U\big{(}f_{x0},f_{y0}\big{)}\exp\Bigg{\{}\frac{i2\pi \Delta z_{o}}{\lambda}\sqrt{\Big{[}1-\lambda^{2}\Big{(}f_{x0}^{2}+f_{y0}^{2} \Big{)}\Big{]}}\Bigg{\}}\exp\big{[}i2\pi\big{(}f_{x0}x_{1}+f_{y0}y_{1}\big{)} \big{]}df_{x0}df_{y0}, \tag{19}\]  
where \(U\big{(}f_{x0},f_{y0}\big{)}\) is the numerical Fourier transform of the distribution of transmittance of the object, \(u(x_{0},y_{0})\):  
\[U\big{(}f_{x0},f_{y0}\big{)}\ =\ \iint\limits_{-\infty}^{\infty}u(x_{0},y_{0}) \exp\big{[}-i2\pi\big{(}x_{0}f_{x0}+y_{0}f_{y0}\big{)}\big{]}dx_{0}dy_{0}, \tag{20}\]  
Note that, according to the Shannon theorem [24], to implement Equation (19), the distance between the object and the propagated plane should verify \(\Delta z_{0}\leq N_{pix}\delta x^{2}/\lambda\) where \(\delta\)x is the sensor's pixel pitch, \(N_{pix}\) is the number of pixels, and \(\lambda\) is the illuminating wavelength. Finally, we also analyze the optimal reconstruction distance for the magnified and focused image, which is determined by evaluating the sparsity of the reconstructed image \(u_{r}(x_{r},y_{r})\). In this study, three criteria were employed to this aim: the Tamura coefficient, the Gini Index, and entropy. For each measurement, the image was reconstructed at various distances, \(\Delta z_{r}\), until reaching a maximum or minimum value in the sparsity image criteria, which corresponds to the distance of the best focused image. The Tamura coefficient (TC) is calculated based on the mean value \(\overline{u}_{r}\) and standard deviation \(\sigma(u_{r})\) of the pixels in the reconstructed image \(u_{r}(x_{r},y_{r})\), as given by the following equation [27; 28]:  
\[\mathrm{TC}(z_{r})\ =\ \sqrt{\frac{\sigma(u_{r})}{\overline{u}_{r}}}. \tag{21}\]  
At the best focused distance, the standard deviation and the Tamura coefficient values have their minimum value. However, for other reconstruction distances, \(\Delta z_{r}\), both the standard deviation and TC values increase. The Gini Index (GI) is a measure of the sparsity level of the grey levels in the image [29; 30]. On the one hand, when the image intensity is concentrated in a small region (few pixels), the GI value increases. On the other hand, when the intensity is sparse throughout the whole image, the GI value decreases. The Gini Index is calculated using the following equation:  
\[\mathrm{GI}\Big{(}\underline{f}\Big{)}\ =\ 1-2\sum_{k\ =\ 1}^{N}\frac{f_{k}}{ \left\|\underline{f}\right\|_{p}\ =\ 1}\Bigg{(}\frac{N-k+\frac{1}{2}}{N}\Bigg{)}, \tag{22}\]  
where \(f\) is a vector containing the intensity values of the image pixels, arranged in ascending order \(\overline{f}\) from the least to the greatest values \(\underline{f}\ =\ [f(1),\ldots f(N)]\), and \(\left\|f\right\|_{p}\ =\ \sqrt[f(1)]^{p}\ +\ldots+\left|f(N)\right|^{p}\) is the norm. The entropy criterion (Ent) measures the level of randomness in an image. The entropy is calculated based on the image histogram, which represents the occurrence frequency of different grey levels present in the image [31]. When the image is focused, the randomness of the pixel values is minimized. Conversely, in a defocused image, the randomness of the pixel values increases. The entropy of an image is calculated as follows:  
\[\mathrm{Ent}\ =\ -\sum_{n\ =\ 1}^{N}P_{n}\mathrm{log}\ P_{n}, \tag{23}\]where \(P_{n}\) represents the number of pixels with grey level \(n\). In this case, the minimum value of the entropy indicates the optimal focused distance \(\Delta z_{r}\). In each measurement, the image is reconstructed at several propagation distances, \(\Delta z_{r}\), around the theoretical reconstruction image \(\Delta z_{r}\ =\ \mathrm{M_{L}}\Delta z_{o}\).