Wavefront correction in two-photon microscopy with a multi-actuator adaptive lens

A multi-actuator adaptive lens (AL) was incorporated into a multi-photon (MP) microscope to improve the quality of images of thick samples. Through a hill-climbing procedure the AL corrected for the specimen-induced aberrations enhancing MP images. The final images hardly differed when two different metrics were used, although the sets of Zernike coefficients were not identical. The optimized MP images acquired with the AL were also compared with those obtained with a liquid-crystal-on-silicon spatial light modulator. Results have shown that both devices lead to similar images, which corroborates the usefulness of this AL for MP imaging. © 2018 Optical Society of America under the terms of the OSA Open Access Publishing Agreement OCIS codes: (110.1080) Active or adaptive optics; (170.3880) Medical and biological imaging; (180.4315) Nonlinear microscopy. References and links 1. W. Denk, J. H. Strickler, and W. W. Webb, “Two-photon laser scanning fluorescence microscopy,” Science 248(4951), 73–76 (1990). 2. F. Helmchen and W. Denk, “Deep tissue two-photon microscopy,” Nat. Methods 2(12), 932–940 (2005). 3. O. Albert, L. Sherman, G. Mourou, T. B. Norris, and G. Vdovin, “Smart microscope: an adaptive optics learning system for aberration correction in multiphoton confocal microscopy,” Opt. Lett. 25(1), 52–54 (2000). 4. M. A. A. Neil, R. Juskaitis, M. J. Booth, T. Wilson, T. Tanaka, S. Kawata, and R. Juškaitis, “Adaptive aberration correction in a two-photon microscope,” J. Microsc. 200(2), 105–108 (2000). 5. 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). 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). 7. 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). 8. R. Aviles-Espinosa, J. Andilla, R. Porcar-Guezenec, O. E. Olarte, M. Nieto, X. Levecq, D. Artigas, and P. LozaAlvarez, “Measurement and correction of in vivo sample aberrations employing a nonlinear guide-star in twophoton excited fluorescence microscopy,” Biomed. Opt. Express 2(11), 3135–3149 (2011). 9. X. Tao, A. Norton, M. Kissel, O. Azucena, and J. Kubby, “Adaptive optical two-photon microscopy using autofluorescent guide stars,” Opt. Lett. 38(23), 5075–5078 (2013). 10. K. Wang, D. E. Milkie, A. Saxena, P. Engerer, T. Misgeld, M. E. Bronner, J. Mumm, and E. Betzig, “Rapid adaptive optical recovery of optimal resolution over large volumes,” Nat. Methods 11(6), 625–628 (2014). 11. P. Marsh, D. Burns, and J. Girkin, “Practical implementation of adaptive optics in multiphoton microscopy,” Opt. Express 11(10), 1123–1130 (2003). 12. 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). 13. 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). 14. M. Skorsetz, P. Artal, and J. M. Bueno, “Performance evaluation of a sensorless adaptive optics multiphoton microscope,” J. Microsc. 261(3), 249–258 (2016). 15. N. Ji, T. R. Sato, and E. Betzig, “Characterization and adaptive optical correction of aberrations during in vivo imaging in the mouse cortex,” Proc. Natl. Acad. Sci. U.S.A. 109(1), 22–27 (2012). Vol. 26, No. 11 | 28 May 2018 | OPTICS EXPRESS 14278 #321149 https://doi.org/10.1364/OE.26.014278 Journal © 2018 Received 31 Jan 2018; revised 15 Mar 2018; accepted 15 Mar 2018; published 21 May 2018 16. R. Fiolka, K. Si, and M. Cui, “Complex wavefront corrections for deep tissue focusing using low coherence backscattered light,” Opt. Express 20(15), 16532–16543 (2012). 17. 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). 18. J. Tang, R. N. Germain, and M. Cui, “Superpenetration optical microscopy by iterative multiphoton adaptive compensation technique,” Proc. Natl. Acad. Sci. U.S.A. 109(22), 8434–8439 (2012). 19. L. Kong and M. Cui, “In vivo neuroimaging through the highly scattering tissue via iterative multi-photon adaptive compensation technique,” Opt. Express 23(5), 6145–6150 (2015). 20. Y. Shao, W. Qin, H. Liu, J. Qu, X. Peng, H. Niu, and B. Z. Gao, “Multifocal multiphoton microscopy based on a spatial light modulator,” Appl. Phys. B 107(3), 653–657 (2013). 21. H. Ren and S. Wu, Introduction to Adaptive Lenses (John Wiley & Sons, 2012). 22. T. V. Glastian, Smart Mini-Cameras (CRC press, 2013). 23. S. Bonora, Y. Jian, P. Zhang, A. Zam, E. N. Pugh, Jr., R. J. Zawadzki, and M. V. Sarunic, “Wavefront correction and high-resolution in vivo OCT imaging with an objective integrated multi-actuator adaptive lens,” Opt. Express 23(17), 21931–21941 (2015). 24. M. Cua, D. J. Wahl, Y. Zhao, S. Lee, S. Bonora, R. J. Zawadzki, Y. Jian, and M. V. Sarunic, “Coherence-gated sensorless adaptive optics multiphoton retinal imaging,” Sci. Rep. 6(1), 32223 (2016). 25. R. A. Muller and A. Buffington, “Real-time correction of atmospherically degraded telescope images through image sharpening,” J. Opt. Soc. Am. A 64(9), 1200–1210 (1974). 26. Y. F. Choong, F. Rakebrandt, R. V. North, and J. E. Morgan, “Acutance, an objective measure of retinal nerve fibre image clarity,” Br. J. Ophthalmol. 87(3), 322–326 (2003). 27. J. J. Hunter, C. J. Cookson, M. L. Kisilak, J. M. Bueno, and M. C. W. Campbell, “Characterizing image quality in a scanning laser ophthalmoscope with differing pinholes and induced scattered light,” J. Opt. Soc. Am. A 24(5), 1284–1295 (2007). 28. F. J. Ávila and J. M. Bueno, “Analysis and quantification of collagen organization with the structure tensor in second harmonic microscopy images of ocular tissues,” Appl. Opt. 54(33), 9848–9854 (2015). 29. H. R. G. W. Verstraete, M. Heisler, M. J. Ju, D. Wahl, L. Bliek, J. Kalkman, S. Bonora, Y. Jian, M. Verhaegen, and M. V. Sarunic, “Wavefront sensorless adaptive optics OCT with the DONE algorithm for in vivo human retinal imaging [Invited],” Biomed. Opt. Express 8(4), 2261–2275 (2017). 30. M. J. Booth, “Adaptive optical microscopy: the ongoing quest for a perfect image,” Light Sci. Appl. 3(4), e165 (2014). 31. N. Ji, “Adaptive optical fluorescence microscopy,” Nat. Methods 14(4), 374–380 (2017). 32. M. Booth, “Wave front sensor-less adaptive optics: a model-based approach using sphere packings,” Opt. Express 14(4), 1339–1352 (2006). 33. K. Wang, D. E. Milkie, A. Saxena, P. Engerer, T. Misgeld, M. E. Bronner, J. Mumm, and E. Betzig, “Rapid adaptive optical recovery of optimal resolution over large volumes,” Nat. Methods 11(6), 625–628 (2014). 34. M. Negro, M. Quintavalla, J. Mocci, A. G. Ciriolo, M. Devetta, R. Muradore, S. Stagira, C. Vozzi, and S. Bonora, “High-speed adaptive deformable lens for boosting an high-energy optical parametric amplifier,” in 2017 European Conference on Lasers and Electro-Optics and European Quantum Electronics Conference, (Optical Society of America, 2017), paper CF_3_1.


