Adaptive optical versus spherical aberration corrections for in vivo brain imaging.

Adjusting the objective correction collar is a widely used approach to correct spherical aberrations (SA) in optical microscopy. In this work, we characterized and compared its performance with adaptive optics in the context of in vivo brain imaging with two-photon fluorescence microscopy. We found that the presence of sample tilt had a deleterious effect on the performance of SA-only correction. At large tilt angles, adjusting the correction collar even worsened image quality. In contrast, adaptive optical correction always recovered optimal imaging performance regardless of sample tilt. The extent of improvement with adaptive optics was dependent on object size, with smaller objects having larger relative gains in signal intensity and image sharpness. These observations translate into a superior performance of adaptive optics for structural and functional brain imaging applications in vivo, as we confirmed experimentally.


Introduction
In optical microscopy, wavefront aberrations are induced by index of refraction mismatches as light propagates in biological tissue. Such sample-induced aberrations are detrimental to the signal and spatial resolution of optical microscopes. For brain imaging applications, the installation of a glass cranial window is a frequent practice as it provides optical access and enables longitudinal imaging experiments [1]. Although the use of cranial windows has been paradigm shifting in neuroscience [2], the glass window introduces additional aberrations. In particular, light propagating through the glass window and the brain tissue accumulates spherical aberrations (SA) as these materials have a refractive index mismatch between themselves and with respect to the immersion media of standard objective lenses (e.g., air, water, oil) [3][4][5]. Several theoretical studies have modeled SA and their effects on image quality in confocal [6][7][8], widefield [8,9], confocal light sheet [10], and multiphoton [6] fluorescence microscopy.
The preponderance of SA in biological imaging has resulted in the development of several methods aimed exclusively at correcting them, including those based on altering the tube lens [11,12], adjusting the rear pupil aperture of the objective lens [13], optimizing the immersion medium [14], and optical refocusing, which involves the use of multiple objectives lenses [15]. The approach that is most accessible to routine microscope users is adjusting the correction collar of some microscope objective lenses, which axially translates a movable lens group within the objective and was originally developed to correct SA introduced by coverglasses [16]. The functionality of correction collars was extended to the empirical removal of tissue-induced SA in multiphoton imaging [17]. This type of adjustment was sometimes automated by attaching to the correction collar a belt linked to a stepper motor [18].
More modern implementations of SA correction use either a deformable mirror [19] or a spatial light modulator [20-23] for wavefront control, with the corrective wavefronts calculated from the sample refractive index distribution using geometric optics. The wavefront-shaping element is usually positioned at a plane conjugated to the objective back focal plane and imparts a spatial phase profile to the wavefront to pre-compensate for spherical aberrations. Such implementations can also be combined with adaptive optics (AO) technologies, where the wavefront is measured (either directly [24][25][26] or indirectly [27, 28]) and the aberrations fully corrected to recover diffraction-limited imaging performance [29]. For in vivo brain imaging, by correcting the aberrations from the cranial window and the brain tissue, AO has been used to recover diffraction-limited imaging up to 750 µm inside the mouse brain [3,30,31].
Given the relative simplicity of schemes that exclusively correct for SA, as compared with the more complex AO systems, it is important to know how SA correction methods fare in the presence of other aberrations. Such an investigation is of specific relevance for in vivo brain imaging applications through a cranial window, because it is not trivial to position the brain so that the cranial window is perpendicular to the optical axis. As a result of a tilted cranial window, additional aberration modes arise.
In this work, we compared the performance of full AO versus SA-only corrections for two-photon excited fluorescence (TPEF) microscopy, the most popular method for in vivo brain imaging. Adaptive optics was implemented with a Shack-Hartman wavefront sensor for direct wavefront sensing and a deformable mirror for wavefront correction [31, 32]. Correction collar adjustment was selected as the method for correcting SA, because it is routinely applied in laboratories and enables us to assess its combined effect with adaptive optics. The performance was first characterized with fluorescent beads under glass windows for four correction configurations: no correction (i.e., optical system aberration correction only, syscor), correction collar adjustment only (CC), AO without correction collar adjustment (AO), and AO with correction collar adjustment (CC + AO). Imaging performance was compared for bead samples of different sizes under coverglass with varying tilt angles. Finally, the performance of the two approaches was further compared in the context of structural and functional in vivo brain imaging.

