# Piston Error Measurement for Segmented Telescopes with an Artificial Neural Network
## 2 Theoretical Relation between the Piston Error and Amplitudes of MTF Sidelobes
### Verification of the Correctness of the Theoretical Relation by MATLAB Simulation  
In order to verify the correctness of the mathematical derivation for Equation (16), we set up an optical system in MATLAB and simulated the corresponding MTF using the MATLAB program. The simulation segmented telescope system we used here is composed of two sub-pupils with mask, as shown as Figure 1. The left sub-mirror is the reference pupil; the piston error was introduced on the right pupil. The sampling grid of the exit pupil plane was set as 256 \(\times\) 256 pixels, the pixel size of the CCD was 3.5 \(\upmu\)m and the F\({}^{\#}\) of the optical system was 8. Thus the circumscribed circle diameter of the single hexagonal sub-mirror was 59 pixels, the diameter of the circle on the mask was 18 pixels and the distance between the centers of the two circles was 52 pixels to satisfy the Nyquist sampling criterion. The central wavelength of the input broad light was 632.8 nm and its bandwidth was 1 nm. The effective detection range of the proposed method is half of the coherent length:  
\[L=\frac{L_{c}}{2}=\frac{\lambda_{0}{}^{2}}{2\Delta\lambda}=\frac{(632.8\ nm)^{2}}{2 \times 1\ nm}\approx 200\ \mu m, \tag{17}\]where \(L_{c}\) is the coherent length of the input light, the factor 1/2 is due to the input light reflection on the segmented primary mirror giving an OPD equal to twice the step between segments. Based on the set system model, different piston errors were introduced to the right sub-pupil. We first obtained the system MTF using the MATLAB program, which directly performs 2D discrete Fourier transform for the simulated CCD captured image of the point-source object. Then by taking the corresponding piston errors to Equation (16), we got the theoretical values of \(MTF_{sidobe-broad-peak}\). By comparing the theoretical calculated values from Equation (16) with the MATLAB simulation results, we verified the correctness of the theoretical formula established based on the Fourier optics principle. Figure 2 shows four sets of MTF obtained by the MATLAB program and the peak height value of the MTF sidelobe is marked in the corresponding figure, where the introduced piston errors were 0 \(\upmu\)m, 50 \(\upmu\)m, 100 \(\upmu\)m and 200 \(\upmu\)m, respectively. We took the four sets of piston errors into Equation (16), the \(n\) was set to 100 in order to make the differential summation closer to the integral, and \(N=2\). Then the calculated corresponding peak heights of the MTF sidelobe were 0.5, 0.4503, 0.3187 and 6.0708 \(\times\) 10\({}^{-4}\), respectively. We can see that the surrounding peaks of the MTF calculated by Equation (16) were the same as the results directly obtained from the MATLAB program. In order to further verify the correctness of Equation (16), 201 sets of piston errors were introduced in 1 \(\upmu\)m steps from 0 to 200 \(\upmu\)m. The peak heights of the MTF sidelobes calculated from Equation (16) and the MATLAB program are shown in Figure 3a,b. Figure 3 verifies the correctness of the theoretical relationship between the peak heights of the MTF sidelobes and the piston error shown as Equation (16). When the MTF was obtained, the piston error should have been solved by Equation (16) theoretically. However, due to the nonlinearity and complexity of Equation (16), it is difficult to calculate the piston error in a realistic segmented telescope directly. Figure 2: Modulation transfer function (MTF) of four different piston errors obtained by MATLAB simulation. (**a**) Piston error = 0 \(\upmu\)m, (**b**) piston error = 50 \(\upmu\)m, (**c**) piston error = 100 \(\upmu\)m, (**d**) piston error = 200 \(\upmu\)m.  
Note that Figure 3 only shows the positive side of the piston error. If two piston errors have the same absolute value but opposite signs, they will have the same peak heights of MTF sidelobes due to the fact that Equation (16) is a symmetrical function.