Introduction
Despite the inherent confocality and sectioning capabilities of multiphoton (MP) microscopy techniques, the imaging performance at deeper layers in tissues is reduced due to the specimen-induced aberrations [1,2].These detrimental effects were early recognized and adaptive optics (AO) approaches were implemented into MP microscopes to compensate for these aberrations and increase the image quality of the acquired images [3][4][5].
Aberrations increase with depth within the sample and ideal images can only be achieved if these aberrations are pre-compensated.Therefore, an accurate procedure requires a planeby-plane assessment and correction of the actual wavefront aberration (WA).Although a direct WA measurement is a difficult task, AO MP images have been obtained using fluorescent "guide stars" (both external beads or the auto-fluorescent signal from the tissue) as point sources for the Hartmann-Shack sensor [6][7][8][9][10].To overpass this assessment of individual plane's WA, wavefront sensorless (WFSL) schemes have been developed [11][12][13][14].These are based on the optimization of an image quality metric and the WA is not directly measured (i.e. a WA sensor is not required).Different algorithms to reach this optimal correction through the maximization of a pre-defined metric have been used (hill-climbing, simulated annealing, stochastic gradient descent…).
The benefit of AO MP microscopy has been demonstrated in different biological samples, ranging from ocular and muscle tissues [11,14] to fish larvae [6] and mouse embryos [13].
Recently, a great attention has been centred in the visualization of brain structures [15].Since brain tissue presents strong scattering, the "classical" AO Zernike modal approach becomes often insufficient and alternative AO schemes have been employed.These include coherencegated wavefront sensing (in highly scattering mouse cortex) [16], pupil segmentation [17] and iterative MP adaptive compensation techniques [18].The operating speed of these procedures have been optimized, and enhanced MP images of living specimens have been reported [15,19].
Both deformable mirrors and liquid-crystal-based spatial light modulators have been used in WFSL techniques to improve MP images.Although the former are widely used in AO MP microscopes, the latter have also been reported to be suitable for experiments involving different types of algorithms [4,14,20].Since both devices work in reflection mode, its integration in an optical system requires optical-path folding and additional elements.Moreover, the use of liquid-crystal modulators is limited by their lower reflectance, the polarization dependence and the slower response time.However, unlike deformable mirrors, they can reproduce discontinuous phase profiles and increase the effective stroke by means of phase wrapping.
Over the last few years, some efforts have been also addressed to develop refractive WA correctors.Liquid adaptive lenses [21] for focus control have been developed by different techniques such as electrowetting, transparent soft polymer membranes, acusto-optic waves and liquid crystals [22].Apart from electrowetting lenses, that can be manufactured with 8 actuators to correct from astigmatism, all these liquid lenses cannot generate high order aberrations and therefore cannot replace deformable mirrors and liquid-crystal spatial light modulators.
Recently, multi-actuator adaptive lenses (ALs) have been demonstrated to be able to generate aberrations up to the 4th order of Zernike polynomials [23].These have been reported to provide improved images in a wide-field microscope when combined with a Hartmann-Shack wavefront sensor for closed-loop control.An AL was also integrated into an optical coherence tomography system to enhance mouse retinal structures by using an imagebased WFSL approach [23].More recently, AO MP imaging with the AL was also demonstrated in a coherent-gated detection system [24] combined with a WFSL scheme.
In this work, we further explore the potential of an AL to improve images acquired with a MP microscope.The benefit of correcting different aberration orders by means of a hillclimbing algorithm is analyzed.The performance of the AL was compared to a liquid-crystalon-silicon (LCoS) spatial light modulator.