Experimental setup
The optical setup can operate as a TPEF microscope or as a direct wavefront sensing (DWS) AO system [31] ( Fig. 1(a)). For both modes, the excitation path was identical. A near-infrared excitation beam from a pulsed laser (920 nm, Coherent, Chameleon Ultra II) was expanded by a pair of lenses (focal lengths: 50 mm and 500 mm) such that the aperture of a deformable mirror (DM, Alpao, DM 97-15) was slightly overfilled. The DM reflected a shaped wavefront and was conjugated to the back focal plane of the objective lens (Nikon, CFI Apo LWD 25XW, 1.1 NA and 2 mm WD), as well as to a pair of galvanometer mirrors (Cambridge Technology, 6215H). Conjugation was implemented using pairs of achromatic lenses (focal lengths: 300 mm and 100 mm between the deformable mirror and the first galvanometer mirror, 85 mm and 85 mm between the two galvanometer mirrors, and 100 mm and 400 mm between the second galvanometer mirror and the objective back focal plane). The excitation light was focused into the sample by the objective and the emitted fluorescence was collected by the same objective.
For TPEF imaging, the emitted fluorescence was detected by a photomultiplier tube (PMT, Hamamatsu, H7422-40) after being reflected by a dichroic mirror (D1 in Fig. 1(a), Semrock, FF665-Di02-25x36) placed immediately above the objective and focused onto the PMT by a lens (focal length: 75 mm). A bandpass filter was positioned in front of the PMT for further spectral filtering of the emitted fluorescence (Semrock, FF03-525/50-25 for brain imaging). In the DWS mode, the dichroic immediately behind the objective was removed and the emitted fluorescence was descanned before being separated from the excitation light by a dichroic mirror (D2 in Fig. 1(a), Semrock, FF875-Di01-25x36) [32]. The fluorescence was then relayed to a lenslet array (Edmund Optics, 64-483) conjugated to the objective back focal plane by a pair of achromatic lenses (focal lengths: 100 mm and 150 mm). The lenslet array together with a camera (Andor iXon3 897 EMCCD) placed at its focal plane acted as a Shack-Hartmann (SH) wavefront sensor. Sample aberrations were measured from the shift of the spots on the SH pattern, which were decomposed into a Zernike polynomial using the first 55 modes. The appropriate corrective pattern (inverse phase) was applied to the DM to precompensate for sample-induced aberrations. A second PMT was also available for detection of the descanned fluorescence signal (bandpass filter: FF01-523/610-25 for bead imaging). Samples, either fluorescent beads below glass windows or mice with cranial window installation, were mounted on a goniometer stage (Thorlabs, GNL10), which allowed us to control their tilt angles precisely.

Bead imaging and analysis
Using TPEF imaging of red fluorescent beads (Invitrogen, FluoSphere® carboxylatemodified microsphere, 580/605), we evaluated the performance of the four different correction configurations (Figs. 1, 2, and 3): (i) system correction only (syscor), (ii) objective correction collar adjustment with system correction (CC), (iii) adaptive optics with system correction (AO), and (iv) adaptive optics with objective correction collar adjustment and system correction (CC + AO). As made explicit in the previous enumeration, a system correction was always applied because microscope-induced aberrations were not of interest. Thus all the measured aberrations were induced exclusively by the sample. For correction collar adjustment, we first positioned the correction collar to correct for 170 µm of glass and then performed fine adjustments to remove residual spherical aberration by minimizing its amplitude (Zernike coefficient) measured with direct wavefront sensing. We first assessed the performance of the aberration correction methods as a function of the sample tilt, using 1-µmdiameter beads under a single coverglass (Fisher Scientific, No. 1.5, 160-190 µm thick) tilted at 0°, 2°, 5°, and 10° angles, respectively. Then we studied the dependence on bead size (0.2 µm, 0.5 µm, 1 µm, and 2 µm in diameter) for beads under a single coverglass tilted at 5°.
For the images of every bead in all experiments, three parameters were evaluated: the axial full width at half maximum (FHWM), the lateral FWHM, and the fluorescence intensity. The axial and lateral FWHM were obtained by projecting (maximal intensity projection) the bead profile along the dimension of interest, finding the four points neighboring 50% of the peak intensity value on each side of the peak, and performing a linear interpolation between the two points to determine the positional values at each half maximum and the FWHM. The peak intensity was assigned as the bead intensity. At least five independent bead measurements were performed for each experimental group. Statistical analysis was performed in R based on linear regression models [33]. The significance levels were indicated with asterisks after the measurement values, using the following rule: *** for p-value < 10 −16 , ** for p-value < 10 −8 , and * for p-value < 0.001. Non-significant differences were indicated as NS. Differences in absolute values between two configurations were annotated with Δ.

