## Abstract

Wavefront sensing in the presence of background light sources is complicated by the need to restrict the effective depth of field of the wavefront sensor. This problem is particularly significant in direct wavefront sensing adaptive optic (AO) schemes for correcting imaging aberrations in biological microscopy. In this paper we investigate how a confocal pinhole can be used to reject out of focus light whilst still allowing effective wavefront sensing. Using a scaled set of phase screens with statistical properties derived from measurements of wavefront aberrations induced by *C. elegans* specimens, we investigate and quantify how the size of the pinhole and the aberration amplitude affect the transmitted wavefront. We suggest a lower bound for the pinhole size for a given aberration strength and quantify the optical sectioning provided by the system. For our measured aberration data we find that a pinhole of size approximately 3 Airy units represents a good compromise, allowing effective transmission of the wavefront and thin optical sections. Finally, we discuss some of the practical implications of confocal wavefront sensing for AO systems in microscopy.

© 2013 OSA

## 1. Introduction

Wavefront sensing is often complicated by the presence of unwanted signals caused by background light sources or interreflections and scattering. This problem is particularly significant in the application of adaptive optic (AO) schemes to correct imaging aberrations in biological microscopes. Over the past decade significant research efforts have been made to develop various AO approaches and allow deeper imaging of complex samples such as model organisms and tissues [1]. Direct wavefront sensing in microscopy is often hampered by a lack of wavefront reference sources, termed ‘guide stars’ in analogy with astronomical adaptive optics. As a result, many of these schemes use wavefront sensorless configurations [2–4], limiting the speed and accuracy of the correction. However, several direct sensing methods have been proposed using backscattered light [5, 6] and fluorescent guide stars [7, 8] for wavefront sensing. In all such methods it is necessary to restrict effective depth of field of the sensor such that only light emitted from close to the plane of the object which is being imaged is received by the wavefront sensor. For samples with appropriate scattering characteristics this may be achieved using a coherence gate [9, 10]. A seemingly simple alternative is to utilize the optical sectioning provided by a pinhole in the Fourier plane of the pupil of the objective lens. However, the pinhole modifies the field at the wavefront sensor (WFS), potentially introducing errors into the measurement.

In this paper we consider some of the properties of a generalized confocal wavefront sensor (CWFS), comprised of an objective lens, a 4*f* imaging system and a circular confocal pinhole. A statistical model for wavefront aberrations is obtained from measurements performed on *C. elegans* specimens using a microscope system incorporating a wavefront sensor. Numerical propagation of sets of phase screens generated from this statistical model is then used to investigate and quantify how the pinhole affects the wavefront measured by the WFS. We also explore errors due to defocus introduced by axial translation of the light source away from the focal plane of the objective lens.

## 2. Description of the confocal wavefront sensor

The basic confocal wavefront sensing arrangement is shown in Fig. 1. Lenses L_{2} and L_{3} form a 4*f* system which images the pupil plane of the objective lens (L_{1}) onto the WFS plane, represented here as the lenslet array of a Shack-Hartmann wavefront sensor. A pinhole at the back focal plane of L_{2} serves to reject light originating away from the front focal plane of L_{1}.

The effect of a spatial filter on the phase of a complex field has been investigated extensively in reference [11]. In this work the authors expand the phase of the field in the aperture (pupil) using a Taylor series and show that a single spatial frequency in the wavefront gives rise to copies of the diffraction pattern of the aperture. For small aberration amplitudes (small phase angles) the phase may be approximated using only the first order term in the series expansion and the field at the pinhole is comprised of the zero and first diffracted orders. In this limit the system approximates a low pass filter, with a cutoff of *l*_{cutoff} = *r*_{ph} /λ*f*_{2}. The finite extent of each order of the diffraction pattern causes departures from ideal behavior particularly for intermediate spatial frequencies where the center of the first diffracted order lies close to the edge of the pinhole. In the limit of small aberration amplitude and a large pupil diameter, the wavefront at the WFS plane reduces to the wavefront in the pupil plane convolved with the Fourier transform of the pinhole. In this case the CWFS transfers spatial frequencies in the phase in a manner analogous to the transfer of spatial frequencies in intensity by an incoherent imaging system. As the aberration amplitude increases, significant power is diffracted into higher orders and this simple linear filtering approximation breaks down.