Experimental setup
The experimental setup was based on an existing custom-made MP microscope [14].It was modified to include the AL and two lenses (serving as a telescope) in the illumination path.This AL AO module was mounted on a stage that can be removed from the system when necessary.A simplified schematic of the setup is shown in Fig. 1.A 760-nm light beam from a mode locked Ti:Sapphire laser passes the AL lens and is reflected from a pair of galvanometric mirrors (SM1 and SM2) for eventual XY raster scanning.The beam is then focused on the sample by means of the microscope objective (non-immersion, 20x, NA = 0.5).In the detection path the non-linear signal emitted by the sample under analysis travels through the same objective and reaches the detection unit composed of a photo-multiplier tube (PMT) and a photon-counting unit.A spectral long-pass filter placed in front of the PMT is used to isolate the nonlinear signal.The microscope objective is attached to a DC Z-motor for axial focus movements.The imaged samples included pieces of silk mesh and cellulose (these were attached to a microscope slide for a better manipulation).The acquisition time was set to 1 image per second.
A pair of flip mirrors (FM1 and FM2) allows the beam to pass through another AO module.This second AO module uses a LCoS spatial light modulator as corrector element.When this LCoS module is in operation, the AL AO module is removed from the system.The AL (and also the LCOS), the XY scanning unit and the rear pupil of the objective microscope are optically conjugate.The LCoS used here was a Pluto-2 (Holoeye, Berlin, Germany).It consisted of a microdisplay with full HD resolution (1920x1080 pixel; active area: 15.36x8.64mm) and 8.0-µm pixel pitch.This device was specifically developed to provide a phase shift above 2π for infrared light and allows an operation speed of up to 60 Hz [14].