Cranial window installation and virus injection for in vivo brain imaging
All animal experiments were conducted according to the National Institutes of Health (NIH) guidelines for animal research and were approved by the Institutional Animal Care and Use Committee at Janelia Research Campus, Howard Hughes Medical Institute. Thy1-GFP line M and Scnn1a-TG3-Cre mice were used for structural (Fig. 4) and functional imaging (Fig. 5), respectively, and were at least 8-week old. Under anesthesia (1~2% isoflurane, by volume in O 2 ) and using aseptic techniques, a craniotomy of 3.5 mm in diameter was made over the left cortex. Care was taken to leave the dura intact. For functional imaging experiments with Scnn1a-TG3-Cre mice, AAV2/1-synapsin-flex-GCaMP6s virus was injected into layer 4 of the primary visual cortex (30 nL, 500 µm below dura) with a glass pipette with a ~20 μm opening beveled at 45° and back-filled with mineral oil. A cranial window consisting of a single ~170-μm-thick coverslip (Fisher Scientific, No. 1.5) was embedded into the craniotomy and fixed in place with cyanoacrylate glue and dental acrylic. In order to keep the head stable, a titanium head-post was attached to the skull with cyanoacrylate glue and dental acrylic.

Structural and functional brain imaging and analysis
Thy1-GFP line M mice were used for structural imaging under anesthesia at least two weeks after cranial window installation. The average fluorescence intensity and size of dendritic spines in Thy1-GFP line M mice were evaluated based on manually traced regions of interest (ROIs). The same mouse was used for experiments with a 3.5° and 5° tilt angle.
For Scnn1a-TG3-Cre mice used for functional imaging, at least three weeks elapsed between virus injections and imaging experiments in order for the expression level of the calcium reporter GCaMP6s to be sufficient [34]. Awake mice were presented with visual stimuli to the right eye (contralateral with respect to the craniotomy) using a computer monitor. The stimuli were blue sinusoidal gratings at 100% contrast that drifted at 2 Hz in twelve different directions (oriented at 0°, 30°, 60°, 90°, 120°, or 150°) for 7 sec each. After each drifting grating stimulus, a stationary grating along the same orientation was presented for 3 sec. The grating was then rotated to the next orientation, and remained stationary for another 3 sec before drifting began. For each imaging session, the sequence was repeated 5 times. Different mice were used for experiments with a 3.5° and 5° tilt angle of the cranial window.
The calcium response to visual stimuli was analyzed with custom programs written in MATLAB (Mathworks). The method has been described in details elsewhere [35]. Briefly, images from an imaging session were laterally co-registered to the average projection of the stack using cross correlation. Axonal boutons, primarily, were then selected by drawing a ROI around varicosities (~1 μm in diameter). The average fluorescence intensity within each ROI was evaluated over the duration of visual stimulation. The mode of the intensity distribution was selected as the baseline (F0) for the calculation of the calcium transient: ΔF/F [%] = (F−F0)/F0 × 100. Finally, the five repetitions were averaged. A maximal ΔF/F above 10% was required for a ROI to be considered responsive. Only timepoints during which the grating was in motion were included in the analysis. The orientation selectivity of the calcium response with respect to the drifting gratings was further analyzed by tuning curve analysis. This analysis consisted of fitting a bimodal Gaussian function to the calcium transient as a function of the direction of the drifting grating [36]. Fitting was only performed if the calcium transient varied significantly for the different directions (one-way ANOVA, p-value < 0.05). The goodness of fit was characterized by the fitting error E and the coefficient of determination R 2 . ROIs with E < 0.4 and R 2 > 0.6 were defined as orientation selective. ROIs not meeting those three criteria (p-value, E, and R 2 ), but responsive (ΔF/F > 10%) were considered non-orientation selective.

