Two-photon (2P) microscopy is widely used in neuroscience, but the optical properties of brain tissue are poorly understood. We have investigated the effect of brain tissue on the 2P point spread function (PSF2P) by imaging fluorescent beads through living cortical slices. By combining this with measurements of the mean free path of the excitation light, adaptive optics and vector-based modeling that includes phase modulation and scattering, we show that tissue-induced wavefront distortions are the main determinant of enlargement and distortion of the PSF2P at intermediate imaging depths. Furthermore, they generate surrounding lobes that contain more than half of the 2P excitation. These effects reduce the resolution of fine structures and contrast and they, together with scattering, limit 2P excitation. Our results disentangle the contributions of scattering and wavefront distortion in shaping the cortical PSF2P, thereby providing a basis for improved 2P microscopy.
© 2011 OSA
2P microscopy [1,2] is widely used in neuroscience because it allows structural and functional imaging, photolysis and photoactivation, deep within brain tissue at submicron spatial scales . Despite the advantages provided by the 2P excitation process, the resolution and depth penetration are ultimately limited by the optical properties of brain tissue . However, surprisingly little is known about how tissue affects the 2P excitation point spread function (PSF2P), which sets the image resolution in conventional 2P microscopy (as emitted fluorescence is not reimaged). Since the theoretical PSF2P dimensions are similar to some small structures of interest, such as synapses and spines, any tissue-induced changes in the PSF2P shape or size will have a large effect on the final image quality, blurring images and limiting depth penetration. Changes in PSF2P shape will also compromise interpretation of time varying functional signals and photolysis. Recent work has shown that the size of the PSF2P is enlarged in acute slices of hippocampus , while other studies show that the PSF2P is distorted in fixed cortical slices [6,7], but tissue-induced changes in PSF2P shape have not been investigated in living slices.
The PSF2P can be adversely affected by several physical processes when imaging biological tissue, including absorption, statistically homogeneous scattering  and optical aberrations . In brain tissue, absorption is usually negligible [10,11]. Statistically homogeneous scattering and optical aberrations due to wavefront distortions both arise from local variations of refractive index, which disperse and delay a fraction of the ballistic photons. However, the relative contributions of these effects on light propagation depend on the size of the structures within the sample (Fig. 1 ). Although scattering and wavefront distortion both occur in brain tissue, light propagation in 2P microscopy is often modeled as purely scattering, and is described in terms of modulation of the power of ballistic photons . This predicts the attenuation of the ballistic laser power with tissue depth, enlargement of the PSF2P and generation of out of focus 2P excitation , which are all circularly symmetric around the optical axis. These effects set a fundamental limit to the depth of 2P microscopy . The wavefront of excitation light also becomes distorted while propagating through the sample (Fig. 1), which can be modeled using phase modulation of the ballistic photons . Tissue-induced wavefront distortions have been shown to cause enlargement of the PSF2P in fixed brain slices and the appearance of a speckled pattern [6,7]. Wavefront distortions have also been partially characterized in fixed brain slices  but as fixation (paraformaldehyde) modifies the brain refractive indexes, it is unclear how these findings relate to living brain tissue. Furthermore, the relative contribution that scattering and wavefront distortion make to tissue-induced changes in the PSF2P, image quality and depth penetration, is poorly understood.
Wavefront distortion can be counteracted with wavefront shaping using adaptive optics devices, such as liquid crystal spatial light modulators (SLMs) and deformable membrane mirrors (DMMs) [14–16]. In 2P microscopy these technologies have been used to compensate for optical system induced aberrations, spherical aberrations induced by a gross mismatch in refractive index [6,17–20], and to enhance 2P imaging in both fixed tissue [6,7,19] and living samples [20–23]. DMMs have also been used to reject background noise  in living brain tissue. However, adaptive optics have not been used to quantify the contribution that wavefront distortion makes to the PSF2P shape in living brain tissue.
We have investigated the respective effects of statistically homogeneous scattering and wavefront distortion at intermediate depth in acute slices of barrel cortex, under conditions similar to those used to study neuronal activity. To do this we examined how the fluorescence emitted by objects and the shape of the PSF2P changed when imaging through living tissue. We then combined DMM-based adaptive optics, wavefront analysis and computer modeling to disentangle how wavefront distortions and scattering set the PSF2P characteristics and depth penetration. Our results establish that brain tissue introduces substantial distortions in the PSF2P shape, including surrounding lobes (speckle patterns) that mediate a large fraction of the 2P excitation. Tissue-induced wavefront distortion therefore reduces the image quality, 2P excitation and signal to noise ratio (SNR) of fluorescence signals.
2. Quantification of the PSF2P properties in acute cortical slices
2.1. Optical properties of the 2P microscope
To investigate the effects of brain tissue on the PSF2P we first quantified the properties of our 2P microscope, which consisted of a femtosecond tuneable Laser (Tsunami, Newport-Spectra Physics), scanhead (Ultima, Prairie Technologies), upright microscope (BX51, Olympus), and IR antireflection coated water-immersion objective (Olympus LumPLanFL/IR 60x/0.90W). Green fluorescence light was collected selectively using an emission filter (HQ 525/70m-2P Chroma Technology) and detected using GaAsP photomultipliers (Hamamatsu H7422). Images were acquired with PrairieView acquisition software. The laser intensity was controlled using a Pockels-cell (Conoptics Model 302CE) and neutral density filter (NDC-50S-3M, Thorlabs) when necessary. A single layer of 200 nm diameter green fluorescent beads (FluoSpheres, Invitrogen) was fixed to the bottom of the recording chamber (Fig. 2 (a) ) and both epi- and trans-fluorescence signals were collected during imaging. All bead images (Fig. 2 (a)) were acquired at a high magnification factor using 8 μs dwell time and were averages of 2 or 4 single images. Acquisition of the bead images required a laser power after the objective of 3.7 ± 1.6 mW (n = 24).
To quantify the PSF2P shape and fluorescence we established a protocol that could account for distortion and tilt of a 3D Gaussian  from the universal frame of reference (x, y, z) to its eigenframe of reference (xe, ye, ze) using only 2 images: the focal plane (xy), and the plane containing the PSF2P axis (ze) and the optical axis (z). These 2 images were processed using IgorPro (Wavemetrics) as follows. They were filtered using a 3 × 3 median filter (4 repetitions) and fitted with 2D Gaussians. This enabled calculation of the angle (ε) between the (ze) and (z) axes, and the full width half maximum (FWHM) in each axis of the PSF2P. The spatial extent of the bead was defined using a fluorescence threshold equal to the fluorescence of the image of the bead at 3 standard deviations away from its center. This mask was applied to the image and the mean value was used as the bead fluorescence. The background fluorescence was calculated from the pixel distribution of the image after exclusion of the bead mask area. The SNR was calculated as the ratio of the mean fluorescence of the bead divided by the background fluorescence. As the 2P images of the beads are the convolution product of the PSF2P and the bead (both represented by Gaussian distributions), the FWHM of the PSF2P for each axis (FWHM2P) was calculated as follows:25],
The results in Table 1 and Fig. 2 show that the dimensions of the PSF2P are slightly larger than that predicted theoretically for a fully back-filled diffraction limited 0.9 NA objective at a wavelength of 725 nm, resulting in FV2P about fifty per cent larger than the theoretical minimum.
2.2. Measurement of the PSF2P in acute cortical slices
We next examined the properties of the PSF2P in acute slices of mouse ‘barrel’ cortex. This widely studied region of the somatosensory cortex processes information arising from the whiskers. Cortical slices were cut in two different orientations: tangential, which is a good model for in vivo imaging (from the surface of the brain; Fig. 2 (b)) and thalamocortical slices, which allow investigation of the individual cortical layers (Fig. 6 (a) below). Slices, 150 μm thick, were prepared from 22 - 29 day-old wild type BL6 mice using a Leica VT1000S slicer. The slice thickness used corresponds to a typical depth at which synaptic mechanisms are studied. The sucrose slicing solution contained (in millimoles of compound used to make a liter of solution): 25 glucose, 230 sucrose, 0.5 CaCl2, 4 MgCl2, 2.5 KCl, 1.25 NaH2PO4 and 24 NaHCO3. It was saturated with 95% O2 / 5% CO2 and used at 4° C. Slices were then incubated at 32 - 33°C for 30 min in a sucrose recovery solution containing (in millimoles of compound used to make a litre of solution): 25 glucose, 75 sucrose, 0.5 CaCl2, 4 MgCl2, 85 NaCl, 2.5 KCl, 1.25 NaH2PO4 and 24 NaHCO3. It was saturated with 95% O2 / 5% CO2. Slices were then washed for 15–30 min with external solution saturated with 95% O2 / 5% CO2 at 32–34°C containing (in millimoles of compound used to make a liter of solution): 125 NaCl, 2.5 KCl, 26 NaHCO3, 1.25 Na2H2PO4, 25 Glucose, 0.5 Ascorbic Acid, 2 CaCl2 and 1 MgCl2. For experiments, slices were continuously perfused with the same external solution. The barrel cortex was localized using DODT contrast .
We investigated the effects of brain tissue on the PSF2P by imaging 200 nm diameter beads through cortical slices (Fig. 2 (b)). This required an average laser power of 86 ± 29 mW (n = 38; all data expressed as mean ± standard deviation, unless stated otherwise) and illuminated an area of 5 × 104 μm2 at the brain surface. The PSF2P imaged through cortical tissue was enlarged in comparison to the microscope PSF2P (Table 1 and Figs. 2 (a–c)). The x-y and z dimensions of the PSF2P and the FV2P were significantly larger in the slice than for the microscope (p < 0.006). Indeed the cortical PSF2P dimensions correspond to an apparent NA of around 0.6, 33% lower than the microscope. The PSF2P was also distorted, tilted and fragmented into multiple lobes (or speckles; Fig. 2 (b)). Comparison with the near-diffraction limited PSF2P of the microscope (Fig. 2 (a)) shows that the PSF2P in tissue (Fig. 2 (b)) has many more features. The PSF2P shape and anisotropy were highly variable but, there was no significant difference in the PSF2P dimensions in different cortical layers (p > 0.08). However, variability was more pronounced in thalamocortical slices than in the tangential slices (Table 1).
Analysis of the cortical PSF2P suggests that 82 ± 18% (n = 8) of the 2P excitation (integral of the distribution of the squared intensity of excitation light in the PSF2P), which was estimated here from fluorescence, was generated outside of the 3D Gaussian core in the subset of data where it could be measured. In comparison, only 13 ± 3% (n = 6) of the 2P excitation was generated outside of the 3D Gaussian core for the microscope alone. However, although we selected regions where beads were sparse (at least 3 μm apart), we cannot exclude the possibility that the integration included some contaminating 2P excitation from neighboring beads or out-of-focus 2P excitation . Nevertheless, this first order analysis (see §5.1 for refinement), establishes that a substantial fraction of the 2P excitation is carried by the surrounding lobes.
While part of the PSF2P anisotropy, as well as the PSF2P tilt, can be explained by refractive index mismatch at the sloping surface of the brain slice , the pronounced distortions observed in the PSF2P shape (surrounding lobes/speckle pattern) indicate that cortex-induced wavefront distortions make a major contribution to the optical properties of cortex.
2.3. Excitation wavelength dependence of PSF2P in acute cortical slices
We also examined the dependence of the PSF2P characteristics on the excitation wavelength by comparing images of beads acquired through cortical slices at wavelengths between 725 nm and 950 nm. Aberrant lobes were present in the PSF2P across this range (17 beads; data not shown). Gross distortions of the PSF2P induced by brain tissue are therefore present at both the shorter excitation wavelengths typically used for photolysis and the longer wavelengths often used for structural and functional imaging.
3. The contribution of static scattering of ballistic photons to PSF2P enlargement
In scattering samples the power of ballistic photons is exponentially attenuated with depth  and this decay is characterized by the excitation mean free path or scattering length (Lse). In 2P microscopy, the brain is often modeled as an homogeneous scattering sample [4,12], where the fluorescence power decreases exponentially with depth, twice as fast as the power of ballistic photons, enabling Lse to be determined [28,29].
3.1 Measurement of mean free path
The fine processes (dendrites) of an individual neuron can span focal depths of hundreds of micrometers. We used this property to determine Lse, by imaging these small structures at various depths. To do this, single cortical neurons in layer II / III (thalamocortical slices) were whole-cell patch-clamped and filled with an internal solution containing (in millimoles of compound used to make a liter of solution): 130 KMeSO3, 10 Na2Phosphocreatine, 10 HEPES, 4 MgCl2, 0.1 EGTA, 0.3 NaGTP, 4 Na2ATP, and a green emitting fluorescent dye, 0.2 mΜ fluo-4 (Invitrogen) or Alexa 488 (Invitrogen). After the dye had reached diffusion equilibrium within the cell, a z-stack of images of the dendritic tree was acquired (using epi-fluorescence collection) at a range of excitation wavelengths (725 ≤ λ ≤ 950 nm in n = 8 cells), using 4 μs dwell time and averages of 2 images (Fig. 3 (a) ). The relationship between the fluorescence normalized by the square of the illumination power (F(z) / P02) and the depth (z) was fitted by an exponential, giving an estimate of Lse (Fig. 3 (b)) since10]), increases with the excitation wavelength (λ) . Our measurements showed that Lse increased with λ, by a factor of two from 725 nm to 950 nm (Fig. 3 (c)), thus providing larger depth penetration at longer excitation wavelength.
3.2. Comparison of the dimensions of the experimental PSF2P in the cortex and the PSF2P obtained from a scattering model
In a purely scattering sample, attenuation of ballistic excitation light due to scattering leads to reduction of the effective NA and enlargement of the PSF2P . To examine the contribution of statistically homogeneous scattering (static) in cortical tissue we compared the dimensions of the measured PSF2P with that predicted using a vector-based model of PSF2P that incorporated scattering. We determined the PSF2P by calculating the fluorescence at each image point (xp, yp, zp) using Richards and Wolf’s normalized diffraction integral  expressed in cylindrical coordinates (rp, ωp, zp). We introduced space dependent amplitude Α (θ,ω) and phase factors Φ (θ,ω) of the field in the back aperture of the objective, givingFig. 4 (a) ). The 2P excitation distribution (distribution of the squared intensity of excitation light), was then calculated according to
Exponential attenuation with depth of ballistic excitation photons due to scattering, as well as illumination of the back aperture of the objective by a Gaussian shaped profile with a lens fill factor of 1, were taken into account in the equations by substituting for A(θ,ω) and Φ(θ,ω) as follows:
To model the PSF2P we assumed that ballistic photons form a cone that can be decomposed into beamlets of polar coordinates (r, ω) (Fig. 4 (a)). The length of the optical path of each beamlet is inversely proportional to cos θ. Since the large angle beamlets trace a longer path, their power decreases as θ increases, hence reducing the apparent NA. For Lse = 77 μm, an NA of 0.9 and λ = 725 nm, our model predicts that at 150 μm in layer II / III, the PSF2P FWHM is 0.356 ± 0.002 μm (n = 4) in the focal plane and 1.50 ± 0.06 μm (n = 4) along the optical axis (Fig. 4 (b)). This is significantly less than the dimensions of the measured PSF2P in the cortical layer II / III (p < 0.05). Furthermore, since Lse increases with the excitation wavelength, its effects on the effective NA will be smaller at longer wavelengths. This indicates that the decrease in the apparent NA due to excitation light scattering is small compared to the PSF2P enlargement measured in the cortex, suggesting that wavefront distortions contribute significantly.
4. Correcting for wavefront distortions in the cortex with adaptive optics
To investigate the properties of brain tissue-induced wavefront distortion we used adaptive optics. To do this a DMM (gold coated mini DMM, Boston Micromachines, with 32 electrostatic actuators) was added to the excitation path of our commercial 2-photon microscope.
4.1. Wavefront shaping using a conventional optical configuration
The DMM was inserted in the excitation path in a conventional 4f configuration, ensuring conjugation of the DMM and the galvanometers mirrors, which were reimaged onto the objective backaperture [19,21] (Fig. 5 (a) ). The DMM was set up with the actuators at mid voltage (control conditions, CC), to enable positive and negative wavefront shaping. As we were using a commercial microscope there were physical constraints that prevented us fully backfilling the objective, thereby reducing the effective NA of the system. The PSF2P dimensions of the microscope including the DMM in control conditions were 0.47 ± 0.02 μm (n = 9) in the x-y plane and 3.1 ± 0.6 μm (n = 9) along the optical axis (Fig. 5 (b)). Thus, the dimensions of the PSF2P of the optical system including the DMM were close to the theoretical values for a 0.65 NA objective.
To correct for aberrations the DMM shape was adjusted from the control conditions to maximize the fluorescence from 200 nm diameter beads. To do this the scanning mirrors were parked at the center of a bead and the resulting fluorescence signal was used as fitness parameter  and the DMM shape was adjusted using a random search optimization algorithm (via an in-house developed computer program; LabVIEW, National Instruments) . The output of the photomultiplier was integrated for a period of 10 ms and this measurement was averaged 5 times during each DMM shape optimization. As 200 nm diameter beads are sensitive to bleaching, bleaching compensation was used to avoid bias. The optimized mirror shape (OMS) was defined as the setting when the bead fluorescence reached a steady maximum after several hundred iterations, which took approximately 2-5 min.
4.1.1. Wavefront shaping to correct for wavefront distortions arising from the microscope
The optimized DMM shape for the microscope alone (OMSm) increased the fluorescence and the SNR of all beads in the field of view by 25 ± 19% (n = 9, p < 0.001, paired t-test) and 23 ± 14% (n = 9, p < 0.01, paired t-test), respectively, in comparison to control conditions. The fluorescence and SNR improvements resulted from both a significant decrease in the volume of the main lobe of the PSF2P by 12 ± 11% (n = 9, p < 0.01, paired t-test) and a decrease of the background fluorescence by 14 ± 9% (n = 9, p < 0.05, paired t-test).
4.1.2. Wavefront shaping to correct of cortex-induced wavefront distortions
We then corrected for the wavefront distortions introduced by the cortex by optimizing the DMM shape using beads imaged through cortical slices (Fig. 6 (a) ). Using this optimized mirror shape for the cortex (OMSc) resulted in increased fluorescence and SNR of 35 ± 37% (n = 36, p < 0.001, paired t-test) and 66 ± 55% (n = 36, p < 0.001, paired t-test), respectively. Alternatively, the laser power could be decreased by 21 ± 10% (n = 36, p < 0.001, paired t-test) while maintaining similar fluorescence levels and significantly decreasing the background fluorescence by 42 ± 17% (n = 36, p < 0.001, paired t-test). These improvements arise from compensation of optical aberrations introduced by the cortex, because using the settings for OMSm did not resulted in significant fluorescence enhancement when beads were imaged through the cortex (n = 18, p = 0.7, paired t-test). The OMSc resulted in a decrease in the size of main lobe of the PSF2P by 16 ± 37% (n = 36, p < 0.005, paired t-test; Figs. 6 (b-d)) and a reduction of the surrounding lobes. This decreased the background and increased the fluorescence of the main PSF2P (Fig. 6 (d)).
To quantify the spatial dependence of cortical wavefront correction with the DMM, we first investigated the field of view over which an OMSc provided fluorescence and SNR enhancement. To do this we optimized the DMM shape on a bead at the center of the field of view (Fig. 7 (a) ) and then translated the sample by 50 or 100 μm in the x-y plane (arbitrary direction) and compared the same bead, or group of beads, imaged using the OMSc settings obtained at the center of the field of view and the DMM under control conditions. There was no significant change in fluorescence and SNR with distance from the optical axis (Figs. 7 (b-c)), showing that a particular cortical area is corrected with an OMSc no matter where it is in the field of view.
We then tested whether wavefront correction at a particular cortical location was effective in correcting for wavefront distortions introduced by the surrounding regions. Figure 8 (a) shows that an OMSc obtained for a bead at the center of the field of view was effective in enhancing the fluorescence and SNR of beads in the lower but not the upper regions of the field of view. To investigate further this regional variation we positioned a cortical column in the field of view and performed a DMM optimization. We then moved to a second cortical column and performed a second DMM optimization (Fig. 8 (b)). Lastly, we imaged a bead in the second cortical column using both of the OMSc’s and under control conditions. Fluorescence levels of bead images acquired with the local OMSc were significantly higher than those obtained with the non-local OMSc, confirming that wavefront distortion varies with location in the cortex. These results suggest that optimization of the DMM shape at a particular location can correct for the same aberrations if the sample is moved across the microscope field of view. However, optical aberrations introduced by cortical tissue appear to vary from region to region. Therefore, DMM optimizations have to be repeated for different cortical regions.
4.2. Using a light-efficient DMM configuration for wavefront correction
The conventional DMM configuration used so far resulted in the loss of about 50% of excitation light, due to the incoming and outgoing beams passing through a polarization beam splitter and quarter-wave plate. Since both the power of the excitation light and the effective NA are limiting for deep tissue imaging and for performing photolysis, we explored the possibility of using an alternative DMM implementation (Fig. 9 (a) ) with a better optical transmission efficiency. This involved positioning the DMM at 45° to the direction of the beam propagation, thereby avoiding the use of polarization optics (this configuration is related to configurations used previously [22,24]). This increased the available light by 64% and reduced PSF2P dimensions with the DMM in control conditions to 0.40 ± 0.04 μm (n = 9) in the x-y plane and 2.8 ± 0.2 μm (n = 7) along the optical axis (Fig. 9 (b)). Thus, the dimensions of the PSF2P of the optical system including the DMM were close to the theoretical values for a 0.7 NA objective.
Using the 45° light-efficient configuration, DMM optimization of the microscope alone enhanced fluorescence and SNR of beads across the field of view by 19 ± 15% (n = 9, p < 0.001, paired t-test) and 25 ± 18% (n = 7, p < 0.003, paired t-test) in comparison to control conditions. There was no significant decrease in the size of the main lobe of PSF2P (p = 0.44, paired t-test), instead the enhanced efficiency arose from a decrease in surrounding lobes, which significantly decreased background fluorescence by 22 ± 14% (n = 7, p < 0.03, paired t-test) and increased fluorescence of the main PSF2P.
4.2.1. Wavefront shaping to correct for cortical wavefront distortions using the light-efficient DMM configuration
Optimization of the DMM shape in the cortex, resulted in increased bead fluorescence and SNR of 83 ± 108% (n = 44, p < 0.001, paired t-test) and 87 ± 100% (n = 44, p < 0.001, paired t-test), respectively (Figs. 9 (c-h)). Alternatively, the laser power could be decreased by 41 ± 21% (n = 44, p < 0.001, paired t-test) while maintaining similar fluorescence levels and significantly decreasing the background fluorescence by 39 ± 31% (n = 44; p < 0.001, paired t-test). The OMSc reduced the speckle pattern, significantly decreasing background levels and increasing fluorescence levels of the main PSF2P. We also used the PSF2P data acquired using the DMM in control conditions to estimate the 2P excitation in the surrounding lobes at NA 0.7. Analysis of the cortical PSF2P as in § 2.2, suggests that 74 ± 17% (n = 10) of the 2P excitation was generated outside of the 3D Gaussian core in the subset of data we could analyze (Fig. 12 (c) below). In comparison, only 20 ± 7% (n = 7) of the 2P excitation was generated outside of the 3D Gaussian core for the microscope alone.
To quantify the spatial dependence of cortical wavefront corrections with this configuration, we investigated the field of view over which a DMM OMSc provided fluorescence and SNR enhancement (as described in 4.1.1). There was no significant change in the fluorescence and SNR enhancements with distance from the optical axis (Fig. 10 (a-c) ).
These results suggest that optimization of the DMM shape at a particular cortical location can correct for the same aberrations across the microscope field of view for the light-efficient configuration. The potential disadvantage of this optical configuration, that only the center of the mirror is fully conjugated to the back aperture of the objective, is therefore not a problem in practice. Moreover, the reduction in the effective stroke of the DMM in this configuration was also not an issue as the actuators never reached their maximal value. These results show that it is possible to use a light efficient optical configuration where the DMM is positioned at 45° to the direction of the beam propagation for wavefront shaping in the living brain. Such a configuration is simple to implement in an existing commercial microscope and transmits most of the laser power.
4.2.2/ Optimizing the DMM shape using a cellular element
Since it is difficult to distribute beads in living brain we examined the feasibility of optimizing the DMM shape on fine neuronal processes. DMM shape optimizations could be successfully achieved on small dendrites or spines from fluorescent-labeled neurons located at an average depth of 85 ± 24 μm (n = 9) below the surface of the brain slice, provided that the laser intensity used during the optimization was kept low (Fig. 11 ). Using the OMSc, the collected fluorescence increased significantly by 60 ± 56% (n = 10, p < 0.001, paired t-test). Alternatively, the laser power could be significantly lowered by 32 ± 18% (n = 9, p < 0.01, paired t-test) using the OMSc while maintaining fluorescence constant.
These results show that it is possible to compensate for brain-induced aberrations by optimizing the DMM shape using dye filled living subcellular elements, thereby improving optical efficiency and contrast of fine objects in the mammalian cortex.
5. Contribution of brain-induced wavefront distortion and scattering to 2P microscopy
To quantify the relative contributions of wavefront distortion and scattering to image quality in the cortex, we measured the wavefront corrections introduced by the DMM and used modeling to examine their effect on the PSF2P and on the resolution of small objects.
5.1. Effect of wavefront distortions on the PSF2P
The theoretical PSF2P can be calculated in the presence of wavefront distortions, by expressing the wave aberration function Φ(θ,ω) as a linear combination of Zernike polynomials in Wolf’s integral representation of the image field  as in § 3.1. We used this approach to model the aberrated PSF2P by introducing the conjugate Zernike modes determined from the OMSc measured in the cortex. Φ(θ,ω) and A(θ,ω) were substituted in Eq. (7-9) as follows:
To measure the optical wavefront, the DMM was set up in the same configuration as that used for correcting cortical wavefront distortion. We used the 45° configuration for this analysis since the NA was larger and the wavefront correction was more effective. To do this the DMM was illuminated with a Ti:sapphire laser and reimaged onto a Shack-Hartmann Wavefront Sensor (WFS150-7AR by Thorlabs) using two lenses. A rolling average (10 time points) was used to reduce the noise and the scale was set to micrometers. The Zernike coefficients were determined for a particular OMSc measured in cortex after subtraction of the coefficients corresponding to the DMM control conditions. Only modes up to the 5th Zernike order were considered as higher order modes either could not be corrected or their contribution was small . As the insertion of the DMM in the optical path resulted in a decrease of the NA to 0.70, this was used for modeling the PSF2P. Water refractive index (1.34) was used for the microscope alone and a refractive index of 1.4 was used in the brain . Modeling was performed in square cuboids of 4 μm × 4 μm × 14 μm centered on the center of each PSF2P.
Figures 12 (a) and (b) compares a model of an ideal PSF2P (without aberrations) and a model PSF2P that includes the wavefront distortions determined from OMSc’s in cortex, respectively. The main core region of each of 18 modeled cortical PSF2P’s were fitted with a 3D Gaussian function and the average FWHM was 0.5 ± 0.1 μm along the x axis, 0.8 ± 0.1 μm along the y axis and 4.5 ± 1.3 μm along the optical axis. The modeled cortical PSF2P was significantly enlarged compared to the ideal PSF2P (p < 0.001, z-test) and the extent of this enlargement was not significantly different from that measured in the cortex (p > 0.15, paired t-test). Wavefront distortions can therefore account for the PSF2P enlargement observed in the cortex. The modeled PSF2P also showed a speckle pattern with clear surrounding lobes as observed experimentally (Figs. 12 (b) and 2 (b), respectively). We quantified the fraction of 2P excitation mediated by the surrounding lobes by using the fit of a 3D Gaussian function to define the central core of the PSF2P. Analysis of the modeled microscope PSF2P (0.7 NA objective) using a step size of 0.02 μm for the x and y dimensions and 0.1 μm in the z dimension, showed that 12.1 ± 0.4% of the 2P excitation is not carried within this 3D Gaussian region of the central core, as predicted analytically. In contrast, analysis of the cortical PSF2P showed that 54 ± 13% (n = 18) of 2P excitation was generated outside of the 3D Gaussian core in the subset of data we modeled (Fig. 12 (c)). Thus, by compensating for the optical aberrations that generate the surrounding lobes, the fluorescence of the Gaussian PSF2P should increase by approximately a factor of two. These predictions are consistent with our experimental observations that wavefront correction with the DMM increased the fluorescence of beads by a factor of 1.83 ± 1.08 (n = 44). Moreover, they refine our analysis of the 2P excitation in the surrounding lobes of the measured cortical PSF2P in § 2.2 and 4.2.1 by providing an estimate that does not contain contamination from neighboring beads or from out-of-focus 2P excitation related to scattering. However it is likely to represent a lower limit for the effect of the surrounding lobes given that wavefront shaping did not compensate for all the brain-induced wavefront distortions.
5.2. Relative contribution of scattering and wavefront distortions in the cortex
Both scattering and wavefront distortions contribute to decreased 2P-excitation in tissue. To investigate their respective contributions, we modeled the fluorescent emission from spherical objects of 0 - 7 μm diameter (Fig. 12 (d)). We compared the predicted 2P fluorescence from these objects for an undistorted wavefront, in the presence of statistically homogenous scattering and in the presence of the wavefront distortions that we had compensated for with the DMM in cortex. Figure 12 (d) shows that homogeneous scattering reduces the 2P excitation fluorescence by a factor of fifty at a depth of 150 μm and this factor is independent of the size of the object. Wavefront distortions reduce 2P excitation fluorescence by a factor of four for the largest objects and a factor of ten for the smallest ones, and thus lead to decreased contrast of fine objects. Normalizing the plots by the maximal fluorescence emission reveals that scattering has little effect on the relationship between 2P fluorescence and object size. In contrast, wavefront distortion substantially reduced the emission from objects below about 7 μm in diameter introducing significant low-pass spatial filtering (Fig. 12 (d)). Furthermore, comparison of the effects of the main 3D Gaussian core to the full aberrated PSF2P shows that low-pass filtering results mainly from the surrounding lobes (Fig. 12 (d)). These models show that cortical tissue-induced wavefront distortions have marked effect on PSF2P and that their effects are the largest when imaging small objects. Correction of tissue-induced aberrations is therefore particularly useful to improve 2P imaging of fine structures. Correction of wavefront distortions will also reduce the 2P photolysis and photostimulation volume in cortex, allowing more localized uncaging and activation to be achieved.
We have measured the properties of the PSF2P in living slices of mammalian cortex. Our results show that in cortex the PSF2P decomposes into a central Gaussian region and a speckle pattern consisting of multiple surrounding lobes that can carry more than half the 2P excitation at a tissue depth of 150 μm. The central Gaussian region is enlarged in comparison to the microscope PSF2P and this arises mainly from brain-induced wavefront distortions rather than scattering, which has a relatively small effect on PSF2P size. Scattering of ballistic photons is, however, the dominant process in reducing the 2P-excitation with depth, although wavefront distortion also contributes significantly. By combining adaptive optics and modeling, we establish that the 3D speckle pattern of the PSF2P arises from brain-induced wavefront distortions and this together with the enlarged central region causes low-pass spatial filtering when imaging cortex. Lastly, we show that the tissue-induced surrounding lobes of the PSF2P can be reduced by wavefront shaping using a DMM, thereby improving the efficiency of excitation and the resolution of fine structures. Our results provide a quantitative basis for understanding the processes that set the resolution and limit 2P excitation of fluorescent structures in brain tissue and identify features of the PSF2P that can be improved with wavefront shaping.
6.1. Experimental measurement of the PSF2P in the mammalian brain
We have shown that the PSF2P is distorted and enlarged in acute cortical slices, resulting in loss of 2P excitation efficiency, decreased image contrast and reduced spatial resolution. Similar enlargement of the core of the PSF2P with depth has recently been reported in hippocampal slices  and in fixed cortical slices  and attributed to scattering or wavefront distortions, respectively. Moreover, recent work using fixed cortical slices have reported that the PSF2P has a 3D speckle pattern [6,7]. Our work, in living tissue, shows that the 3D speckle pattern arises from tissue-induced wavefront distortions and accounts for up to 80% of 2P-excitation at 150 μm for an NA of 0.9. This has important implications for the resolution of fine structures, since they are spatially low-pass filtered by the enlarged and distributed PSF2P. It is also detrimental for 2P photolysis since the uncaged/photoactivated molecules will be spatially distributed. Our experimental results also show that there is a large spatial variability in wavefront distortion in the cortex and thus in the PSF2P shape from location-to-location. This variability, which is manifest mainly in the extent of the 3D speckle pattern (compare Fig. 2 (b), Fig. 6 (b) and Fig. 9 (e)) rather than the core of the PSF2P, will produce variability in image distortions and in the number and spatial distribution of uncaged / photoactivated molecules.
6.2. Modeling the effects of wavefront distortion and scattering on the PSF2P to disentangle their respective roles in the cortex
By combining measurements of the excitation mean free path (Lse = 77-140 μm, for 725-950 nm) and the wavefront distortions introduced in living cortical tissue with a vector-based model of the PSF2P that includes both phase modulation and static, statistically homogeneous scattering, we show that both wavefront distortions and the NA reduction induced by attenuation of ballistic excitation photons contribute to the enlargement of the core of the PSF2P. Our model predictions establish that wavefront distortion is the major determinant of the PSF2P enlargement. This extends previous work using a homogeneous scattering model, which show that the PSF2P is enlarged in scattering samples . Previous work also showed that scattering sets a fundamental imaging limit (i.e. 5 Lse) due to out of focus 2P excitation . Our modeling did not include 2P excitation generated by scattered photons and out of focus 2P excitation at large distances from the focal point, as these are small at the imaging depths studied here, but could easily be extended to include them. Nevertheless, our modeling showed that 2P excitation due to tissue-induced speckle pattern accounts for more than half of 2P-excitation at 150 μm for an NA of 0.7. Moreover, the fraction of the 2P excitation carried by the surrounding lobes is expected to be larger for higher NA configurations, since they are more prone to aberration. Indeed, our modeling shows that the 3D speckle pattern is responsible for most of loss of spatial resolution. It has been suggested recently from adaptive optics experiments on various fixed tissue that scattering makes a greater contribution to the decrease in 2P excitation than aberrations arising from wavefront distortion . While our results are consistent with this conclusion our modeling shows that in acute brain slices, wavefront distortions contribute significantly to the decrease of 2P-excitation in brain tissue, and that their effect is particularly pronounced for the small fluorescent structures.
6.3. Correction of brain-induced optical aberrations
Our results show that wavefront shaping using a DMM increased fluorescence by almost a factor of two at a depth of 150 μm by reducing the speckle pattern and improving the SNR. Our wavefront shaping usually reduced the speckle pattern but did not always reduce the size of the main lobe of the PSF2P. At first glance this result seems in contrast with previous reports showing a decrease in the size of different objects in fixed brain slices  or living brain  after wavefront shaping. However, as the size of the objects imaged in previous reports ranged from one micrometer to several tens of micrometers, the dimensions of their images (convolution product of the object and the PSF2P) will depend on both the main lobe of the PSF2P and the extent and intensity of the surrounding lobes. The decrease in the size of the objects observed could therefore have resulted from a decrease in the speckle pattern as well as from a reduction in the size of the core of the PSF2P.
The brain–induced wavefront distortions we corrected for with the DMM did not account for all cortical aberrations. Nevertheless, the fluorescence improvement we obtained is within the same range as that obtained with a spatial light modulator , which can correct for higher spatial frequencies than the DMM used here. Full correction may not be possible, because optical aberrations originating from micro-lensing effects of cellular bodies and vessels  are difficult to correct for due to their local nature and high spatial frequencies. Our results show that a key difficulty in correcting for optical aberrations in living brain tissue is the lack of spatial homogeneity. The ability of the DMM to correct for optical aberrations across the full field of view is dependent on the resolution and the sample [38,39]. A potential solution to this problem has been proposed [7,40], but unfortunately it relies on a large distance between the imaged object and the turbid layers and is therefore of limited utility for imaging brain tissue where such distances are short. Despite these limitations, our results show that implementation of a DMM allows a significant improvement of image quality in acute cortical slices.
We show that wavefront correction can be implemented with a commercially available microscope using both a conventional DMM configuration and a simpler configuration that improved light transmission efficiency by 60%. The simpler configuration allowed us to achieve larger fluorescence improvement thanks to a higher NA, (which is more prone to wavefront distortion). Moreover, we show that DMM optimization can be performed on a subcellular element in a brain slice, making its application to living tissues much more straightforward than using beads. This is likely to be useful for in vivo imaging for two reasons: it can firstly improve tissue penetration allowing deeper layers in the cortex to be reached or less laser power to be used at similar depth, and secondly it can improve the accuracy of anatomical information. These features could be particularly useful for chronic imaging of neuronal growth and plasticity where the resolution of 1 μm spine structures is crucial and photodamage particularly problematic.
We have measured the optical properties of the mammalian cortex and have disentangled the contributions made by wavefront distortion and statistically homogeneous scattering. By identifying key determinants of 2P excitation our results provide a basis for improved adaptive optics-based correction strategies and 2P imaging of brain structure and function in the future.
This work was funded by the MRC (G0400598; RAS), an EMBO long term fellowship to EC (ALTF 517-2005) and the Wellcome Trust (064413). RAS is in receipt of a Wellcome Trust Principal Research Fellowship in Basic Biomedical Science (095667). AJW is supported by a Royal Academy of Engineering/EPSRC personal research fellowship. We thank the UCL mechanical workshop (NPP, UCL), Izumi Harako and Diccon Coyle for their technical help. We would like to thank Paul Kirby for valuable discussions, K. M. Naga Srinivas Nadella and Paul Kirby for their comments on the manuscript and Jason Rothman, Padraig Gleeson and Guy Billing for programming advice. EC, JMG and RAS initiated the project, SPP, AJW and JMG developed the DMM control software, EC, AJW and SPP setup the optical system, EC performed the experiments and analyzed the data apart from the wavefront measurements, which were done by AJW. EC and RAS carried out the mathematical modeling and wrote the paper. RAS supervised the project.
References and links
5. J. Herz, V. Siffrin, A. E. Hauser, A. U. Brandt, T. Leuenberger, H. Radbruch, F. Zipp, and R. A. Niesner, “Expanding two-photon intravital microscopy to the infrared by means of optical parametric oscillator,” Biophys. J. 98(4), 715–723 (2010). [CrossRef] [PubMed]
7. O. Katz, E. Small, Y. Bromberg, and Y. Silberberg, “Focusing and compression of ultrashort pulses through scattering media,” Nat. Photonics 5(6), 372–377 (2011). [CrossRef]
8. C. F. Bohren and D. R. Huffman, Absorption and Scattering of Light by Small Particles (Wiley, 1998).
9. M. Born and E. Wolf, Principles of Optics, 7th ed. (Cambridge, 2001).
10. W. F. Cheong, S. A. Prahl, and A. J. Welch, “A review of the optical properties of biological tissues,” IEEE J. Quantum Electron. 26(12), 2166–2185 (1990). [CrossRef]
11. A. N. Yaroslavsky, P. C. Schulze, I. V. Yaroslavsky, R. Schober, F. Ulrich, and H. J. Schwarzmaier, “Optical properties of selected native and coagulated human brain tissues in vitro in the visible and near infrared spectral range,” Phys. Med. Biol. 47(12), 2059–2073 (2002). [CrossRef] [PubMed]
14. R. K. Tyson, Principles of Adaptive Optics (Academic, 1998).
18. L. Sherman, J. Y. Ye, O. Albert, and T. B. Norris, “Adaptive correction of depth-induced aberrations in multiphoton scanning microscopy using a deformable mirror,” J. Microsc. 206(1), 65–71 (2002). [CrossRef] [PubMed]
20. M. Rueckel, J. A. Mack-Bucher, and W. Denk, “Adaptive wavefront correction in two-photon microscopy using coherence-gated wavefront sensing,” Proc. Natl. Acad. Sci. U.S.A. 103(46), 17137–17142 (2006). [CrossRef] [PubMed]
21. D. Débarre, E. J. Botcherby, T. Watanabe, S. Srinivas, M. J. Booth, and T. Wilson, “Image-based adaptive optics for two-photon microscopy,” Opt. Lett. 34(16), 2495–2497 (2009). [CrossRef] [PubMed]
22. Y. P. Zhou, T. Bifano, and C. Lin, “Adaptive optics two-photon fluorescence microscopy ” Proc. SPIE 6467, 646705 (2007).
23. N. Ji, D. E. Milkie, and E. Betzig, “Pupil-segmentation-based adaptive optics for microscopy,” Proc. SPIE 7931, 79310I (2011)
25. E. W. Weisstein, “Gaussian integral,” Wolfram MathWorld, (1999), http://mathworld.wolfram.com/GaussianIntegral.html.
27. E. Chaigneau and R. A. Silver, University College London, London, UK, are preparing a manuscript entitled “Refractive index mismatch effects at edges: theory and application to two-photon imaging of biological samples.”
28. M. Oheim, E. Beaurepaire, E. Chaigneau, J. Mertz, and S. Charpak, “Two-photon microscopy in brain tissue: parameters influencing the imaging depth,” J. Neurosci. Methods 111(1), 29–37 (2001). [CrossRef] [PubMed]
29. D. Kleinfeld, P. P. Mitra, F. Helmchen, and W. Denk, “Fluctuations and stimulus-induced changes in blood flow observed in individual capillaries in layers 2 through 4 of rat neocortex,” Proc. Natl. Acad. Sci. U.S.A. 95(26), 15741–15746 (1998). [CrossRef] [PubMed]
30. B. Richards and E. Wolf, “Electromagnetic diffraction in optical systems. 2. Structure of the image field in an aplanatic system,” Proc. R. Soc. London A Math. Phys. Eng. Sci. 253(1274), 358–379 (1959). [CrossRef]
31. S. P. Poland, A. J. Wright, and J. M. Girkin, “Evaluation of fitness parameters used in an iterative approach to aberration correction in optical sectioning microscopy,” Appl. Opt. 47(6), 731–736 (2008). [CrossRef] [PubMed]
32. A. J. Wright, D. Burns, B. A. Patterson, S. P. Poland, G. J. Valentine, and J. M. Girkin, “Exploration of the optimisation algorithms used in the implementation of adaptive optics in confocal and multiphoton microscopy,” Microsc. Res. Tech. 67(1), 36–44 (2005). [CrossRef] [PubMed]
33. E. Wolf, “Electromagnetic diffraction in optical systems. 1. An integral representation of the image field,” Proc. R. Soc. London A Math. Phys. Eng. Sci. 253(1274), 349–357 (1959). [CrossRef]
34. M. Schwertner, M. J. Booth, M. A. A. Neil, and T. Wilson, “Measurement of specimen-induced aberrations of biological samples using phase stepping interferometry,” J. Microsc. 213(1), 11–19 (2004). [CrossRef] [PubMed]
35. F. P. Bolin, L. E. Preuss, R. C. Taylor, and R. J. Ference, “Refractive index of some mammalian tissues using a fiber optic cladding method,” Appl. Opt. 28(12), 2297–2303 (1989). [CrossRef] [PubMed]
37. M. Schwertner, M. J. Booth, and T. Wilson, “Simulation of specimen-induced aberrations for objects with spherical and cylindrical symmetry,” J. Microsc. 215(3), 271–280 (2004). [CrossRef] [PubMed]
38. A. J. Wright, S. P. Poland, J. M. Girkin, C. W. Freudiger, C. L. Evans, and X. S. Xie, “Adaptive optics for enhanced signal in CARS microscopy,” Opt. Express 15(26), 18209–18219 (2007). [CrossRef] [PubMed]
39. S. P. Poland, A. J. Wright, S. Cobb, J. C. Vijverberg, and J. M. Girkin, “A demonstration of the effectiveness of a single aberration correction per optical slice in beam scanned optically sectioning microscopes,” Micron 42(4), 318–323 (2011). [CrossRef]