Image acquisition and procedure
The AO elements were used to correct for aberrations by using a hill-climbing algorithm [11,13,14].This is a WFSL approach based on the search of an optimum WA providing a MP image with the highest value of a pre-defined metric.For the present experiment, seven Zernike modes are sequentially generated in the "increasing" direction, that is, from 2nd (except defocus) to 4th order (spherical aberration, Z0 4 ).Here we use the OSA double-index convention (sub-index and super-index indicate the order and the frequency respectively) to describe the Zernike modes.
In brief, for the first term (Z 2 −2 , astigmatism) its amplitude (both positive and negative) was changed in 0.05 μm-steps until the recorded image provided the maximum metric value.Then this value was kept and the procedure repeated again for the next Zernike mode.As the control sequence was run in the increasing order, the final WA was directly estimated when the optimum amplitude of the term Z 0 4 was obtained.Further details on this hill-climbing schema can be found elsewhere [13,14].
Two image quality metrics were used here: image sharpness and acutance.These are respectively defined as: 2

Im [ ( , ) ]
x y age Sharpness I x y x y

I x y I x y I x y I x y I x y I x y I x y I x y I x y I x y I x y I x y I x y I x y I x y I x y
The former provides information on the image total intensity and reaches a maximum in absence of aberration [25].The latter is closely related to the amplitude of the derivative of brightness of an image (i.e. the edge contrast) and the visibility of features [26,27].The acutance of an image is zero if the image is uniform, independently of the grey level.The results of these two metrics will be compared.
The performance of the AL was compared with that of the LCoS.For this aim the AL was removed from the microscope and the flip mirrors FM1 and FM2 allowed the light path beam passing through the LCoS AO module (see Fig. 1).The comparison of the improved MP images provided by both AO devices has been carried out by means of the structure tensor [28].This mathematical tool is based on the calculation of the partial derivatives of every pixel of the image and from them the map (or alternatively histogram) of preferential orientation is computed.The standard deviation of these orientations across the image is defined as the structural dispersion (SD) of the spatial features of the image.The histogram of preferential orientations gives quantitative information on the structure of the imaged sample.Detailed information on this tool can be found in [28].

Adaptive lens: calibration and operation
The AL is composed of two thin glass windows (150-μm thickness) mounted on an 18 piezoelectric actuator ring.The space in between is filled with liquid and it provides a clear aperture of 10-mm in diameter.The response time is below 2 ms and its transmission is larger that 94% for the wavelength here used.This AL can generate aberrations up to the 4th order Zernike polynomials.The stroke depends on the aberration term and the ranges from 0.5 (Z0 4 ) to 7.7 μm (Z 2 −2 and Z 2 2 ).
This AO element was calibrated in a previous operation by means of an off-line measurement with a Hartmann-Shack wavefront sensor working in closed loop.The illumination beam was the same as that used for MP imaging.In that auxiliary optical pathway a CCD camera was also used to record the PSF of the system before and after AO correction.During the calibration the wavefront deformation of each single actuator was assessed to compute the influence function matrix and to determine the command vector to flatten the AL.The residual WA root-mean-square (RMS) error after flattening was about 30 nm.More details on the construction of the AL and the calibration can be found in [23].
An important source of error for the piezoelectric actuators used in this AL is the hysteresis (about 10%).To reduce this error without the use of complex modeling [29] we implemented the following strategy based on a hill-climbing metric acquisition (see Fig. 2).As a first step, and in order to move the AL to the flat position, the hysteresis was discharged by applying a "degauss" operation (point "1" in Fig. 2).This consists of a sinusoidal excitation of all the actuators with decreasing amplitude (10 Hz for 3 s with linear decreasing amplitude values).The pre-defined merit function (i.e.metric) was measured while applying an aberration mode with increasing positive amplitude (step "2" in Fig. 2).Then, a "degauss" operation was applied again (step "3") to reach the starting point before measuring the metric for negative aberration entries (step "4").Subsequently we go back to the origin with another "degauss" (step "5").The final goal is to apply to the AL the aberration that maximizes the metric curve (represented by a red cross in Fig. 2).This operation was repeated for seven Zernike modes sequentially generated from 2nd (Z2 −2 ) to 4th order (Z 4 0 ).