AO fully recovers image quality while correction-collar adjustment degrades with increasing sample tilt
As an example, axial-lateral images of a 1-µm bead under a single coverglass tilted at a 5° angle are shown for each correction method in Fig. 1(b)-1(e). Removing spherical aberrations by adjusting the objective correction collar (Fig. 1(d)) had limited success in improving the axial width and fluorescence intensity (1.75 × increase). In contrast, both adaptive optics modes (AO and CC + AO, Fig. 1(c) and Fig. 1(e), respectively) fully recovered diffractionlimited performance with 8 × signal gains. The aberrated wavefront obtained by AO ( Fig.  1(f)) shows strong spherical aberrations; however, after most of the spherical aberration components have been removed by correction collar adjustment, the wavefront (CC + AO, Fig. 1(g)) appears to be dominated by coma, as previously reported by Arimoto et al. [37]. These impressions were borne out when we compared the Zernike mode depositions of these two aberrated wavefronts (Fig. 1(h), 1(i)). Comparing the amplitudes of Zernike modes for AO ( Fig. 1(h)) and CC + AO ( Fig. 1(i)) revealed that adjustment of the correction collar was effective at removing primary (1 ry ) and secondary (2 ry ) spherical aberrations and partially reduced tertiary (3 ry ) spherical aberration. Correction collar adjustment, however, did not correct for the primary and tertiary coma aberrations introduced by the tilted coverglass. The presence of coma aberrations is consistent with the CC bead profile (Fig. 1(d)), as they cannot be removed with CC alone.
Correcting all aberrations present and thus independently of the tilt angle, AO and CC+AO provided a significant improvement in axial profile compared to syscor (-55 ± 3 %*** and -54 ± 3 %***, respectively - Fig. 2(b)), achieving the same axial FWHM (AO: 1.57 ± 0.02 µm, Δ0.03 ± 0.10 µm, NS compared to CC+AO) as dictated by the diffraction limit. The changes in axial width with CC had a clear dependence on the tilt angle ( Fig. 2(b)). At 0º with only spherical aberrations present, CC fully recovered the diffraction-limited axial profile. With increasing tilt angle, the performance of CC degraded. At 10º, CC led to a more elongated axial profile than system correction alone, indicating that at large tilt angles, adjusting correction collar deteriorates rather than improves image quality. In contrast, the adaptive optical correction utilized in CC+AO was able to fully correct for the sample aberrations as well as compensate for the negative effects of correction collar adjustment. Improvement in fluorescence signal, as quantified by the ratio of the signal under AO, CC, CC+AO to the signal measured under syscor at each tilt angle, shows similar trends to those observed for axial FWHM (Fig. 2(c)). AO and CC+AO led to the largest and equivalent improvement in fluorescence brightness, whereas the signal recovery using CC showed a strong negative correlation with tilt angle, with 10º tilt seeing a reduction of fluorescence intensity when compared with the signal obtained with system aberration correction alone. The performance deterioration with tilt angle for CC was associated mainly with a concurrent increase in primary and tertiary coma (Fig. 2(d)). Other Zernike modes, such as astigmatism and secondary coma, showed limited increase in amplitude.
We found the magnitude of intensity recovery to be very sensitive to the quality of the system alignment and calibration. In particular, our direct wavefront sensing AO system required both the DM and the SH sensor to be conjugated with the objective back focal plane and laterally registered with one another accurately. Slight deviations led to residue wavefront errors that did not affect lateral or axial FWHM measurements, but nevertheless reduced the gain in intensity recovery (e.g., from 8 × in Fig. 1 to 4.5−6 × in Fig. 2(c) for 1-µm beads under a coverglass tilted at 5°).

