# Piston Error Measurement for Segmented Telescopes Based on a Hybrid Artificial Neural Network
## 2 Piston Error Detection Method Based on Hybrid Neural Network
### The Acquisition of Focal Plane Degradation Image  
For a segmented telescope like Keck, all of the sub-mirrors are assumed to have the same shape and be perfect without high-order aberrations, except pistons and tip-tilts. Thus, the generalized pupil function (GPF) can be shown as:  
\[P(\varepsilon,\eta)=\sum_{n=1}^{N}p_{n}(\varepsilon,\eta)\exp[i\frac{2\pi}{ \lambda}(e_{n}Z_{1}+t_{xn}Z_{2}+t_{ym}Z_{3})], \tag{1}\]  
where \(Z_{1}\), \(Z_{2}\), and \(Z_{3}\) are the first three terms of the Zernike polynomials, \(e_{n}\), \(t_{xn}\), and \(t_{yn}\) are the corresponding Zernike polynomial coefficients of the \(n\)th sub-mirror, respectively, \((\varepsilon,\eta)\) is the coordinate vector in pupil plane, \(p_{n}\) is the is the binary function of sub-aperture, and \(N\) is the total number of sub-mirrors. Based on the principle of Fourier optics, the relationship between the point spread function (_PSF_) of the system and the GPF is:  
\[PSF(x,y,\lambda)=|\Im\{P(\varepsilon,\eta)\}|^{2}, \tag{2}\]  
Figure 1: The principle of piston error detection method based on the hybrid neural network. where \((x,y)\) is the coordinate vector in the image plane, \(\lambda\) is the wavelength of input light, and \(\Im\{\cdot\}\) denotes the Fourier transform. When the input light is not monochromatic light, and is centered at \(\lambda_{0}\) with the bandwidth \(\Delta\lambda\), the \(PSF\) is defined as:  
\[PSF(x,y,\lambda_{0},\Delta\lambda)=\int_{\lambda_{0}-\frac{\Delta\lambda}{2}}^{ \lambda_{0}+\frac{\Delta\lambda}{2}}PSF(x,y,\lambda)S(\lambda)d\lambda, \tag{3}\]  
where \(S(\lambda)\) is \(PSF\) weight of different wavelengths, assuming \(S(\lambda)=1\). According to the Fourier optics principle, the focal plane degradation image of the system is the convolution of the observation object and the system \(PSF\), hence for an ideal point source observation target, the system focal plane image can be equivalent to the system multi-wavelength \(PSF\). Combined with the three formulas given above, the focal plane degradation image of the segmented telescope for a point source observation target with broadband illumination can be acquired. The following figures show the corresponding simulation results for a segmented telescope composed of two sub-pupils. Figure 2 shows the segmented optics system model. A mask with two circles was set on the exit-pupil plane of the primary mirror to fragment the pupil, so the sidelobes of the system \(MTF\) could be separated from its main peak. Furthermore, \(b\) is the distance between the center of the two circle pupils on the mask and \(d\) is the diameter of the circle pupil. We set up this optical system in MATLAB; 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 20 nm. Half of the coherent length of this input broadband light is  
\[L=\frac{L_{c}}{2}=\frac{\lambda_{0}{}^{2}}{2\Delta\lambda}=\frac{\left(632.8 \text{nm}\right)^{2}}{2\times 20\text{nm}}\approx 10\upmu\text{m}. \tag{4}\]  
The coherence length of the input broadband light determines the effective detection range of the piston error. The narrower the spectral width of the input broadband light, the longer the coherence length and the larger the piston error effective detection range of the algorithm. Thus, the effective detection range of the piston error here is [\(-\)10-10] \(\upmu\)m.  
Different piston errors are introduced to the right sub-pupil while the left sub-mirror is set as the reference mirror.