Multiphoton imaging with the adaptive lens
To evaluate the performance of our proposed AO scheme we proceed to acquire and improve MP images using the AL. Figure 3 shows the original image together with the different improved ones for each sequential Zernike order correction.The metric used for this hillclimbing algorithm was the image sharpness.The values of improvement for the metric used are depicted in Fig. 4 (magenta bars).The amplitudes of the WA for each Zernike order are also presented (grey dots).
As expected, the quality of the image increases as the different orders are introduced.For this sample the correction of astigmatism provides an improvement of about 7%, which increases up to ~30% when adding 3rd order terms.An additional increase (up to ~65%) takes place if the 4th order term (just spherical aberration) is included.The improvements are noticeable when correcting for 3rd order terms, the visibility of the features within the image is much better.Another example of the effects of aberration correction using the AL is presented in Fig. 5.In addition to the improved quality of the image, an intensity profile in a region of interest was traced on both images to show the benefit of using AO.It is important to notice that the black parts of the image (background signal) remain as this.This indicates that the AO correction does not introduce noise and the contrast of the image increases, what facilitates the appearance of details (see image at the bottom panel).For this particular profile the total intensity after correcting for aberration (red line) was 72% higher than that without correction (blue line).
In order to check the effects of using another metric, we repeated the experiment predefining the acutance as the metric to be optimized by means of the hill-climbing algorithm.Figure 6 compares the improved image with that obtained when optimizing image sharpness.A simple visual inspection reveals that the optimized images are similar.Despite this, the corresponding WAs differ, although their RMS values were also similar (0.58 and 0.55 μm respectively).

Comparison with a liquid-crystal-on-silicon spatial light modulator
Once the ability of the AL to correct for aberrations in MP microscopy images has been tested, the next step has been to compare its performance with that of a typical adaptive corrector used in MP experiments.In our case an LCoS modulator has been used.This device has been recently used in different AO experiments providing successful results [14,15,17].
Figure 7 presents the results for both AO elements in the same sample at two different depth locations.Both devices provide similar improved images.As expected, the amount of aberration was higher for the deeper plane (the RMS increase from 0.45 to 0.58 μm).In addition, the overall shapes of the optimum WAs were also close to each other.When comparing both devices, the larger difference in RMS between pairs of WAs was about 0.05 μm.This means that the AL and the LCoS operate in a similar way, what corroborates the accurate performance of the AL here used.The corresponding non-null Zernike terms that contribute to improve the images for both devices are depicted in Fig. 8.For the sense of completeness, quantitative information on the improved MP images provided by both AO devices is given in Fig. 9.As stated in Methods, this has been computed by means of the structure tensor.This will help to test if the information on the samples provided by the AL and the LCoS differs.Figure 9 compares the histograms of preferential orientation for the MP images shown in Fig. 7.As expected the low quality of the image without correction does not provide any information.The initial histograms do not show any preferential orientation and the SD values are very high (>60°).However, after the WA correction, the features of the image are readily observable and the structure tensor provides useful spatial information of the sample (organization, fiber distribution,…).In particular, the histograms (as well as the SD values) given by both correction devices are similar.This corroborates the successful performance of the AL when compared to that of the LCoS.