AO consistently outperforms correction-collar-based spherical-aberration correction in recovering the image quality for beads of different sizes
In two-photon fluorescence microscopy, the effects of aberrations on image quality differ for features of different sizes, with finer structures suffering more degradation in image sharpness and brightness [3,30,38]. Therefore, we investigated whether the differences in performance of full AO corrections (i.e., AO and CC + AO) as compared to adjustment of the correction collar (i.e., CC) persist for larger objects. Beads of different sizes (diameter: 0.2, 0.5, 1.0, and 2.0 µm) were imaged under a single coverglass at a tilt angle of 5°. For each bead, the axial and lateral profile were evaluated as in the previous section for all four configurations, with their FWHMs normalized to the values measured with system aberration correction only (i.e., syscor). As before, the effects of aberrations and their corrections were smaller on lateral FWHMs than axial ones (Fig. 3(a), 3(b)). For lateral FWHMs of 0.2 and 0.5 µm beads, AO and CC + AO led to slight sharpening (−14.1 ± 1.5%** for CC + AO and −15.8 ± 1.5%** for AO, Fig. 3(a)), whereas for larger beads of 1.0 and 2.0 µm diameter, aberrations introduced by the 5°-tilted single coverglass and their corrections did not have a significant impact on their lateral sizes. In contrast, for all bead sizes, AO and CC + AO provided a significant improvement in axial FWHMs compared to syscor (e.g., −49.8 ± 1.4%*** and −44.3 ± 1.4%***, respectively, for 1-µm bead), with smaller beads having a larger relative improvement in axial FWHM with adaptive optics than larger beads (Fig. 3(b), e.g., −58.9 ± 1.4%*** and −55.6 ± 1.1%***, respectively, for 0.2-µm beads). The same axial FWHM was achieved when adaptive optics was used (CC + AO and AO, Δ 0.11 ± 0.06 µm, NS). No statistically significant improvement was measured with CC. Together with the observations that signal intensity had the largest recovery when adaptive optics was used and that correction collar adjustment alone only increased the signal minimally ( Fig. 3(c), all intensities normalized to that under syscor condition for each bead size), these results indicate that for the 0.2-2.0 µm size range, even a 5° sample tilt requires AO correction to fully recover diffraction-limited image performance.

