## 4 Conclusions  
In this paper, two-photon excitation microscopy systems combined with AO using TPGB and TPBB as illumination beams are simulated. The effects of each single Zernike mode and random biological aberration to TPGB and TPBB are investigated and compared.  
Firstly, aberrations induced by samples will make the illumination beam thicker than the ideal situation, and lower-order Zernike modes generally have greater effects on the thickness than higher-order modes. TPGB is more sensitive to the Zernike modes with a lower azimuthal order (\(\,\mathrm{I}\,\mathrm{m}\,\mathrm{|}\,\leq 4\)), while TPBB is more sensitive to the Zernike modes with a higher azimuthal order (\(\,\mathrm{n}-\,\mathrm{I}\,\mathrm{m}\,\mathrm{|}\,\leq 4\)). Secondly, because of the'self-reconstruction' property, the relationship between thickness of TPBB and the amplitude of wavefront aberration is not monotonically or linearly increasing like TPGB. When the aberration is larger than a certain value, the thickness may not increase anymore, or it may even decrease. Finally, the number of Zernike modes that need to be corrected under different aberration situations is given. For small aberrations (RMS \(\leq 0.1\lambda\)), the first 14 modes should be corrected; for moderate aberrations (RMS \(\leq 0.3\lambda\)), the first 35 modes should be  
Figure 10: TR of different RMS of the initial random aberration varying with the number of corrected Zernike modes for **(a)** TPGB and **(b)** TPBB.  
corrected; and for large aberrations (RMS \(\geq\) 0.3\(\lambda\)), more than 50 modes should be corrected. These results will contribute to the design of AO systems and the performance evaluation of microscopy systems. On the basis of the above conclusions, it is necessary to further explore a kind of filter function to correct different Zernike modes with different weights for different illumination beams in order to maximize the correction capability of the corrector and reduce the correction errors for those insensitive Zernike modes. We will study this in the future.  
One of the main purposes of this article is to present a simulation method for two-photon excitation microscopes. With this method, we could simulate the practical optical system and calculate the intensity and phase at planes conjugated to WFS, SLM and other vital devices using Fourier angular spectrum diffraction theorem and Fresnel diffraction. Then, we could analyze the changes in system performance caused by various factors, such as aberrations. This method is not restricted to analyzing the thickness of TPGB and TPBB. It is a universal method to simulate and analyze the effects of aberrations to one- or multi-photon Gaussian beams, Bessel beams, Airy beams and so on.  
Conceptualization, N.L.; Data Curation, N.L. and X.Z.; Formal Analysis, N.L.; Funding Acquisition, Q.B. and X.Z.; Investigation, N.L. and F.L.; Methodology, N.L.; Project Administration, Q.M.; Resources, N.L. and X.Z.; Software, N.L. and X.Z.; Supervision, C.Y., Z.P., L.X. and Q.M.; Validation, F.L. and Q.M.; Visualization, N.L.; Writing--Original Draft, N.L.; Writing--Review and Editing, N.L., Q.M. and X.Z. All authors have read and agreed to the published version of the manuscript.  
The research was funded by the Scientific Instrument Developing Project of the Chinese Academy of Sciences, grant number YJKYYQ20210037, the Science and Technology Development Program of Changchun, and the Natural Science Foundation of the Jilin Province Department of Education, grant number JJKH2022083 KJ.  
Not applicable.  
The data that support the findings of this study are available from the corresponding author upon reasonable request.  
[PERSON] thanks the CAS Interdisciplinary Innovation Team for support for this work.  
The authors declare no conflict of interest.