Figure 2 illustrates this behavior using the example of a pupil field with a uniform amplitude and a sinusoidal phase variation across the pupil, for a pinhole of diameter 2 Airy units (where 1 AU = 1.22*λ*/NA and NA is the numerical aperture of the first relay lens L_{2}). In Fig. 2(a) the sinusoidal phase modulation has a small amplitude (rms = λ/13) and the pinhole approximates a low pass filter which rejects spatial frequency content above the geometrical cutoff at *r*_{ph} /λ*f*_{2} (equivalent to 2.44 cycles over the pupil, shown by the white vertical line). The only significant departure from this behavior occurs close to the edge of the image of the pupil. Figure 2(b) shows the same system, but for larger amplitude harmonics (rms = λ/4). In this case, the wavefront in the WFS plane differs significantly from that in the pupil plane even for low spatial frequency components well below the geometrical cutoff. The phase in the WFS plane contains spatial frequencies significantly above the cutoff.

## 3 Numerical simulation of the confocal wavefront sensor

#### 3.1 Simulation method

In order to investigate the properties of the CWFS we consider how the pinhole modifies the phase of a field with uniform amplitude as it propagates from the pupil to the WFS plane. Pupil plane phase screens were created on a square sampling grid with the pupil defined over a circular region of diameter 256 sampling points in the center. The field at the pinhole plane was calculated as a discrete Fourier transform (DFT) of the sampled pupil field. After multiplication with a binary mask, representing the pinhole, a second DFT was performed to determine the field in the WFS plane. Phase unwrapping was performed as required.

As the amplitude of the aberration in the pupil plane increases, the interaction of the complex field in the Fourier plane of the objective lens pupil with the pinhole results in increasing numbers of phase singularities at the WFS plane. Figure 3 shows how the mean number of singularities in the WFS plane depends on the rms wavefront aberration in the pupil plane, for 100 pupil plane phase screens generated from a power spectral density function given by

To quantify the effect of the pinhole on the wavefront requires a measure that is valid in the presence of phase singularities. However, linear measures of the wavefront itself (e.g. rms wavefront error) fail in the presence of such singularities due to the inherent multi-valued nature of the wavefront phase. In such cases it is convenient to use the complex exponential of the wavefront phase. Such an approach has been used previously to quantify the performance of an atmospheric AO system with strong scintillation [17]. Following this approach we integrate the complex exponential of the phase error introduced by the pinhole (normalized to the area of the pupil), to obtain an effective Strehl ratio

*S*is equal to the Strehl ratio for an imaging system with the wavefront error of the exponent. We use this measure to quantify the effect of the pinhole and establish acceptable limits for the pinhole size for a given aberration amplitude in the pupil plane.

_{ϕ}#### 3.2 Wavefront statistics in C. elegans

We tested the CWFS using a set of 100 phase screens derived from wavefront aberration measurements performed in *C. elegans* specimens. *C. elegans* is a transparent nematode worm (see inset to Fig. 4) which is one of the most widely studied model systems in biological research. Adult N2 *C. elegans* specimens were pretreated with 4% paraformaldehyde for 30 minutes and mounted in M9 buffer. A glass coverslip, which had been pre-coated with a thin layer of red fluorescent dye (Alexa Fluor 633, Molecular Probes), was placed on top of the specimens and sealed with nail varnish. Wavefront measurements were performed using a custom-built fluorescence microscope incorporating a Shack-Hartmann wavefront sensor (SHWFS). The local wavefront aberration was measured at positions throughout the specimens using guide stars created by illuminating a small area of the fluorescent dye underneath the specimen with the focused output of a 635 nm laser diode. Even considering the increase in the size of the illumination spot due to imaging aberrations, the size of the guide star was still significantly smaller than the diffraction limit of the lenslets in the SHWFS. As such, each guide star may be considered a good approximation to a point source.

The fluorescent emission from each guide star was collected by the objective lens (LMPLFLN 100x / 0.8, Olympus) of the microscope and the field in the pupil was imaged onto the lenslet array of the SHWFS by achromatic doublet lenses arranged in a 4*f* configuration. A fluorescence filter blocked backscattered light from reaching the WFS. Following spot centroiding and tilt calculation, the wavefront over the pupil was computed using a modal reconstruction with a Zernike basis [18], with 20 subapertures across the diameter of the pupil. In order to isolate the aberrations induced by the specimen, each wavefront was calculated relative to a measurement taken from a point just outside the body of each worm. Measurements were performed at 40 locations within the outer cuticle of two *C. elegans* specimens. These locations were distributed approximately uniformly throughout the body of each specimen with each measurement point separated by ~40 μm.