Discussion and conclusions
AO procedures are versatile and powerful approaches to correct for specimen-induced aberrations in different microscopy imaging techniques (see recent reviews in [30] and [31] for general information on this).Both, deformable mirrors and liquid-crystal modulators have been reported to increase MP signals as well as the contrast and/or the resolution of images at different depth locations of thick samples.
In the present work an alternative AO element has been proposed.We have successfully demonstrated the use of a novel transmissive multi-actuator AL for WA correction in thick samples.Its performance when improving MP images has been analyzed.This approach has been effective at different depth locations of non-transparent samples.
"Classical" adaptive elements have been combined with different types of direct WA sensing methods such as coherent-gated sensing [6], confocal selection from a focal region for Hartmann-Shack measurement [7,8] or fluorescent beads used as guide stars [9] among others.However, indirect AO approaches [13,14], as the one here used, have also been shown to be useful tools to increase MP image quality.They avoid the use of WA sensors and use iterative algorithms to optimize the chosen metric.Hill-climbing methods have long been used in these indirect AO procedures [4,11,13,14].Comparisons among different algorithms such random search, simulated annealing and hill-climbing can be found in the literature [12].The choice for the present work was the latter one.Although it is well known that hillclimbing techniques are reliable procedures, they require time to reach the final solution.Time is not an issue in static samples as those here shown, however for the analysis of dynamic and temporal-changing specimens, or highy non-uniform and spatially complex, other algorithms (such zonal-based approaches) might be more convenient.
The main differences between indirect and direct approaches are the speed of performance and the experimental implementation.For the former, a number of methods based on reducing the number of Zernike modes and their amplitude to get the optimal WA have been reported [32].On the other hand, the requirement of a WA sensor and a corrector in direct sensing increase the cost and the experimental complexity (electronics hardward, synchronization,..).
Moreover, a number of metrics can be found in the literature: contrast, spatial frequency, brightness, sharpness,… Our results show that the optimization of two different metrics such as image sharpness and acutance provide similar optimized images.This similarity in the final images was also reported when comparing the sequences of Zernike correction in the increasing and decreasing modes [14].
The performance of the AL has also been compared to that of a liquid-crystal spatial light modulator.Both devices provide similar optimized images, although the required WAs are not identical.In comparison to a liquid-crystal modulator, the AL is polarization insensitive and can operate with broadband sources.The temporal response of the AL is also better than that of the LCoS, what makes the former more suitable for living measurements, in particular brain tissue imaging [33].Unlike the spatial light modulator (reflective element), the AL works in transmission mode, avoiding beam folding and facilitating alignment procedures.Moreover, the implementation of the AL into our MP microscope was straightforward and only minimal modifications were required [14].This experimental implementation significantly reduces the number of optical components (lenses and mirrors) of the microscope.
Light levels might be crucial for MP microscopy and laser science experiments Due to the high transparency of the AL, some of these issues can be minimized.In particular, measurements on the Laser Induced Damage Threshold (LIDT) are required for a safe use of the AL in certain applications.Recent data confirm that this device can be used in the femtosecond regime with pulses of up to 3mJ of energy [34].
However the main drawbacks of the AL compared to the LCoS are related to the accuracy in the WA compensation, that is, the resolution and the stroke.Whereas the AL is composed of a low number of actuators, the LCoS resolution is much larger (>3x10 5 pixels for the pupil size here used) since it directly depends on the size and number of pixels used.This imposes constrains when trying to correct aberrations of complex specimens with high spatial frequency features.Moreover, in terms of stroke the LCoS also presents higher benefits.Phase wrapping increases the effective stroke what permits to correct for larger aberrations and overpass discontinuities.
In summary, the performance of an AL has been analyzed in the present work.The impact of this AO device has been shown in MP images by means of an indirect WA sensing based on a hill-climbing procedure.Results here reported show that this AL has significant potential to be an alternative tool for AO MP applications, although the final choice of an AO corrector element strongly depends on each particular application.Some modifications on the procedure here describe will speed the algorithm, what is important for future MP imaging of living specimens.

Fig. 2 .
Fig. 2. Diagram of the procedure used to reduce the impact of AL's hysteresis.

Fig. 3 .
Fig. 3. Improvement in MP images for the different Zernike orders using the AL.(a) Original image (no correction); improved images when correcting orders 2 (b), 2 and 3 (c) and 2, 3 and 4. The sample is a piece of silk mesh and the plane was located at a depth of 100 μm.

Fig. 4 .
Fig. 4. Improvement in image sharpness for the images shown in Fig. 2 (bars).Grey symbols represent the WA values of each Zernike order.

Fig. 5 .
Fig. 5. Comparison of MP images before (top) and after AO correction (bottom).The plot depicts the intensity profile along the vertical dotted line (blue, AO off; red, AO on).Bar length: 50 µm.The sample corresponds to a stained piece of cellulose (depth location: 80 μm).

Fig. 6 .
Fig. 6.Improvement in MP images using two different metrics: Image sharpness (b) and acutance (c).(a) Original image (no correction).The insets are the WAs that optimize the corresponding images.Scale bar: 50 µm.

Fig. 7 .
Fig. 7. Comparison of improved MP images using the AL and the LCoS modulator.Original images (a, d); optimum images with the AL (b, e); optimum images with the LCoS (c, f).The insets correspond to the WAs that optimize the images.Depth locations: 50 μm (upper panels), 100 μm (bottom panels).Scale bar: 50 µm.

Fig. 8 .
Fig. 8. Individual Zernike coefficients of the WA maps that optimize the MP images using the AL (green bars) and the LCoS (red bars).Left and right data correspond respectively to MP images of top and bottom panels in Fig. 7.

Fig. 9 .
Fig. 9. Histograms of preferential orientation computed from the images in Fig. 7. Top and bottom plots correspond to the AL and the LCoS respectively.The SD values are also included for direct comparisons.