Significance Twophoton microscopy (TPM) has been widely used in biological imaging owing to its submicron lateral resolution, intrinsic optical sectioning, and deep penetration abilities. TPM enables the observation of cellular and subcellular dynamics in deep live tissues within highly complex and heterogeneous environments such as the mammalian brain, thereby providing critical in situ and