AO correction achieves better in vivo brain imaging performance than correction collar adjustment
Finally, we compared the performance of full AO correction with spherical aberration correction alone for in vivo structural and functional brain imaging. For structural imaging, we utilized Thy1-GFP line M mice. This transgenic line is characterized by expression of GFP molecules in a sparse subset of cortical pyramidal neurons, enabling imaging of neuronal processes as well as individual synapses (dendritic spines or axonal boutons). The mouse was positioned under the microscope such that there was a tilt of 3.5° for the cranial window. Three-dimensional imaging was then performed around a depth of 25 µm with CC ( Fig.  4(a), 4(c), 4(e)) and CC + AO ( Fig. 4(b), 4(d), 4(f)). As with beads, the use of adaptive optics increased the brightness of individual spines when compared to objective ring adjustment alone. The increase in intensity for spines was 1.7 ± 0.5-fold (n = 128 spines, paired t-test, pvalue = 4 × 10 −26 ). Considering the tilt angle and the average lateral diameter of spines (0.8 ± 0.2 µm), this value falls within the expected range. Adaptive optics also substantially improved the quality of the axial images as spine axial profiles became tighter and more symmetric. As characterized in Fig. 3, the impact of adaptive optics on image quality is sizedependent, with smaller objects having larger improvement. Because the size of spines is around 1 µm, adaptive optics correction methods are particularly relevant for synaptic imaging applications. The same analysis at a larger 5° tilt of the cranial window resulted in an intensity increase of 2.9 ± 1.5-fold (n = 68 spines, paired t-test, p-value = 3 × 10 −10 ), which is larger than the value obtained at 3.5°, as expected ( Fig. 4(g), 4(h)). The reduction in the axial extension of the PSF has positive consequences beyond structural information. Indeed, it also significantly impacts functional imaging experiments. To illustrate this point, visual stimulation experiments were performed in the primary visual cortex of a mouse expressing GCaMP6s, a fluorescent calcium reporter, in layer 4 neurons. The orientation tuning of the calcium response as a function of the presented drifting grating (Fig. 5(a)) was evaluated in fine neurites 50 µm below the surface of the brain. Three correction methods were compared (syscor, CC, and CC + AO) with a 3.5° tilt of the cranial window and two (CC, and CC + AO) with a 5° tilt. The average images of the functional time series indicated again an augmentation in the detected fluorescence signal with increasing correction of aberration ( Fig. 5(b)-5(f)). More interestingly, the median values of the maximal calcium transient ΔF/F increased from the syscor value by a factor of 1.6 for CC and 2.7 for CC + AO (Fig. 5(g)) for the data recorded with a tilt of 3.5° (n = 200 ROIs from Fig. 5(d)-5(f)). With a larger tilt of 5°, the median values of the maximal ΔF/F with CC + AO increased from the CC value by 2.0-fold (n = 268 ROIs from Fig. 5(h)), which is higher than the 1.5fold increase observed at 3.5° (Fig. 5(g)), as expected. In addition, fully correcting all aberrations (CC + AO) also increased the percentage of neurites which were found to be orientation selective, when compared with correcting spherical aberration alone with CC ( Fig.  5(i), 5(j)). These findings, both observed before [3,[28][29][30][31], can be explained by the changes in the two-photon excitation volume and excitation intensity, where a tighter and brighter focus as the result of better aberration correction leads to a more selective excitation of the object of interest and a better rejection of neuropil contamination [39]. Clearly, even at small tilt angles, correcting the full aberration modes with AO allows a much more accurate characterization of neuronal responses than correcting spherical aberrations alone.

Conclusion
In summary, we systematically characterized the performance of adaptive optical versus spherical aberration corrections in the context of in vivo brain imaging. For both in vitro beads and in vivo brains, the performance of SA-only correction with the objective correction collar was quickly degraded by the introduction of small sample tilt. For beads below a single 170-µm-thick coverglass tilted at 10°, adjusting the correction collar even deteriorated the excitation PSF further than without SA correction. In contrast, adaptive optics did not show any performance dependence on tilt angle and optimal imaging performance was recovered in all tested cases.
The effects of aberration on image quality depend on object size, with images of smaller objects benefiting more from aberration reduction. This observation is of particular relevance for brain imaging applications because synaptic structures such as dendritic spines and axonal boutons have sizes near or below 1 µm. For quantitative structural or functional imaging of synapses in vivo, correcting all aberration modes with adaptive optics thus becomes essential.
When an adaptive optical system is not available and adjusting the correction collar is the only option for aberration reduction, great care should be used in sample positioning. Positioning the cranial window perpendicular to the optical axis requires mounting the headpost clamping system on a two-axis goniometer. However, we found in our laboratory that adjusting the cranial window visually or from images will not result in a perfectly aligned window. In fact, the best way to ensure optimal sample positioning on the microscope was by iteratively measuring the wavefront and adjusting the goniometer. But of course, with an adaptive optics system in place, it is better to apply the correction directly to the deformable mirror.
Given that correction collar adjustment is only effective against spherical aberrations, another consideration is the flatness of the window-to-tissue interface. Without external pressure, the brain possesses a curvature. Therefore, during cranial window installation, it is important to have the window exert slight pressure on the brain to minimize this curvature. Nevertheless, it is not always possible to flatten aberration-generating interfaces, as they can be imbedded within the tissue (e.g., interfaces between gray and white matter in the brain). Therefore, adaptive optics will always outperform methods aimed at correcting only spherical aberrations and should be applied whenever possible.