The results of these wavefront measurements are shown in Fig. 4. The measured rms wavefront aberration was between λ/15 and λ/5 with a mean of λ/10. In general, both the mean magnitude and standard deviation of the Zernike coefficients decreases with increasing radial order. The exception is the significant amount of first order spherical aberration (Z_{4}^{0}) caused by the difference in refractive index between the specimen and the immersion medium of the objective lens (air) [19]. These results are consistent with measurements performed on various model biological organisms and tissues including other *C. elegans* specimens [7, 13–15, 20]. For many of these samples the wavefront in the pupil of the objective lens was found to be well represented by a relatively small number of low order Zernike modes (typically ≤ 36) with the amplitude of the modes decreasing with increasing radial order and azimuthal frequency. Ray tracing approaches have also been used to examine the aberrations induced by some structures commonly encountered in biological imaging including spherical (cell-like) and cylindrical (fiber-like) objects [21]. Again the results show that such features result in a wavefront which can be effectively described by a relatively small number of low order Zernike modes which tend to decrease in amplitude with increasing mode number. As such it may be suggested that our data represents a fair approximation to the typical wavefront statistics often encountered in biological microscopy.

In order to generate pupil plane phase screens with the same statistics as the measured data, weighted sets of Zernike coefficients corresponding to the measured covariance were generated using the Karhunen-Loeve functions [22]. Phase screens were then evaluated over a pupil plane grid and scaled to give wavefronts corresponding to different mean rms aberration strengths.

#### 3.3 Effect of the pinhole on the transmitted wavefront

Figure 5(a) shows the mean effective Strehl ratio, *S _{ϕ}* (Eq. (2)), calculated by propagating scaled sets of the 100 pupil plane phase screens through the CWFS with different pinhole sizes. Each contour line corresponds to an interval of 0.1 in

*S*. As expected, for a given pinhole size,

_{ϕ}*S*decreases with increasing rms wavefront aberration in the pupil plane. Similarly, for a given pupil plane rms wavefront aberration

_{ϕ}*S*increases with increasing pinhole size. In the limit that the pinhole becomes infinitesimally small, the wavefront in the WFS plane is flat and the residual wavefront error is equal to the rms of the pupil plane wavefront. For many applications it is common to consider effective ‘diffraction limited’ imaging to have been achieved when the Strehl ratio is greater than 0.8. The largest rms wavefront aberration measured in our

_{ϕ}*C. elegans*specimens was λ/5 suggesting a pinhole size of at least 2.9 Airy units for the resulting wavefront measurement error to correspond to an effective Strehl ratio of greater than 0.8. Figure 5(b) shows the wavefront at the WFS plane for a pupil plane wavefront with rms = λ/5 for different pinhole sizes. As the pinhole gets smaller the wavefront is gradually flattened and the removal of high spatial frequency components by the pinhole leads to an apparent smoothing of the wavefront.

#### 3.4 Rejection of out of focus light and the effect of defocus

As the pinhole is made larger it also allows more out of focus light to reach the WFS plane. The optical sectioning provided by the pinhole for a given pupil field may be calculated by including a defocus term in the pupil [23], such that the pupil field is now written

where*u*is a normalized defocus unit dependent on the wavenumber,

*k*, the axial distance from the Gaussian image plane,

*z*, the refractive index,

*n*, and the half angle of the image forming cone of the objective,

*α*,

*u*=

*z*4

*kn*sin

^{2}(α/2) and

*ρ*is the normalized radial coordinate in the pupil. We make the assumption that, other than the addition of defocus to the pupil plane wavefront, the underlying wavefront aberration does not change for small axial shifts.

Figure 6(a) shows the mean optical section thickness versus pinhole size for differing mean rms wavefront aberrations in the pupil plane, calculated for 100 scaled phase screens, where we define the thickness of the optical section as the full width at half maximum of the axial pinhole transmittance. There is a significant increase in the optical section thickness with increasing aberration amplitude, particularly for larger pinhole sizes. For a 3 AU diameter pinhole and the largest measured pupil plane aberration amplitude for our *C. elegans* specimen (rms = λ/5) the section thickness is 41 normalized defocus units, corresponding to 8.2 waves for a 0.8 NA objective lens. Figure 6(b) shows an example of the light intensity transmitted by the pinhole for an example pupil plane phase screen with an rms of λ/2. In this example the presence of aberrations means that the drop in transmittance is no longer symmetric as the guide star is displaced either side of the focal plane.

