Adaptive optics enables aberration-free single-objective remote focusing for two-photon fluorescence microscopy.

Two-photon fluorescence microscopy has been widely applied to three-dimensional (3D) imaging of complex samples. Remote focusing by controlling the divergence of excitation light is a common approach to scanning the focus axially. However, microscope objectives induce distortion to the wavefront of non-collimated excitation beams, leading to degraded imaging quality away from the natural focal plane. In this paper, using a liquid-crystal spatial light modulator to control the divergence of the excitation beam through a single objective, we systematically characterized the aberrations introduced by divergence control through microscope objectives of NA 0.45, 0.8, and 1.05. We used adaptive optics to correct the divergence-induced-aberrations and maintain diffraction-limited focal quality over up to 800-µm axial range. We further demonstrated aberration-free remote focusing for in vivo imaging of neurites and synapses in the mouse brain.


Introduction
Two-photon fluorescence microscopy (2PFM) [1] is based on nonlinear excitation that confines the fluorescence signal generation to a small region about the focal point. Scanning the focal point in two dimensions (2D) with a pair of optical scanners and recording fluorescence signal in each position with a photon detector (typically, a photomultiplier tube), 2PFM selectively images fluorophore molecules in the focal plane, therefore optically sections three-dimensional (3D) samples. Capable of imaging through scattering and opaque tissues [2], it has been widely applied to 3D imaging of complex samples both in vitro and in vivo. For typical 3D imaging, the excitation focus is shifted axially relative to the sample by translation of the microscope objective and a 2D image is acquired at each axial position. Capable of achieving sub-second volumetric imaging speeds over axial ranges of tens of microns, this approach is nevertheless limited by inertia of the objective lens [3]. An alternative method to axially scan the laser focus is by controlling the divergence of excitation light, which avoids the temporal delay due to inertia from objective motion between successive 2D scans. Variable-focus lenses such as electrically tunable lenses [4] and ultrasound lenses [5] are commonly employed, where the shape or refractive index distribution of the lens is varied to control beam divergence of the transmitted light. Another type of devices are deformable mirrors (DM) and liquid-crystal spatial light modulators (SLM), which vary the beam divergence by spatially modulating the wavefront of the reflected light waves [6,7]. Acousto-optical deflectors have also been used to control beam divergence and can allow random access 2PFM in 3D [8,9].
For high-resolution imaging, however, all of the above remote focusing methods suffer from the fact that microscope objectives are designed to have optimal imaging performance for light of specific divergence. For example, infinity-corrected microscope objectives used for 2PFM only form diffraction-limited excitation focus for collimated beams. As a result, changing the beam divergence induces distortion to the excitation wavefront, leading to an aberrated focus and degraded image quality away from the natural focal plane [6,[10][11][12]. Botcherby et al. [13][14][15] proposed a two-objective remote focusing approach to avoid this issue by passing the excitation light through two objectives so that their divergence-induced aberrations cancel each other. However, incorporating another objective substantially decreases power efficiency. A more power-efficient way to maintain focal quality during remote focusing is by using a single objective while directly measuring and correcting the aberrations using adaptive optics (AO) [16]. Previously, AO has been applied to point-scanning 2PFM in the context of single-objective remote focusing using a modal-based aberration measurement method [17], where minimal and moderate improvements in image quality were observed for objectives of 0.45 numerical aperture (NA) and 0.65 NA, respectively. For high-resolution imaging applications where subcellular features such as synapses need to be resolved, higher-NA objectives are required. In this work, using a zonal wavefront measurement method, we systematically characterized the aberrations introduced to excitation light via divergence-based remote focusing through microscope objectives of NA 0.45, 0.8, and 1.05. We found that with the increase of excitation NA, defocusing wavefronts of increasingly large amplitudes were required to generate the same amount of axial focal shift, and introduced more severe degradation of image quality. We used AO to fully correct the aberrations induced by beam divergence and achieved diffraction-limited imaging performance for axial ranges of up to 800 µm. We further demonstrated aberration-free remote focusing for in vivo imaging of neurites and synapses in the mouse brain.

Remote focusing and AO 2PFM
The schematic of our two-photon fluorescence microscope was described previously [19] ( Fig. 1(a)). In order to achieve the desired excitation NA, a motorized variable beam expander (model 56c-30-2-8x; Special Optics) was used to control the beam size of the collimated 920-nm output from a femtosecond laser (Insight DeepSee; Newport). Two-dimensional raster scanning in the focal plane was carried out by a pair of galvanometer scanners (6210H; Cambridge Technology) optically conjugated by two telecentric f-θ lenses (focal length: 30 mm; Special Optics). The galvos were further conjugated to a reflective liquid-crystal SLM (512×512 Spatial Light Modulator, HSP512; Meadowlark Optics) with a telecentric f-θ lens pair (focal length: 30 mm and 150 mm; Special Optics). The SLM was conjugated to the rear pupil plane of the microscope objective with another telecentric f-θ lens pair (focal length: 120 mm and 240 mm; Special Optics), with the divergence of the excitation beam and the axial focal position controlled by the phase pattern applied on the SLM ( Fig. 1(b)). By varying the phase pattern on the SLM, the excitation focus was shifted upwards or downwards along the optical axis of the objective without translating the objective or the sample stage. Three microscope objectives, a 25× 1.05-NA objective (Olympus), a 16× 0.8-NA objective (Nikon), and a 10× 0.45-NA objective (Nikon), were used, respectively, with the variable beam expander set to overfill their rear pupil.
Under sine condition, we derived the remote-focusing (RF) phase pattern ("RF pattern") required to shift the focus by z relative to the natural focal plane of a collimated beam [18]: where n is the refractive index of the immersion medium, k is the wave vector of the laser beam, f is the focal length of the objective, z is the desired focus shift, M is the magnification from the SLM to the rear pupil, and r is the radial coordinate on the SLM. To check the effectiveness of the RF pattern, we performed a simulation using a vector diffraction model [20] to calculate the point spread function (PSF) with the RF pattern applied at the rear pupil. It successfully directed the focus to the designed axial position and maintained the intensity and resolution at the shifted focus. We also tested the performance of the second term in the expanded expression of the RF pattern, which was the Zernike defocus term commonly used for remote focusing in lower NA systems [17,21]. In simulation, the Zernike defocus term led to substantial PSF degradation especially at high NA. For both the RF pattern and the Zernike defocus pattern, infinity-corrected microscope objectives introduce extra aberrations, which need to be measured and removed to recover diffraction-limited resolution. We used the same SLM for the measurement and correction of the divergence-induced aberrations via an indirect wavefront sensing method based on pupil segmentation [19]. Aberrations of the microscope system without the introduction of RF pattern were corrected prior to all experiments using the same method. We first focused the collimated excitation beam on a 2-µm-diameter fluorescent bead. We then displayed a RF pattern (for the 1.05-NA objective) or a Zernike defocus pattern (for the 0.8-and 0.45-NA objectives) on the SLM which shifted the focus to within 1 µm of the designed axial position. Next, we moved the sample stage along the optical axis to refocus the bead. To measure the aberrations, we illuminated 1/25 of the pupil area at a time and recorded the bead image. Neighboring illuminated pupil segments had 50% overlap, resulting in 81 total bead images after all pupil segments were illuminated. Aberrations introduced a non-zero phase gradient for each wavefront segment, which led to a lateral focal shift and therefore a displacement of the bead image. From the ratio of the image displacement and the focal length of the objective, we obtained the phase gradient for each segment and determined the phase slope on the SLM required to move the focus of each wavefront segment back to the same position. A zonal wavefront reconstruction algorithm [22] was then used to calculate the corrective wavefront from the phase slopes. We then overlaid the corrective wavefront on the RF or the Zernike defocus pattern to achieve aberration-free remote focusing.

Mouse sample preparation and in vivo imaging
Thy1-GFP line M and wild-type mice were used for in vivo imaging, after recovering from virus injection (only for wild-type mouse) and cranial window implantation [23]. Mice were given the analgesic buprenorphine subcutaneously (0.3 mg per kg of body weight) at the start of surgery and anesthetized with 1-2% isoflurane by volume in O 2 throughout the length of the surgery. A 3-mm craniotomy was performed over the primary visual cortex. Virus injection was performed using a glass pipette beveled at 45°with a 15-20-µm opening and back-filled with mineral oil. A hydraulic manipulator (MO10; Narishige) controlled a fitted plunger, which was inserted into the pipette and used to load and inject the viral solution into the cortex 350 µm below pia. 30 nL of 3×10 13 GC/mL of AAV2/1-syn-GCaMP6s was injected at every injection site. 2-µm-diameter fluorescent microspheres (F-8826; Invitrogen) diluted in saline were then applied on the cortical surface for later measurement of aberrations. A cranial window made of a single glass coverslip (No. 1.5; Fisher Scientific) was embedded in the craniotomy and sealed in place with Vetbond (Vetbond; 3M). We then attached a titanium headpost to the skull with cyanoacrylate glue and dental acrylic. In vivo imaging was performed 2-4 weeks after virus injection, with the mice head-fixed and under deep anesthesia.

3.1.
Aberration-free single-objective remote focusing through 1.05-NA, 0.8-NA, and 0.45-NA microscope objectives We first carried out aberration-free remote focusing 2PFM through a 1.05-NA water-dipping objective ( Fig. 1(c)-(g)). Applying a series of RF patterns to the SLM, we generated up to ±80 µm axial focal shifts (∆z) and observed increasing degradation in image resolution and brightness. Under the same post-objective excitation power, at −80 µm and +80 µm focal shifts, the brightness of a 2-µm-diameter bead decreased by 7.6× and 8.9×, respectively, with a concurrent increase in its axial full width at half maximum (FWHM) (Fig. 1(c)), indicative of degradation in axial resolution. With the corrective wavefront applied, the brightness of the bead at −80 µm and +80 µm focal shifts increased by 2.8× and 3.7×, respectively, and its axial FWHM became substantially smaller ( Fig. 1(d)). As expected, larger axial shifts by the RF pattern were accompanied by stronger aberrations and lower fluorescence brightness ( Fig. 1(e), red), and benefitted from greater signal recovery after aberration correction ( Fig. 1(e), green). Because axial resolution is more sensitive to the presence of aberrations, we observed minimal changes in the lateral FWHM ( Fig. 1(f)) but increasingly severe degradation of axial FWHM of the 2-µm-diameter bead with increasing focal shift ( Fig. 1(g), red). AO correction substantially decreased axial FWHM to values close to that at the natural focal plane ( Fig. 1(g), blue). We also tested the performance of single-objective remote focusing and AO on a 0.8-NA water-dipping objective and a 0.45-NA air objective (Fig. 2). Here, because the excitation NA was smaller, instead of applying the RF pattern to the SLM, we used Zernike defocus patterns for axial scanning over larger ranges (±200 µm for 0.8-NA and ±400 µm for 0.45-NA objectives, respectively). Similar to the 1.05-NA objective, larger axial shifts by Zernike defocus pattern led to more severe degradation in the signal and axial profiles of 2-µm-diameter beads (Fig. 2(c) and 2(g)). At −200 µm and +200 µm focal shifts, the brightness of a 2-µm-diameter bead imaged by the 0.8-NA objective decreased by 7.3× and 8.3×, respectively ( Fig. 2(a)). At −400 µm and +400 µm focal shifts, the brightness of a 2-µm-diameter bead imaged by the 0.45-NA objective decreased by 6.9× and 8.6×, respectively ( Fig. 2(e)). Aberration correction with AO led to larger improvement in fluorescence signal at larger z displacement ( Fig. 2(b), 2(c) and 2(f), 2(g)). Similar trends were observed in the axial FWHMs, where AO correction reduced the axial FWHM to close to that at the natural focal plane for both objectives (Fig. 2(d) and 2(h)).

Lack of full recovery of imaging performance was caused by lower efficiency of the SLM at larger focal shifts
Comparing the remote focusing performance through all three objectives, we found that, with the increase of NA, defocusing wavefronts of increasingly large amplitudes were required for the same axial focal shift and led to more severe image degradation. Consistently across all three objectives, we found that AO correction of the divergence-induced aberrations did not fully recover the brightness and resolution at the natural focal plane, even though the measured post-objective power were the same. At the largest focal shifts, even with AO correction, remote focusing still led to decrease of bead fluorescence signal and slight degradation of their axial profiles. We carried out a series of experiments to investigate what the source for the signal and resolution degradation was. First, we tested whether the imaging performance degradation arose from residual aberrations. With our indirect wavefront sensing method based on pupil segmentation [19], the corrective wavefront was composed of wavefront segments with constant phase slopes. A phase reconstruction algorithm [22] was used to compute the final corrective wavefront based on these slopes. We have found previously that for aberrations of very large magnitudes, uncorrected residual aberrations may lead to less-than-100% recovery of fluorescence signal [24]. To test whether the current method was able to fully correct the divergence-induced aberrations, we fit the aberrations measured at the largest focal shifts for all three objectives (opposite of the corrective wavefronts in Figs. 1(d), 2(b), 2(f)) with Zernike modes, and then displayed them on the SLM. These aberrations reduced signal strength but did not shift the images of 2-µm-diameter beads away from the natural focal plane (Figs. 3(a,c,e)). For all three objectives, our AO method was able to completely recover the signal and axial image of 2-µm-diameter beads (Figs. 3(b,d,f)). These measurements indicated that the signal and resolution decreases observed at large focal shifts were not caused by residual aberrations, and that our AO method was capable of fully reversing the effect of divergence-induced aberrations.
Comparing Figs. 3(a,c,e) with Fig. 1(c) and Figs. 2(a,e), we noticed that displaying the divergence-induced aberrations alone on the SLM did not decrease the bead signal as much as when the RF or Zernike defocus patterns were applied. This observation provided further evidence that part of the signal drop observed in Fig. 1(c) and Figs. 2(a,e) did not arise from optical aberrations and thus could not be recovered by AO. Since the only difference in these two cases was that in the latter case, a defocus pattern was applied to the SLM, we thus investigated how the application of such a defocus pattern reduced excitation efficiency via a mechanism that was not related to optical aberration.
Unlike deformable mirrors where the physical deformation of mirror surface leads to ∼100% wavefront modulation for the reflected light, liquid-crystal SLMs do not have 100% efficiency. When we applied defocus patterns, in addition to the shifted "real" focus, a portion of the excitation light did not pick up the defocus modulation on its wavefront and this unmodulated beam formed a "ghost" focus at the natural focal plane (Fig. 4(a)). To prevent the ghost focus from interfering with the phase-modulated focus, in all wavefront modulation experiments involving a SLM (e.g., aberration measurement and correction during AO), we applied a global phase gradient to the entire SLM to shift the modulated focus away from the ghost focus ( Fig. 4(b)). When using the SLM to shift the focus axially, we overlaid the defocus pattern with the global phase ramp. At nonzero defocus, the ghost focus was displaced from the modulated focus (the "real" focus) both laterally and axially (Fig. 4(c)). When applying all phase patterns, because liquid-crystal SLMs were designed to generate 2π phase shift, we wrapped any phase pattern with peak-to-valley value larger than 2π to [0, 2π] before displaying them on the SLM (Figs. 4(a-c)).
Using phase patterns that were overlays of RF and global ramp patterns, we acquired images of 2-µm-diameter beads excited by the ghost and real foci (Fig. 4(c)), respectively, at different focal shifts with the 25× 1.05-NA objective. Comparing the fluorescence signals of the real image and ghost image of the bead (Fig. 4(d)), we found more excitation energy became unmodulated at larger axial focal shifts, indicating that at constant post-objective power, less energy was deposited to the modulated focus and led to a decrease of fluorescence signal. Same trend was observed for the 16× 0.8-NA and 10× 0.45-NA objectives. This explained why AO did not fully recover the signal strength at large focal shifts.
We speculated that the decrease of modulation efficiency at larger defocus was caused by phase wrapping. The rapid changes in gray levels for SLM pixels abutting the phase wrapping borders reflected large voltage differences between these neighboring pixels, which caused strong crosstalk, also known as fringing field effect, and resulted in phase deviations [25,26]. Larger defocus patterns led to more frequent phase wrapping on the SLM and thus less efficient wavefront modulation. To verify this effect in our system, we applied a global phase ramp to the entire SLM, which after phase wrapping appeared as a blazed grating (Fig. 4(b)), and acquired images of 2-µm-diameter beads excited by the ghost and the real foci, respectively. With the increase of phase gradient, the ghost image formed by the undiffracted light appeared at the same position, while the real images showed up at increasing lateral displacements. The signal ratio between the real and the ghost images, as expected, decreased with increasing gradient (Fig. 4(e)), supporting our conclusion that the SLM became less efficient as larger focal shifts due to larger number of phase wraps.
In addition to causing signal drop, less efficient diffraction at large phase gradients by the SLM also explained the enlargement of axial profiles in the AO-corrected bead images at large focal shifts. Because phase gradient increases towards the edge of the pupil, marginal rays were less efficiently delivered to the focus than central rays. The reduction in marginal ray energy therefore led to a decrease of the effective excitation NA.

Single-objective remote focusing for 3D in vivo brain imaging
We applied this single-objective remote focusing approach for 3D imaging of the mouse brain in vivo. In the first example, we imaged the cortex of a mouse with neurons expressing the fluorescent protein GCaMP6s [27] using the 0.8-NA objective (Fig. 5). In order to measure the wavefront distortion caused by beam divergence alone, we placed a 2-µm-diameter fluorescent bead on top of dura under the cranial window during surgical preparation. With the bead at the natural focal plane using collimated excitation light, we measured and corrected the aberrations introduced by the cranial window. We then followed the same procedure as in 2.1 to obtain corrective wavefronts for up to ±200 µm axial focal shifts using the same bead. Setting the natural focal plane (∆z=0) at 230 µm below dura, we acquired images of neurons from 30 µm (∆z=−200 µm) to 430 µm (∆z=200 µm) below dura with varying Zernike defocus patterns every 50 µm in depth (Fig. 5). At each axial position, images were acquired both without and with correction for divergence-induced aberrations (Fig. 5(a)). Substantial increases of fluorescent signal and contrast were observed for both fine neurites (insets, Fig. 5(a); upper panels, Fig. 5(b)) and neuronal cell bodies (lower panels, Fig. 5(b)) at focal displacement of 100 µm and above.
Larger improvements were observed for neurites than for cell bodies, consistent with previous observations that images of smaller structures are more degraded by aberrations [28]. We also tested the performance of aberration-free single-objective remote focusing on imaging synaptic terminals such as dendritic spines and axonal boutons in vivo with a high-NA objective. Using the 1.05-NA objective, we imaged GFP-expressing cortical neurons through the cranial window in a Thy1-GFP line M mouse. Setting the natural focal plane (∆z=0) at 75 µm below dura, we acquired images of neurons from 5 µm (∆z=−70 µm) to 145 µm (∆z=70 µm) below dura with varying RF patterns every 1 µm in depth. Instead of measuring corrective patterns every 1-µm focal shift, which would be time-consuming, we obtained corrective patterns every 20 µm using a 2-µm-diameter fluorescent bead on dura and interpolated from them corrective patterns every 1 µm. We came up with two algorithms for interpolation (see Ref. [29] for more details of the code). In a modal approach [30][31][32], we fit the measured corrective wavefronts with and obtained the coefficients for the first 45 Zernike modes. We then fit the two coefficients for each mode measured 20 µm apart with a linear function and interpolated the corresponding coefficient value for the desired focal shift. The corrective wavefront was then calculated from these coefficients. In a zonal approach based on the aberration measurement method described in 2.1, where 81 phase gradients were measured for each corrective wavefront, we linearly fit the corresponding phase gradient values for the two corrective wavefronts measured 20 µm apart and interpolated the phase gradient values for the desired focal shift. The 81 interpolated phase gradient values were then used to calculate the final corrective wavefront. For images presented in Fig. 6(a), the zonal approach was used for interpolation. Due to the sparse fluorescence labeling in the Thy1-GFP line M mouse cortex, we plotted the maximal intensity projections of image stacks to facilitate the visualization of synaptic terminals (Fig. 6). At focal shifts of a few tens of microns, the aberrations introduced by the 1.05-NA objective were already large enough to cause easily perceived differences in signal and resolution for images of synapses (zoomed-in views, Fig. 6(a)). Applying corrective patterns substantially improved image quality and increased the brightness of synapses by up to 2.3×. As expected, larger improvements were observed at larger focal shifts. At largest focal shifts, the improvement in resolution can be appreciated even in the lateral xy images (e.g., leftmost and rightmost zoomed-in views, Fig. 6(a)).

Discussion
Shifting focal plane by controlling the divergence of image-forming light has become a popular method for volumetric imaging in microscopy. Even though it is widely appreciated that such a divergence-based approach can reduce image quality, a systematic characterization over large focal shift ranges, especially at high NA, had not been carried out. Here, we characterized how divergence-based single-objective remote focusing degraded image quality of 2PFM for microscope objectives of NA 0.45, 0.8, and 1.05. For all microscope objectives, image quality, as measured from 2-µm-diameter fluorescent beads, degraded with axial shift away from the natural focal plane. This effect became more severe with the increase of NA. For the 0.45-NA objective, it took 400 µm of focal shift for the signal to drop below 15% of the value at natural focus. In contrast, it took 200 µm of focal shift through the 0.8-NA and 80 µm of focal shift through the 1.05-NA objectives for similar amount of signal drop. Our results suggest that when designing a divergence-based single-objective remote focusing system, a compromise between the achievable axial shift range and the desired NA for the image-forming light exists and needs to be considered explicitly to reach the optimal combination of imaging volume and resolution.
AO has been widely used to correct optical aberrations originating from both microscopy systems and samples. Here, we demonstrated that AO can fully correct the aberrations introduced by divergence. Consistently across all three objectives, correcting aberrations associated with divergence increased the signal and improved resolution of the 2PFM images, but it did not fully recover the fluorescence signal or resolution observed at the natural focal plane. Instead of uncorrected residual aberrations, this lack of 100% recovery was because pixel crosstalk decreased SLM efficiency with increasing defocus, leading to smaller fraction of energy being delivered to focus further away from the natural focal plane. This poses an ultimate limit on SLM-based remote focusing even for microscope systems equipped with AO. For the same focal shifts, higher-NA system required defocus patterns with larger phase gradients and suffered more severe reduction in SLM efficiency and the resulting drop in signal and resolution. To improve the performance of liquid-crystal-SLM-based axial scanning system, methods compensating for pixel crosstalk can be applied to improve SLM efficiency [25,26]. Everything else being equal, a SLM with higher pixel counts should give superior performance. Alternatively, a deformable mirror can be used to generate remote focusing as well as correct its associated aberrations.
Given that arbitrary values may be chosen for focal shifts during image collection, we came up with two interpolation approaches based on Zernike decomposition and phase gradient analysis, respectively. We thereby only needed to measure the corrective wavefronts at several focal shift positions, from which we could calculate the corrective wavefronts for all other focal shift positions on demand. Given that the divergence-induced aberrations should remain unchanged for each microscope objective, the same set of corrective patterns only need to be acquired once and can be used repeatedly for all subsequent experiments.
We tested the performance of this aberration-free single-objective remote focusing approach for in vivo imaging of the mouse brain. For both 0.8-NA and 1.05-NA objectives, correction of the divergence-induced aberrations improved the signal and contrast of the images of neuronal structures. It should be pointed out here that although the remote focusing process was aberrationfree, the in vivo images themselves were not, because the aberrations from the brain tissue itself were not removed. Adding the corrective wavefronts for the sample-induced aberrations and the divergence-induced aberrations at each imaging depth, one would obtain images of the best quality throughout the tissue volume.
In this paper, we used a liquid crystal SLM for divergence control and aberration correction, instead of a DM. Our SLM had 512×512 pixels and was phase-wrapped to generate wavefronts of more than 110 waves peak-to-valley. It allowed a larger axial scanning range than DMs of similar cost, whose axial range is mainly limited by its stroke [21]. Our SLM has a refresh rate of 100 Hz, lower than that of typical DMs. However, liquid crystal SLMs of kilohertz frame rate are becoming available, which once synchronized with frame acquisition, would allow aberration-free fast volumetric imaging at high spatial resolution.

Funding
National Institutes of Health (2R44MH111463).