# Piston Error Measurement for Segmented Telescopes with an Artificial Neural Network
## 2 Theoretical Relation between the Piston Error and Amplitudes of MTF Sidelobes
### Establishing the Theoretical Relationship Based on Fourier Optics Principle  
In order to simplify the theoretical derivation process, we used a primary mirror composed of two hexagonal segments as the optics system model shown in Figure 1. In order to separate the sidelobes of the MTF from the main peak, a mask with two circles was set on the exit-pupil plane of the primary mirror to fragment the pupil. If \(p\) is the piston error between the two segments, the generalized pupil function (GPF) can be written as:  
\[G(x,y)=A(x,y)\bigg{[}circ\bigg{(}\frac{x-b/2,y}{d/2}\bigg{)}\cdot e^{i\phi_{1}} +circ\bigg{(}\frac{x+b/2,y}{d/2}\bigg{)}\cdot e^{i\phi_{2}}\bigg{]}, \tag{1}\]  
where \((x,y)\) is the coordinate vector of the pupil plane, \(b\) is the distance between the center of the two circle pupils on the mask, \(d\) is the diameter of the circle pupil, \(\lambda\) is the observation wavelength, \(circ()\) stands for circle function, the phase difference between the two segments is \(\Delta\phi=\phi_{1}-\phi_{2}=\frac{2\pi}{\lambda}2p\), here we set \(\phi_{1}=\frac{2\pi}{\lambda}p\) and \(\phi_{2}=-\frac{2\pi}{\lambda}p\) to facilitate the following calculations. \(A(x,y)\) is the binary shape function of the hexagon segment which is shown as:  
\[A(x,y)=\  
We performed Fourier transform for the GPF, and based on the properties of Fourier transform we can derive the following equation:  
\[\Im\{G(x,y)\}=\frac{d}{2}\Bigg{[}\frac{J_{1}(\pi d\sqrt{u^{2}+v^{2}})}{\sqrt{u^{ 2}+v^{2}}}\Bigg{]}\cdot\Big{(}e^{i(\frac{\pi}{2}2p-\pi ub)}+e^{-i(\frac{\pi}{ 2}2p-\pi ub)}\Big{)}, \tag{3}\]  
where \((u,v)\) is the coordinate vector of the image plane, \(\Im\{\}\) stands for Fourier transform operation, \(J_{1}\{\}\) is first order Bessel function. Based on the Fourier optics, the point spread function (PSF) of the system is the squared modulus of the Fourier transform of the GPF which is given by:  
\[ \begin{split} PSF(u,v)=|\Im\{G(x,y)\}|^{2}&=(d/2)^{ 2}\bigg{|}\bigg{[}\frac{J_{1}(\pi d\sqrt{u^{2}+v^{2}})}{\sqrt{u^{2}+v^{2}}} \bigg{]}\cdot\Big{(}e^{i(\frac{\pi}{2}2p-\pi ub)}+e^{-i(\frac{\pi}{2}2p-\pi ub )}\Big{)}\bigg{|}^{2}\\ &=2\frac{(d/2)^{2}J_{1}^{2}(\pi d\sqrt{u^{2}+v^{2}})}{u^{2}+v^{2} }[1+\cos\big{(}\frac{2\pi}{\lambda}2p-2\pi ub\big{)}\big{]}.\end{split}  \tag{4}\]  
From Equation (4), we can see that the PSF includes two parts: the diffraction part and the interference part. \(\frac{(d/2)^{2}J_{1}(\pi d\sqrt{u^{2}+v^{2}})}{u^{2}+v^{2}}\) is the diffraction intensity of the single circle aperture; the coefficient 2 means the diffraction part is simple superposition formed by the two single circle apertures' diffraction. \(\big{[}1+\cos\big{(}\frac{2\pi}{\lambda}2p-2\pi ub\big{)}\big{]}\) is the interference part which is coherent superposition formed by the sub-waves sampled by the two single circle apertures. As we can see, the piston error is included in the interference part. When the observed target is a point source, the image obtained on the focal plane can be simplified as the PSF of the system, thus the piston error between segments is included in the CCD captured image. According to the interference principle, the interference factor will disappear when the piston error exceeds the coherence length of the light used in the optical imaging system, then the intensity distribution on the image plane becomes the simple superposition of the two sub-pupils' diffraction. Hence, the capture range of the piston error is limited by the coherence length of the input light. Based on Fourier optics, the OTF is the 2D Fourier transform of the PSF shown as:  
\[OTF(f_{x},f_{y})=\Im\{PSF(u,v)\}, \tag{5}\]  
where \((f_{x},f_{y})\) is the spatial frequency in the \(x\) and \(y\) directions, respectively.