Axial translation of the guide star away from the focal plane of the objective lens results in defocus at the pupil plane. Provided this translation is within the optical section thickness then significant light is transmitted by the pinhole. As we have seen, filtering of the field by the pinhole modifies the wavefront in the WFS plane. In the case of defocus in the pupil plane, the cylindrical symmetry of the system means that various orders of spherical aberration are introduced at the WFS plane. Figure 7 shows the resulting residual wavefront error at the WFS plane caused by defocus in the pupil for an otherwise aberration free system, calculated for axial shifts within the optical section shown in Fig. 6. In all cases, the rms wavefront error increases monotonically with increasing defocus and is within λ/10.

## 4. Discussion and conclusions

The results of our simulations suggest that provided an appropriately-sized pinhole is chosen the CWFS can be effective in allowing an accurate measurement of the wavefront whilst providing some rejection of out of focus light. For the largest rms wavefront aberration measured in our *C. elegans* specimens we find that a pinhole of diameter 3 AU allows accurate transmission of phase information from the pupil to WFS plane, corresponding to an effective Strehl ratio of 0.8, while rejecting light greater than ~40 defocus units (or ~8 waves for a 0.8 NA objective lens) from the focal plane of the objective lens. One source of error arises when the guide star is axially displaced from the focal plane of the objective lens resulting in defocus being introduced into the wavefront at the pupil plane. Filtering of the defocussed field by the pinhole introduces spurious spherical aberration into the wavefront at the WFS plane. However, for small axial displacements, within the optical section defined by the pinhole, these errors are relatively small (rms < λ/10). The filtering of the complex field by the pinhole can introduce phase singularities at the WFS plane, with the number of singularities tending to increase with the strength of the aberration in the pupil. These singularities are not present in the pupil plane and form part of the wavefront error introduced by the pinhole, but their presence requires care in quantifying the effect of the pinhole on the wavefront at the WFS plane. Singularities are a potential issue for the wavefront sensor since phase dislocations can disrupt the performance of some wavefront sensing systems [24], although various AO systems have been shown to work effectively in the presence of optical vortices [25]. However, for the CWFS it is the effect of phase singularities on wavefront sensing rather than correction of vortices in the wavefront that is important.

Our simulations were performed using pupil plane phase screens with statistics derived from aberration measurements performed in *C. elegans* specimens. The relative magnitude of the measured Zernike coefficients was similar to aberration measurements reported by other researchers for a number of different biological specimens. As such our model may be considered a reasonable approximation to the wavefront aberrations introduced by a variety of biological samples.

In practice, the performance of a confocal wavefront sensor will also be affected by the presence of other, bright wavefront sources within the same optical section of the confocal system. In such a case, the field in the pupil is a superposition of light from these different sources, which will result in a wavefront estimate that depends on the nature of the wavefront sensor. For a simple SHWFS, with a response which is linear in irradiance, this will be a weighted average of the wavefronts of the different sources. In this present work we have not considered the effect of amplitude variations in the field at the WFS plane caused by the pinhole. In practice amplitude variations may also have an effect on the accuracy of the CWFS which will depend on the details of the wavefront sensing technique employed. Both of these latter aspects could form the basis of further research.

## Acknowledgments

The authors thank Andrew Vaughan and Katie Ryan at the Medical Research Council Laboratory for Molecular Cell Biology for the preparation of *C. elegans* samples.

This work was funded by the National Measurement System Directorate of the UK Department for Business, Innovation and Skills. The identification of certain commercial equipment does not imply recommendation or endorsement by NPL, nor does it imply that the equipment identified is the best available for the purpose.

## References and links

**1. **M. J. Booth, “Adaptive optics in microscopy,” Philos Trans A Math Phys Eng Sci **365**(1861), 2829–2843 (2007). [CrossRef] [PubMed]

**2. **M. J. Booth, “Wavefront sensorless adaptive optics for large aberrations,” Opt. Lett. **32**(1), 5–7 (2007). [CrossRef] [PubMed]

**3. **D. Debarre, M. J. Booth, and T. Wilson, “Image based adaptive optics through optimisation of low spatial frequencies,” Opt. Express **15**(13), 8176–8190 (2007). [CrossRef] [PubMed]

**4. **N. Ji, D. E. Milkie, and E. Betzig, “Adaptive optics via pupil segmentation for high-resolution imaging in biological tissues,” Nat. Methods **7**(2), 141–147 (2010). [CrossRef] [PubMed]

**5. **J. W. Cha, J. Ballesta, and P. T. C. So, “Shack-Hartmann wavefront-sensor-based adaptive optics system for multiphoton microscopy,” J. Biomed. Opt. **15**(4), 046022 (2010). [CrossRef] [PubMed]

**6. **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]

