## 2 Theoretical Analysis  
### Detour Phase Cgh  
Assuming a plane wave is incident at an angle \(\alpha_{0}\) onto a grating with a grating constant \(d\), for the \(M\)-th order diffracted light at a diffraction angle \(\alpha_{M}\), the optical path difference between adjacent rays is given by:  
\[L_{M}=(\sin_{\alpha_{M}}+\sin_{\alpha_{0}})d=M\lambda \tag{1}\]  
When there is a misalignment \(p\) in the grating pitch of a certain part of the grating, the grating pitch changes from \(d\) to \(d+p\). At this point, the optical path difference of the diffracted light wave becomes:  
\[{L_{M}}^{\prime}=(\sin_{\alpha_{M}}+\sin_{\alpha_{0}})(d+p) \tag{2}\]  
Therefore, in this diffraction direction, the optical path of the plane wavefront will experience the following delay:  
\[\Delta_{M}={L_{M}}^{\prime}-L_{M}=(\sin_{\alpha_{M}}+\sin_{\alpha_{0}})p \tag{3}\]  
The corresponding phase delay is:  
\[\varphi_{M}=\frac{2\pi}{\lambda}\Delta_{M}=2\pi Mp/d \tag{4}\]  
The \(\varphi_{M}\) is referred to as the detour phase. Assume the complex amplitude distribution of the optical field on the object plane is denoted as \(\widetilde{U}(x,y)=a(x,y)\exp[j\phi(x,y)]\) and its Fourier transform spectrum as \(\widetilde{F}(u,v)=A(u,v)\exp[j\Phi(u,v)]\). To generate the CGH, sampling and quantization are performed. In the spatial domain, the sampling intervals along the \(x\)- and \(y\)-directions are \(\delta x\) and \(\delta y\), respectively, with a total sampling number of \(I\times K\). The complex field value at the sampling point (\(i\), \(k\)) is \(\widetilde{U}(i\delta x,k\delta y)\). Similarly, in the frequency domain, the corresponding sampling intervals are \(\delta u\) and \(\delta v\), with a total sampling number of \(M\times N\). The spectrum value of the complex field at the sampling point (\(m\), \(n\)) is \(\widetilde{F}(m\delta u,n\delta v)\). To ensure valid results, the sampling theorem must be satisfied, typically requiring \(I=M\) and \(K=N\). The sampled spectrum \(\widetilde{F}_{mn}=\widetilde{F}(m\delta u,n\delta v)\) is also a complex number and can be expressed as \(\widetilde{F}_{mn}=C_{mn}+jD_{mn}\), where \(C_{mn}\) and \(D_{mn}\) represent the real and imaginary parts, respectively. From this, the amplitude \(A_{mn}\) and phase \(\Phi_{mn}\) of the spectrum can be derived:  
\[A_{mn}=\sqrt{{C_{mn}}^{2}+{D_{mn}}^{2}} \tag{5}\]  
\[\Phi_{mn}=\arctan(D_{mn}/C_{mn}) \tag{6}\]  
Taking a binary Fourier transform hologram as an example, a sampling unit in Lohmann Type III detour-phase holography is illustrated in Figure 1. Within each sampling cell, the width \(W\) of the rectangular transmissive aperture is fixed, while the height \(l_{mn}\) varies with the amplitude \(A_{mn}\) at the sampling point (\(m\), \(n\)). The distance \(p_{mn}\), representing the displacement of the rectangular aperture's center from the sampling cell's center, is modulated by the phase \(\Phi_{mn}\) at the sampling point (\(m\), \(n\)). In other words, the height \(l_{mn}\) and position \(p_{mn}\) of the rectangular aperture within each cell encode the amplitude \(A_{mn}\) and phase \(\Phi_{mn}\) of the complex wavefront spectrum, respectively. From the diffraction theory of binary Fourier holograms, the relationship between the structural parameters of rectangular apertures (\(l_{mn}\), \(p_{mn}\)) and the amplitude \(A_{mn}\) and phase \(\Phi_{mn}\) of the complex wavefront spectrum can be derived:  
\[l_{mn}=k^{\prime}A_{mn} \tag{7}\]  
\[p_{mn}=M^{\prime}\Phi_{mn}/(2\pi) \tag{8}\]  
where \(k^{\prime}\) is a constant and \(M^{\prime}\) is an integer, indicating that \(l_{mn}\) and \(p_{mn}\) are proportional to the amplitude \(A_{mn}\) and phase \(\Phi_{mn}\), respectively. Figure 1: Schematic of a sampling unit in Lohmann Type III detour-phase holography. Mode Overflow Correction: When \(\Phi_{mn}>\pi/2\), the rectangular aperture of the (\(m\), \(n\)) unit overflows into the adjacent (\(m+1\), \(n\)) unit, and overlap occurs.