**7. **O. Azucena, J. Crest, S. Kotadia, W. Sullivan, X. Tao, M. Reinig, D. Gavel, S. Olivier, and J. Kubby, “Adaptive optics wide-field microscopy using direct wavefront sensing,” Opt. Lett. **36**(6), 825–827 (2011). [CrossRef] [PubMed]

**8. **X. Tao, B. Fernandez, O. Azucena, M. Fu, D. Garcia, Y. Zuo, D. C. Chen, and J. Kubby, “Adaptive optics confocal microscopy using direct wavefront sensing,” Opt. Lett. **36**(7), 1062–1064 (2011). [CrossRef] [PubMed]

**9. **M. Feierabend, M. Rückel, and W. Denk, “Coherence-gated wave-front sensing in strongly scattering samples,” Opt. Lett. **29**(19), 2255–2257 (2004). [CrossRef] [PubMed]

**10. **J. Wang and A. G. Podoleanu, “Demonstration of real-time depth-resolved Shack-Hartmann measurements,” Opt. Lett. **37**(23), 4862–4864 (2012). [CrossRef] [PubMed]

**11. **L. A. Poyneer and B. Macintosh, “Spatially filtered wave-front sensor for high-order adaptive optics,” J. Opt. Soc. Am. A **21**(5), 810–819 (2004). [CrossRef] [PubMed]

**12. **R. G. Lane, A. Glindemann, and J. C. Dainty, “Simulation of a Kolmogorov phase screen,” Waves Random Media **2**(3), 209–224 (1992). [CrossRef]

**13. **O. Azucena, J. Crest, J. Cao, W. Sullivan, P. Kner, D. Gavel, D. Dillon, S. Olivier, and J. Kubby, “Wavefront aberration measurements and corrections through thick tissue using fluorescent microsphere reference beacons,” Opt. Express **18**(16), 17521–17532 (2010). [CrossRef] [PubMed]

**14. **A. Facomprez, E. Beaurepaire, and D. Débarre, “Accuracy of correction in modal sensorless adaptive optics,” Opt. Express **20**(3), 2598–2612 (2012). [CrossRef] [PubMed]

**15. **M. Schwertner, M. J. Booth, and T. Wilson, “Characterizing specimen induced aberrations for high NA adaptive optical microscopy,” Opt. Express **12**(26), 6540–6552 (2004). [CrossRef] [PubMed]

**16. **X. D. Tao, J. Crest, S. Kotadia, O. Azucena, D. C. Chen, W. Sullivan, and J. Kubby, “Live imaging using adaptive optics with fluorescent protein guide-stars,” Opt. Express **20**(14), 15969–15982 (2012). [CrossRef] [PubMed]

**17. **J. Notaras and C. Paterson, “Point-diffraction interferometer for atmospheric adaptive optics in strong scintillation,” Opt. Commun. **281**(3), 360–367 (2008). [CrossRef]

**18. **W. H. Southwell, “Wave-front estimation from wave-front slope measurements,” J. Opt. Soc. Am. **70**(8), 998–1006 (1980). [CrossRef]

**19. **M. Shaw, S. Hall, S. Knox, R. Stevens, and C. Paterson, “Characterization of deformable mirrors for spherical aberration correction in optical sectioning microscopy,” Opt. Express **18**(7), 6900–6913 (2010). [CrossRef] [PubMed]

**20. **X. D. Tao, B. Fernandez, O. Azucena, M. Fu, D. Garcia, Y. Zuo, D. C. Chen, and J. Kubby, “Adaptive optics confocal microscopy using direct wavefront sensing,” Opt. Lett. **36**(7), 1062–1064 (2011). [CrossRef] [PubMed]

**21. **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]

**22. **N. Roddier, “Atmospheric wavefront simulation using Zernike polynomials,” Opt. Eng. **29**(10), 1174–1180 (1990). [CrossRef]

**23. **T. Wilson, “Resolution and optical sectioning in the confocal microscope,” J. Microsc. **244**(2), 113–121 (2011). [CrossRef] [PubMed]

**24. **J. D. Barchers, D. L. Fried, and D. J. Link, “Evaluation of the performance of Hartmann sensors in strong scintillation,” Appl. Opt. **41**(6), 1012–1021 (2002). [CrossRef] [PubMed]

**25. **C. Paterson and J. Notaras, “Demonstration of closed-loop adaptive optics with a point-diffraction interferometer in strong scintillation with optical vortices,” Opt. Express **15**(21), 13745–13756 (2007). [CrossRef] [PubMed]