## Abstract

The resolution of Single Molecule Localization Microscopy (SML) is dependent on the width of the Point Spread Function (PSF) and the number of photons collected. However, biological samples tend to degrade the shape of the PSF due to the heterogeneity of the index of refraction. In addition, there are aberrations caused by imperfections in the optical components and alignment, and the refractive index mismatch between the coverslip and the sample, all of which directly reduce the accuracy of SML. Adaptive Optics (AO) can play a critical role in compensating for aberrations in order to increase the resolution. However the stochastic nature of single molecule emission presents a challenge for wavefront optimization because the large fluctuations in photon emission do not permit many traditional optimization techniques to be used. Here we present an approach that optimizes the wavefront during SML acquisition by combining an intensity independent merit function with a Genetic algorithm (GA) to optimize the PSF despite the fluctuating intensity. We demonstrate the use of AO with GA in tissue culture cells and through ~50µm of tissue in the *Drosophila* Central Nervous System (CNS) to achieve a 4-fold increase in the localization precision.

© 2015 Optical Society of America

## 1. Introduction

Single Molecule Localization (SML) microscopy techniques such as PALM, STORM, and their relatives have revolutionized fluorescence microscopy in the past few years, and are fast becoming essential tools for biologists to study cellular structures at the 20nm size scale [1–3]. These techniques are proven to work with biological samples that are a few micrometers thick [4, 5]. However, the aberrations induced by thicker biological samples (greater than roughly 10 µm) are significant [6, 7] and will degrade the resolution of SML. Wavefront aberrations in biological specimens are due principally to the inhomogeneity of the refractive index throughout the sample, and the mismatch between the specimen refractive index and the surrounding medium [8, 9]. In addition, static aberrations from the imperfections in the optical components and misalignment aberrate the wavefront [10]. Aberrations degrade the shape and height of the Point Spread Function (PSF), reducing the number of photons that are used to localize the emission, thereby reducing the resolution.

The resolution of SML is a function of two main factors: the density of fluorophores, and the accuracy of localization. The density of fluorophores must obey the Nyquist criterion [5] — the sampling spatial frequency must be at least twice the maximum spatial frequency that you wish to measure. The issue of spatial sampling has been addressed by optimizing the size of the antibody linkage in immunohistochemical staining [11–13]. The accuracy of localization is determined by the uncertainty in determining the centroid of the emission, given by $\Delta x\cong s/\sqrt{N}$, where s is the PSF width and N is the number of collected photons [14]. Therefore, the resolution can be increased by increasing the number of photons [15] or decreasing the PSF width. In an aberrating sample, Adaptive Optics can increase the resolution of SML both by decreasing s, and, increasing the intensity of the PSF by increasing N. Adaptive Optics (AO) was originally proposed for use in astronomy to correct wavefront aberrations due to atmospheric turbulence [16], but recently it has been used in microscopy to address the problem of aberrations in biological samples [17]. AO systems have been used with several different microscopy techniques including confocal [18–20], multiphoton [21, 22], structured illumination [23] and single molecule localization techniques [24]. In microscopy, as in astronomy, synthetic guide stars (SGS) have been employed to measure the wavefront. These methods use a sub-diffraction size fluorescent SGS [18, 22] or back-scattered excitation light [25] to estimate the wavefront using a Shack-Hartmann or other type of wavefront sensor. However, many sensorless AO systems have also been developed which estimate the wavefront error by applying some known aberration and evaluating the image quality [26, 27]. Sensorless AO can also work in a closed-loop system, and phase retrieval and model-based approaches have been used [26, 28]. Here we report a wavefront sensorless approach using a Genetic Algorithm to compensate for wavefront deviations in real-time during STORM imaging of thick specimens.

Genetic Algorithms (GA) are well suited to both dynamic slowly varying aberrations and noisy measurements [29]. GAs have been used for AO correction in confocal and two-photon microscopy [30, 31], and for wavefront shaping to focus light through turbid media [29, 32]. GAs work on an evolutionary scheme. A population of random wavefronts is generated and then evaluated. In each transition to the next generation, the population is bred and mutated and then re-evaluated. By keeping the improved wavefronts in the population, GAs converge to a final wavefront with the best performance after several iterations. Because the wavefront is varied in a random dynamic manner, and not incrementally, GAs are well suited to dynamic and noisy conditions.

A particular challenge in wavefront correction during STORM imaging is the stochastic nature of the single molecule emission. Only a few fluorophores are emitting in any raw frame, and the number of photons emitted is highly variable, following exponential or Erlang statistics. Therefore, many of the approaches that have been used in sensorless AO will be unsuccessful with raw STORM images.

The use of AO with STORM has been reported in [24, 33, 34]. In [24], AO was used to correct for static system aberrations and to apply astigmatism for 3D STORM but was not used for correction during STORM. In [34], AO was used with a wavefront sensorless approach based on sequentially optimizing individual wavefront modes [27]. Here we develop a method that combines a GA with a novel evaluation metric to optimize the wavefront during the acquisition of raw STORM images (AO-STORM). In particular, we report a Fourier based metric that is relatively independent of the intensity fluctuations. We demonstrate that even in a relatively thin sample, imaging through the nucleus, AO-STORM can improve the imaging. We further demonstrate AO-STORM by imaging neuropeptides in the Drosophila brain through ~50µm of tissue. First we describe the genetic algorithm and evaluation metric, and then we show the results of simulations demonstrating the effect of aberrations on STORM images and the performance of AO-STORM. Finally we show the experimental results and give our conclusions.

## 2. Genetic algorithm

Genetic algorithms are methods of machine learning that use an evolutionary approach to solve optimization problems that are not easily solved analytically. Aberrations in biological samples can have a dynamic characteristic and can be difficult to characterize due to weak signals. Furthermore, for aberrations larger than a few radians, the optimization problem is nonlinear [26]. Therefore, GAs are a suitable solution for minimizing the wavefront error.

Genetic algorithms can be applied to systems which have four criteria for evolutionary systems: the ability to reproduce, e.g. having genes, a population of individuals, variety among the population and differences in fitness. To apply GAs to wavefront optimization, we expand the wavefront in the Zernike basis. (We use the root mean square (RMS) normalized Zernike modes with the ordering from [35].) The genes of the algorithm are the coefficients of the expansion, and an individual is a specific wavefront with a specific set of Zernike coefficients. A population is generated from a random distribution of Zernike coefficients over a prescribed range and successive generations of wavefronts are generated by mixing the genes of individuals in the previous generation. The fitness of each wavefront is evaluated using an image quality metric so that the wavefronts that improve the correction are preferentially selected for generating the next generation. In this way, the wavefront optimization problem satisfies the criteria for a GA [36].

As shown in Fig. 1(a), the algorithm starts by generating *N* wavefronts with random Zernike coefficients. The random coefficients have a uniform distribution over a pre-determined amplitude range. The number *N* is determined by the number of Zernike modes used to describe the wavefront. N should be large enough to provide variety among the population, and small enough not to slow down the algorithm by requiring too many measurements. A smaller value of N increases the chance that the algorithm fails to converge. We used a robust value of 10 times the number of Zernike modes for N. After the initial population is generated, each individual wavefront is evaluated using the metric — to be discussed in the next section — and a fitness value is assigned to each wavefront. Then a new generation is created by the mutation and crossover of the individuals from the previous generation. The approach we use is known as a non-dominated sorting genetic algorithm [37]. The mutation process randomly selects three individuals *a*, *b*, *c*, each represented by their coefficient vectors, and generates a new individual *d*, using polynomial mutation [38]:

*mtr*is the mutation ratio. The crossover process is then applied between each individual in the population,

*a*, and the new mutated individual

*d*, in which genes — the Zernike coefficients — of the mating individuals are exchanged with a probability determined by the crossover ratio

*cxr*. The two processes are applied to each individual,

*a*, to create the new generation. The new generation is now evaluated, and the fitness value of each new individual

*d*, is compared to the fitness of its parent,

*a*. Only individuals with improved fitness will pass on to the next generation, otherwise the previous individual passes on to the next generation. This process is illustrated in Fig. 1(b).

We optimized the values of *mtr* and *cxr* for fastest convergence of the algorithm through a series of simulations. We found that with a crossover ratio of 0.8 and a mutation ratio of 0.1 the algorithm reaches 90% of its steady state value in less than 20 generations, as shown in Fig. 1(c). With mutation ratio values higher than 0.5 the system can become unstable since the coefficients of the individual d can be considerably larger than the original coefficients. We also found that the mutation value should be variable to avoid large fluctuations of the wavefront as the algorithm converges to the optimum. This is particularly important in real time correction and imaging, since we would like a lower variation of the wavefront when the Strehl ratio is high. We define the *mtr* as a function of the standard deviations of fitness values of the previous generations using the following equation:

*t*is a threshold to keep the value of

_{c}*mtr*low, and

*t*is the slope of the decay of the previous generations standard deviation.

_{n}*t*is calculated by linear regression over the past

_{n}*m*generations, using the following formula:

*g*is the generation number and

_{i}*y*is the corresponding standard deviation value. We chose the maximum

_{i}*mtr*to be 0.2 so that

*mtr*stays within an optimum region.

_{n}*C*defines the slope of the the quasi-linear region at the center of the sigmoid function. A typical value for

*C*is 50 to provide enough sensitivity for the

*mtr*.

## 3. Merit function

Many iterative wavefront correction schemes use metrics related to the intensity. In confocal and multiphoton microscopes, the total fluorescence intensity measured at a particular point is used [26, 39]. The mean image intensity has been used with two-photon microscopy [40]. In widefield microscopy, the maximum intensity of the image (or an image region) has been used as a metric [41]. Metrics based on the low-frequency spatial content of the image and the image sharpness are also intensity dependent [23, 42, 43].

However in real time wavefront correction for STORM imaging an intensity independent metric is needed due to the large fluctuations in the intensity of single blinking fluorophores. Figure 2(a) shows the maximum intensity of a wavefront corrected Quantum Dot (QD) blueing STORM data set [44]. As can be seen in the Fig., due to blueing, the average intensity of the fluorophores increases first, and then starts to decrease. Similarly a data set with blinking Alexa 647 dyes in STORM imaging buffer (MEA) is shown in Fig. 2(b), where the intensity of individual images fluctuates with σ/μ ~0.19. The corresponding histograms are shown in Fig. 2(c)-2(d), which show that the fluorophore photon counts follow exponential distributions (an exponential curve fit is shown). For an exponential distribution, σ/μ = 1. Hence an intensity independent algorithm is essential for wavefront correction in real time STORM imaging.

We propose a spatial frequency based metric in which the high frequency content of the image is normalized by the total intensity. We refer to the metric as the Fourier Metric (FM). The metric is defined as

^{−1}which was determined empirically to block out the low frequencies containing background fluorescence. The FM measures the high frequency content of the image normalized by the total intensity. A flat wavefront increases the high-frequency response of the OTF, so the FM value will increase as the wavefront is improved. The metric is different to other approaches such as the sharpness metric [34]. The FM uses a high-pass filter in which the higher spatial frequencies are weighted roughly equally whereas the sharpness metric weights the highest spatial frequencies the most, and these are the frequencies where the optical transfer function is the weakest. The FM helps guide the GA algorithm to the optimum wavefront.

The metric was tested using a series of simulations on blinking fluorophores with exponential intensity distributions and no wavefront aberration. Results from simulations on a set of blinking fluorophores in a circle with average photon counts of 100, 500, 1000, and 5000 are shown in Fig. 2(e)-2(h). A background of 1000 photons/pixel is added and Poisson noise is added to the entire image. With the background, the metric ranges from a low of about 0.2 to about 0.7.

The normalized standard deviations of the maximum intensities are 0.017, 0.12, 0.18, and 0.33. The normalized standard deviations of the Fourier Metric are 0.004, 0.005, 0.011, 0.031, which is about a factor of 10 lower than the deviation of the maximum intensity. We further tested the metric on a single intensity invariant 100nm fluorescent microsphere, Fig. 2(i). Zernike mode amplitudes were scanned from −10 to 10 radians, and the maximum intensity of the fluorescent microsphere image was compared to the Fourier Metric demonstrating that the FM is peaked at zero wavefront aberration.

## 4. Simulations

To illustrate the effects of aberrations and to test and optimize our Genetic Algorithm, we developed a simulation of STORM imaging. A wavefront was generated from an array of ${N}_{Z}$ Zernike modes, with the amplitude of each Zernike selected from a Gaussian distribution with standard deviation, $a=w/{N}_{Z}{}^{1/2}$ where *w* is the average root mean square (RMS) wavefront error. The back pupil plane wavefront corresponding to the emission from a single fluorophore at the origin is then generated, with the radius of the wavefront determined by the numerical aperture and the phase of the wavefront calculated from the sum of the Zernike modes corresponding to the aberration. The intensity of the fluorophore’s emission was determined by an exponential distribution with an average value corresponding to the average number of photons generated by the fluorophores. An average of 5000 photons was used for the simulations in Figs. 3 and 4. An image of each fluorophore is generated by scaling the wavefront by the square root of the intensity, and then multiplying the wavefront by a phase term $\mathrm{exp}\left(2\pi j\left(px+qy\right)\right)$, to place the center of emission at the position, (x,y), of the fluorophore (using the Fourier Shift Theorem) where p and q are the Fourier transform coordinates, corresponding to the position in the back pupil plane.

The wavefront aberration was generated from the first 15 Zernike modes. To test the effect of aberrations, we generated two STORM data sets of a circle with a radius of 250nm consisting of 2000 raw frames. 1000 particles were placed on the circle, and, in each frame, a subset of them determined by a Poisson distribution with mean 3, were emitting photons. No aberration was applied to the first data set (a single raw frame is shown in Fig. 3(a)). However, a 0.8 radian RMS wavefront error was applied to the second data set. As can be seen in the reconstructed images from the two data sets, shown in Fig. 3(b)-3(c) respectively, the reconstructed image without aberrations shows a uniformly distributed circle, whereas the second data set shows lower accuracy of localization. The degradation of the PSF also affects the number of localizations; without aberrations, 1824 points were localized, whereas only 941 points could be identified from the aberrated data set.

We also performed Fourier Ring Correlation (FRC) analysis on the image stacks with and without aberrations, Figs. 3(b) and 3(c) [46, 47]. The resolution with no aberrations was 20 nm, whereas with 0.8 radians of aberrations the resolution was 118 nm, which is a considerable degradation in the resolution. We further tested the effect of a known aberration on the resolution. This was done by performing FRC on simulations with different amounts of defocus keeping all other aberrations at zero. The results are shown in Fig. 4. The resolution is reduced by a factor of ~3 if 1.2 radians of defocus is applied to the wavefront, Fig. 4(g).

We continued by simulating the correction of wavefront aberrations using our Genetic Algorithm during the acquisition of a STORM data set. The implementation of the genetic algorithm we use is the open-source Python package, DEAP [48]. For the simulated object, 1000 fluorophores were placed on a circle with a 0.25μm radius. A random aberration, consisting of the 12 Zernike modes from 3 to 15, was applied to the wavefront. The amplitude of each mode was generated from a uniform distribution. The GA was run over the first 5400 frames to reach 90% of its optimized steady state. For each raw frame, a number of emitting fluorophores was generated from a Poisson distribution with mean 10. Then this number of fluorophores was randomly selected from the list of fluorophores in the simulated object. The simulated PSF of each emitting fluorophore was generated from the wavefront consisting of the initial wavefront aberration and the wavefront applied by the GA. The intensity of each PSF was selected from a Gamma distribution with shape factor k = 2.5. The very first frame without correction is shown in Fig. 3(e). After about 45 generations the algorithm converges to a well-corrected steady state, Figs. 3(d) and 3(f). In the last 10,000 frames, the relative fluctuation, $\sigma /\mu $, of each Zernike mode coefficient were less than 1%. The RMS wavefront error improved from the 2.18 radians initial wavefront error to 0.27 radians after correction, which corresponds to a 0.93 Strehl ratio.

## 5. Experimental results

First we tested AO-STORM on a single fluorescent microsphere on the coverslip and then fluorescent microspheres under a *C. elegans* roundworm. Next we applied AO-STORM to imaging of microtubules through the nucleus of a hepG2 cell and imaging of neuropeptides inside a single neuron in a *Drosophila* (fruit fly) brain lobe.

#### 5.1. Materials and methods

### 5.1.1. Fluorescent microspheres

100nm Yellow-Green Fluorescent microspheres were purchased from Life technologies. The Microspheres were dried on a number 1.5 coverslip. The coverslip was sonicated in Sodium hydroxide (J.T. Baker) for 30 minutes followed by 30 minutes sonication in 98% Ethanol (J.T. Baker) after washing 3 times in deionized water. The coverslip was mounted on a slide using glycerol.

### 5.1.2. Sample preparation of microspheres under a C. elegans sample

15µl of a solution containing 200nm yellow-green fluorescent microspheres (Invitrogen) diluted by a factor of 10^{5} in deionized water, was dried on an electrostatically charged glass slide (Shandon Colorfrost from Thermo Scientific). *C. elegans* roundworms were then placed on the slide on the dried layer of microspheres and fixed with Tetramisole solution, and a no. 1.5 coverslip was fixed on top with nail polish.

### 5.1.3. Tissue culture cells

HepG2 (ATCC) cells were cultured in ATCC-formulated Eagle's Minimum Essential Medium with 10% fetal bovine serum (FBS). The cells were plated onto a PLL (Poly-L-Lysine) coated glass-bottom dish at an initial confluency of about 50% and cultured for one day to let the cells attach to the dish. To immunostain, the culture medium was aspirated, and the cells were washed with Phosphate-Buffered Saline (PBS) once and fixed in a 1:1 Acetone / Methanol solution for 10 min. After 3 washes with PBS, the cells were blocked by incubation with blocking buffer, consisting of 6% Bovine Serum Albumin (BSA) and 10% normal serum in PBS, for 2 hours. Then the blocking buffer was aspirated, and the cells were incubated with Anti α-Tubulin Rabbit primary antibody (abcam) diluted in 6% BSA at 4°C overnight. Then the cells were washed 3 times with the washing buffer for 10 minutes per wash. Then Qdot 565 goat F(ab')2 anti-rabbit IgG conjugate (H + L) (Life Technologies) secondary antibody was added to the sample in 6% BSA and incubated for 2 hours, protected from light. The cells were washed again 3 times with washing buffer (0.2% BSA and 0.5% Triton X-100 in PBS) and 1 time with PBS for 10 minutes per wash and stored in PBS before imaging. Immediately before imaging, the buffer was switched to a solution containing 20% glycerol (v/v) for preserving QDs from fast oxidation [44].

### 5.1.4. Sample preparation of the drosophila central nervous system (CNS)

Intact CNS tissues were freshly dissected from 74 AEL *Drosophila* larvae and immediately fixed in 4% paraformaldehyde for 1-1.5 hours. The tissues were then washed 6 times, 20 minutes each time, in PBS solution containing 0.1% TritonX-100 (PBT). About 20 tissues were incubated in 1ml rabbit anti-NPF primary antibody overnight. The primary antibody was pre-incubated with 50μg/ml C8 peptide at 4°C for 12 hours to block non-specific binding [49]. After additional 6 PBT washes, the tissues were incubated in Alexa Fluor 647 F(ab')2 Fragment of Goat Anti-Rabbit IgG (H + L) secondary antibody purchased from Life Technologies diluted 1:500 from the original concentration overnight. The tissues were washed with PBT six times after staining. The tissues were placed in the STORM imaging buffer 20 minutes prior to imaging. The MEA buffer for Alexa 647 was prepared according to the Nikon N-STORM protocol by mixing 310µl Buffer B, 35µl MEA buffer, and 3.5µl GLOX solution. Buffer B was made by combining 50 mM Tris pH 8.0, 10 mM NaCl, and 10% w/v glucose. 1M MEA buffer was made by mixing 77mg of Cysteamine (Sigma-Aldrich #30070) in 1ml of 0.25N HCl. GLOX solution was made by mixing 0.56 mg/mL Glucose Oxidase (Sigma-Aldrich #G2133) and 0.17 mg/mL Catalase (Sigma-Aldrich #C40) in 200µl of a buffer containing 10mM Tris ph8.0 and 50mM NaCl. The solution was vortexed and spinned down at 14,000 rpm. Then only the supernatant was used.

### 5.1.5. Image acquisition and processing

Imaging data was acquired using an Olympus IX71 inverted microscope with a 60x oil objective (Plan Apo N). The microscope is equipped with a PriorProScan xy stage and a Prior NanoScanZ piezo stage for focusing. Fluorescence was imaged using an Andor EMCCD camera (DV887DCS-BV with 14bit ADC). At the left-side port of the IX71, additional optics are inserted to re-image the back pupil plane of the objective onto a deformable mirror (Mirao 52E, Imagine Optic). The diameter of the deformable mirror limits the system NA to 1.28. After the deformable mirror, a further image plane is generated which is then relayed to the CCD camera with an additional 3x magnification (lenses L3 and L4) so that the image is sampled at the Nyquist frequency by the CCD. A CCD pixel corresponds to 89nm at the sample plane. For QD 656nm imaging a 504nm/12 (Semrock) filter was placed in the imaging path. For Alexa 647 imaging a 700/80nm filter (FF01-515-588-700 Omega filters) was used. The QDs are excited with a 488nm laser (Cyan 488, Newport) which is coupled into a 100µm core diameter fiber. The fiber is shaken using a fiber shaker to remove speckle [50]. To excite Alexa Fluor 647, a 660nm laser (Obis 660LX, Coherent) is coupled into a separate fiber attached to the shaker. For filtering and other image processing methods Python(x,y) version 2.7.6.1 was used. Image reconstruction was done using RapidSTORM version 2.21 [51].

#### 5.2. System aberrations

First we applied the algorithm to the problem of “flattening” the deformable mirror (DM) and correcting system aberrations. When all the DM actuators are set to a 0V actuation voltage, the mirror surface is not flat and will cause significant aberrations. To determine the DM settings that would flatten the mirror and correct system aberrations, we applied the AO-STORM algorithm to a sub-diffraction fluorescent microsphere attached to a coverslip at the focal plane of the objective lens. In Fig. 5(a) the initial PSF with an uncorrected deformable mirror can be seen. The Genetic Algorithm converged in about 20 generations to the desired PSF as shown in Fig. 5(b). The removed aberrations, shown in Fig. 5(c), represent the aberrations from the DM and the instrument. A small defocus is due to the microsphere being not exactly at the focal plane. We also performed phase retrieval analysis before and after GA correction, starting from an out-of-date correction for system aberrations [28]. The Strehl ratio improved from 0.59 before the correction to 0.81 after.

We compared our GA correction with parabolic optimization [52]. We performed a 10 point measurement on a search space from –π to π radians, on 12 zernike modes (3 to 15). The coefficient of each mode was found using parabolic fitting. This process was iterated 5 times to find the optimum wavefront. The Strehl ratio was improved from the initial value of 0.59 to 0.75 after the correction.

#### 5.3. Correction of aberrations induced by a roundworm

We further tested the algorithm by inducing aberrations using a *C. elegans* roundworm which has a roughly cylindrical cross-section. Due to the shape of the worm, the main aberrations induced are defocus, astigmatism and coma. Figure 5(d) shows an initial image of fluorescent microspheres imaged through the worm with the wavefront corrected for the system aberrations. The box in the image shows the Region Of Interest (ROI) used to calculate the FM. In less than 30 generations the GA converges to 80% of its optimum, and we can see the resulting image in Fig. 5(e), where the PSFs under the worm are corrected but the ones outside of the worm are now aberrated. This correction was again started with all DM actuators set to 0V. Figure 5(f) shows the difference in the correction due to the worm; we have subtracted the corrections required to flatten the mirror. Figure 5(f) demonstrates that the sample induced a large defocus, and, due to the almost diagonal orientation of the worm, both horizontal and vertical astigmatism.

#### 5.4. Real time wavefront correction of STORM on a thin cell

We imaged microtubules stained with 565nm Qdots in hepG2 cells. hepG2 cells are thin tissue culture cells (under 10µm). Although the whole cell can be imaged with STORM [53], the nucleus of the cell induces defocus and astigmatism. Figure 6(a) shows a widefield image. The ROI in Fig. 6(a) indicates the region under the nucleus where AO-STORM imaging was performed. As can be seen in the image, the area is not very clear, and the microtubules on the opposing side of the nucleus are not resolved. The resulting STORM image can be seen Fig. 6(b). The corrected Zernike coefficients are presented in Fig. 6(c). 0.3 radians of Z3 corresponds to less than 100nm of defocus. A total wavefront aberration of 0.39 radians RMS was removed. Assuming a 0.85 Strehl ratio after correction, which is typical of our system, this would correspond to a 0.53 Strehl ratio before correction, calculated using the Marechal approximation [54].

#### 5.5. Real time wavefront correction of STORM on a thick tissue

Recognition and measurement of neurotransmitters is a subject of interest in neuroscience. Considered as a good model system, the *Drosophila* larval CNS is simpler, but contains most neurotransmitters found in mammalian systems. These neurotransmitters regulate important biological processes in a similar manner to their homologs in mammals. Among them, Neuropeptide F, the *Drosophila* homolog of neuropeptide Y, is involved in a wide variety of biological processes like foraging behavior, circadian rhythm, and stress. We applied STORM imaging on an NPF-positive dorsal lateral soma (dlNPF) and the NPF-positive boutons of dorsal medial soma in the suboesophageal ganglia (SOG), both of which are located about 50µm deep inside the tissue [49].

We first tested STORM imaging on the tissue without correction. A wide field image of a bouton in the Ventral Nervous Cord (VNC) region without correction is shown in Fig. 7(a), and the STORM image in Fig. 7(b). The STORM reconstruction only localized 10.47 fluorophores per square micrometer.

Figure 7 shows AO-STORM on a NPF-positive soma in an intact *Drosophila* brain lobe. An uncorrected widefield image is shown in Fig. 8(a). The GA converged in about 5000 frames to 90% of its optimized steady state. The frames after that are used to reconstruct the STORM image shown in Fig. 8(b). The reconstruction has a localization density of 543 fluorophores per square micrometer, more than 50-fold more than the reconstruction in Fig. 7. Due to the thickness of the sample a larger defocus was induced as well as astigmatism, shown in Fig. 8(c). Since the fluorescence from NPF is only expressed in a single focal plane, including defocus helps maintain the focus at the right plane during the time consuming process of STORM imaging; 1.1 radians of Z3 still only corresponds to ~220nm of defocus. However, it has to be noted that with samples that have fluorescence from several planes, defocus must not be included in order to avoid convergence of the algorithm to another focal plane. A total RMS wavefront aberration of 1.49 radians was removed. If we don’t include the defocus term, the RMS wavefront aberration removed was 1.06 radians. Assuming a 0.85 Strehl ratio after correction, the corresponding Strehl ratio with aberrations is 0.03 including defocus. Without the defocus term the Strehl ratio is 0.12.

#### 5.6 Resolution enhancement due to wavefront correction

We have developed a simple theoretical model to understand the effect of wavefront aberrations on localization accuracy. An increase in the Strehl ratio increases the number of photons in the PSF, decreases the PSF width, and decreases the number of background photons. Without any contribution from background fluorescence, the localization precision in STORM imaging is given by [14]

where s is the PSF width and N is the number of photons. We can ignore the contribution to the precision due to the finite pixel size, because it is negligible for a Nyquist sampled pixel size, $a~\lambda /4\text{NA}$. If the Strehl ratio is reduced by a factor of*p*, this results in a reduction in the number of photons in the PSF by ~p as well, so the localization accuracy will be reduced by $\sim \sqrt{p}$ due to the loss of photons in the PSF core. A random wavefront aberration will leave the PSF core intact but create a broad base, so we do not include a change in s in our resolution estimate [55]. Thus a Strehl ratio of 0.85 reduces the accuracy by ~8%, a Strehl ratio of 0.55 reduces the accuracy by ~35%, and a Strehl ratio of 0.12 reduces the accuracy by a factor of ~2.9.

The photons that are lost from the PSF core contribute to the background emission so that, even in the absence of background fluorescence, the localization uncertainty will be increased by a background fluorescence term which contributes a variance per pixel of

where A is the area over which the lost photons are distributed and*dx*is the pixel dimension; ${b}^{2}$ is the number of scattered photons per pixel. We estimate the Area to ~1.3 µm

^{2}based on simulations using the measurements of wavefront aberrations through tissue by Schwertner et al. [10]. Inserting Eq. (7) into the equation for localization precision from [14], we arrive at the estimateWith this additional term, a Strehl ratio of 0.85 reduces the accuracy by ~10%, a Strehl ratio of 0.55 reduces the accuracy by ~41%, and a Strehl ratio of 0.12 reduces the localization accuracy by a factor of ~4.0. Thus the improvement in localization accuracy from using AO during imaging of the Drosophila CNS is close to 4x – again assuming a final Strehl ratio of 0.85. From the results shown in Figs. 6 and 7, it is clear that the improvement in the image is greater than simply a factor of 4. The background fluorescence in the

*Drosophila*CNS is not negligible (as in the calculation above), and the wavefront correction improves the image not only by improving the localization accuracy but also by increasing the number of positive localizations which clearly affects the resolution. Nevertheless, Eq. (8) provides a simple estimate of the change in localization precision due to a change in Strehl ratio,

*p*. The resolution for a given image can always be calculated from FRC [47].

## 6. Discussion

Here we have presented an approach for correcting wavefront aberrations dynamically during STORM imaging by combining a Genetic algorithm with a novel fitness metric that is insensitive to large intensity fluctuations. The algorithm is further refined to reduce the mutation rate and population variability as the wavefront aberration approaches the corrected state, allowing the images to be used for both wavefront correction and the STORM reconstruction. We first applied this approach to flattening the DM and correcting system aberrations while imaging a 100nm fluorescent microsphere. We then corrected the aberrations due to imaging 100nm fluorescent microspheres through a roundworm.

Applying the approach to STORM, we imaged microtubules in hepG2 cells and corrected the aberrations due to imaging through the cell nucleus. While STORM can be done through the whole cell without AO [56], removing the sample’s aberrations corresponds to a RMS wavefront improvement of 0.39 radians. This corresponds to a modest 41% improvement in localization accuracy as we calculated above.

Finally we showed the results of AO-STORM on NPF imaged in the cell soma approximately 100μm inside an intact Drosophila brain lobe. Here the aberrations removed correspond to an RMS value of 1.06 radians, corresponding to an improvement in localization accuracy of a factor of ~4. The overall improvement in the image is greater than this because the correction not only improves the localization accuracy, but increases the number of localizations as well. The GA converged in about 5000 frames, but the convergence rate could be improved by optimizing the starting population.

In conclusion, we have applied sensorless AO to superresolution SML microscopy with a robust and efficient approach that is relatively insensitive to the large intensity fluctuations inherent in SML imaging and that uses each image as efficiently as possible by reducing the fluctuations in wavefront from the GA population as the wavefront approaches a well-corrected steady state.

We have demonstrated this approach on 2D STORM images, but our approach should be well-suited to volumetric STORM imaging in which the image plane is stepped through the sample. As the image plane moves into the sample, the aberrations will increase but the GA approach is well-suited to correct these slowly varying dynamic aberrations and astigmatism can also be dynamically added for 3D STORM [24].

## Acknowledgment

This work was supported by the National Science Foundation grant DBI1350654. We would like to thank Drs. William Kisaalita and Amish Asthana for providing assistance with cell culture and Ms. Snehal Chaudhari and Dr. Edward Kipreos for the roundworms.

## References and links

**1. **E. Betzig, G. H. Patterson, R. Sougrat, O. W. Lindwasser, S. Olenych, J. S. Bonifacino, M. W. Davidson, J. Lippincott-Schwartz, and H. F. Hess, “Imaging intracellular fluorescent proteins at nanometer resolution,” Science **313**(5793), 1642–1645 (2006). [CrossRef] [PubMed]

**2. **M. J. Rust, M. Bates, and X. Zhuang, “Sub-diffraction-limit imaging by stochastic optical reconstruction microscopy (STORM),” Nat. Methods **3**(10), 793–796 (2006). [CrossRef] [PubMed]

**3. **S. T. Hess, T. P. K. Girirajan, and M. D. Mason, “Ultra-High Resolution Imaging by Fluorescence Photoactivation Localization Microscopy,” Biophys. J. **91**(11), 4258–4272 (2006). [CrossRef] [PubMed]

**4. **B. Huang, S. A. Jones, B. Brandenburg, and X. Zhuang, “Whole-cell 3D STORM reveals interactions between cellular structures with nanometer-scale resolution,” Nat. Methods **5**(12), 1047–1052 (2008). [CrossRef] [PubMed]

**5. **H. Shroff, C. G. Galbraith, J. A. Galbraith, and E. Betzig, “Live-cell photoactivated localization microscopy of nanoscale adhesion dynamics,” Nat. Methods **5**(5), 417–423 (2008). [CrossRef] [PubMed]

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

**7. **F. Cella Zanacchi, Z. Lavagnino, M. Perrone Donnorso, A. Del Bue, L. Furia, M. Faretta, and A. Diaspro, “Live-cell 3D super-resolution imaging in thick biological samples,” Nat. Methods **8**(12), 1047–1049 (2011). [CrossRef] [PubMed]

**8. **S. Hell, G. Reiner, C. Cremer, and E. H. K. Stelzer, “Aberrations in confocal fluorescence microscopy induced by mismatches in refractive index,” J. Microsc. **169**(3), 391–405 (1993). [CrossRef]

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

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

**11. **J. Ries, C. Kaplan, E. Platonova, H. Eghlidi, and H. Ewers, “A simple, versatile method for GFP-based super-resolution microscopy via nanobodies,” Nat. Methods **9**(6), 582–584 (2012). [CrossRef] [PubMed]

**12. **K. Weber, P. C. Rathke, and M. Osborn, “Cytoplasmic microtubular images in glutaraldehyde-fixed tissue culture cells by electron microscopy and by immunofluorescence microscopy,” Proc. Natl. Acad. Sci. U.S.A. **75**(4), 1820–1824 (1978). [CrossRef] [PubMed]

**13. **M. Heilemann, S. van de Linde, A. Mukherjee, and M. Sauer, “Super-Resolution Imaging with Small Organic Fluorophores,” Angew. Chem. Int. Ed. Engl. **48**(37), 6903–6908 (2009). [CrossRef] [PubMed]

**14. **R. E. Thompson, D. R. Larson, and W. W. Webb, “Precise Nanometer Localization Analysis for Individual Fluorescent Probes,” Biophys. J. **82**(5), 2775–2783 (2002). [CrossRef] [PubMed]

**15. **G. T. Dempsey, J. C. Vaughan, K. H. Chen, M. Bates, and X. Zhuang, “Evaluation of fluorophores for optimal performance in localization-based super-resolution imaging,” Nat. Methods **8**(12), 1027–1036 (2011). [CrossRef] [PubMed]

**16. **J. W. Hardy, *Adaptive Optics for Astronomical Telescopes* (Oxford University Press, New York, 1998).

**17. **M. J. Booth, “Adaptive optics in microscopy,” Philos Transact A Math Phys, Eng. Sci. **365**, 2829–2843 (2007).

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

**19. **M. J. Booth, M. A. A. Neil, and T. Wilson, “Aberration correction for confocal imaging in refractive-index-mismatched media,” J. Microsc. **192**(2), 90–98 (1998). [CrossRef]

**20. **M. J. Booth, M. A. Neil, R. Juskaitis, and T. Wilson, “Adaptive aberration correction in a confocal microscope,” Proc. Natl. Acad. Sci. U.S.A. **99**(9), 5788–5792 (2002). [CrossRef] [PubMed]

**21. **J. Antonello, T. van Werkhoven, M. Verhaegen, H. H. Truong, C. U. Keller, and H. C. Gerritsen, “Optimization-based wavefront sensorless adaptive optics for multiphoton microscopy,” J. Opt. Soc. Am. A **31**(6), 1337–1347 (2014). [CrossRef] [PubMed]

**22. **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). [CrossRef] [PubMed]

**23. **D. Débarre, E. J. Botcherby, M. J. Booth, and T. Wilson, “Adaptive optics for structured illumination microscopy,” Opt. Express **16**(13), 9290–9305 (2008). [CrossRef] [PubMed]

**24. **I. Izeddin, M. El Beheiry, J. Andilla, D. Ciepielewski, X. Darzacq, and M. Dahan, “PSF shaping using adaptive optics for three-dimensional single-molecule super-resolution imaging and tracking,” Opt. Express **20**(5), 4957–4967 (2012). [CrossRef] [PubMed]

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

**26. **M. Schwertner, M. J. Booth, T. Tanaka, T. Wilson, and S. Kawata, “Spherical aberration correction system using an adaptive optics deformable mirror,” Opt. Commun. **263**(2), 147–151 (2006). [CrossRef]

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

**28. **P. Kner, L. Winoto, D. A. Agard, and J. W. Sedat, “Closed loop adaptive optics for microscopy without a wavefront sensor,” Proc SPIE Int Soc Opt Eng **7570**, 757006 (2010). [CrossRef] [PubMed]

**29. **D. B. Conkey, A. N. Brown, A. M. Caravaca-Aguirre, and R. Piestun, “Genetic algorithm optimization for focusing through turbid media in noisy environments,” Opt. Express **20**(5), 4840–4849 (2012). [CrossRef] [PubMed]

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

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

**32. **X. Zhang and P. Kner, “Binary wavefront optimization using a genetic algorithm,” J. Opt. **16**(12), 125704 (2014). [CrossRef]

**33. **B. R. Patton, D. Burke, and M. J. Booth, “Adaptive optics from microscopy to nanoscopy,” Proc. SPIE **8948**, 894802 (2014).

**34. **D. Burke, B. Patton, F. Huang, J. Bewersdorf, and M. J. Booth, “Adaptive optics correction of specimen-induced aberrations in single-molecule switching microscopy,” Optica **2**, 177–185 (2015).

**35. **J. C. Wyant, “Basic Wavefront Aberration Theory for Optical Metrology,” in *Applied Optics and Optical Engineering*, R. R. Shannon, and J. C. Wyant, eds. (Academic Press, 1992), pp. 28–39.

**36. **J. R. Koza, *Genetic Programming: On the Programming of Computers by Means of Natural Selection (Complex Adaptive Systems)* (Bradford, 1998).

**37. **K. Deb, A. Pratap, S. Agarwal, and T. Meyarivan, “A fast and elitist multiobjective genetic algorithm: NSGA-II,” IEEE Trans. Evol. Comput. **6**(2), 182–197 (2002). [CrossRef]

**38. **K. Deb and D. Deb, “Analysing mutation schemes for real-parameter genetic algorithms,” Int. J. Artif. Intell. Soft Comput. **4**(1), 59280 (2014). [CrossRef]

**39. **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). [CrossRef] [PubMed]

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

**41. **B. Thomas, A. Wolstenholme, S. N. Chaudhari, E. T. Kipreos, and P. Kner, “Enhanced resolution through thick tissue with structured illumination and adaptive optics,” J. Biomed. Opt. **20**(2), 026006 (2015). [CrossRef] [PubMed]

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

**43. **J. R. Fienup and J. J. Miller, “Aberration correction by maximizing generalized sharpness metrics,” J. Opt. Soc. Am. A **20**(4), 609–620 (2003). [CrossRef] [PubMed]

**44. **J. Xu, K. F. Tehrani, and P. Kner, “Multicolor 3D Super-resolution Imaging by Quantum Dot Stochastic Optical Reconstruction Microscopy,” ACS Nano **9**(3), 2917–2925 (2015). [CrossRef] [PubMed]

**45. **J. W. Goodman, *Introduction to Fourier Optics* (McGraw-Hill, Boston, Massachusetts, 1996).

**46. **N. Banterle, K. H. Bui, E. A. Lemke, and M. Beck, “Fourier ring correlation as a resolution criterion for super-resolution microscopy,” J. Struct. Biol. **183**(3), 363–367 (2013). [CrossRef] [PubMed]

**47. **R. P. J. Nieuwenhuizen, K. A. Lidke, M. Bates, D. L. Puig, D. Grünwald, S. Stallinga, and B. Rieger, “Measuring image resolution in optical nanoscopy,” Nat. Methods **10**(6), 557–562 (2013). [CrossRef] [PubMed]

**48. **F.-A. Fortin, F.-M. D. Rainville, M.-A. Gardner, M. Parizeau, and C. Gagné, “DEAP: Evolutionary Algorithms Made Easy,” J. Mach. Learn. Res. **13**, 2171–2175 (2012).

**49. **P. Shen and H. N. Cai, “Drosophila neuropeptide F mediates integration of chemosensory stimulation and conditioning of the nervous system by food,” J. Neurobiol. **47**(1), 16–25 (2001). [CrossRef] [PubMed]

**50. **L. Shao, P. Kner, E. H. Rego, and M. G. Gustafsson, “Super-resolution 3D microscopy of live whole cells using structured illumination,” Nat. Methods **8**(12), 1044–1046 (2011). [CrossRef] [PubMed]

**51. **S. Wolter, M. Schüttpelz, M. Tscherepanow, S. Van De Linde, M. Heilemann, and M. Sauer, “Real-time computation of subdiffraction-resolution fluorescence images,” J. Microsc. **237**(1), 12–22 (2010). [CrossRef] [PubMed]

**52. **M. J. Booth, D. Débarre, and T. Wilson, “Image-based wavefront sensorless adaptive optics,” Proc. SPIE **6711**, 671102 (2007). [CrossRef]

**53. **B. Huang, S. A. Jones, B. Brandenburg, and X. Zhuang, “Whole-cell 3D STORM reveals interactions between cellular structures with nanometer-scale resolution,” Nat. Methods **5**(12), 1047–1052 (2008). [CrossRef] [PubMed]

**54. **V. N. Mahajan, “Strehl ratio for primary aberrations in terms of their aberration variance,” J. Opt. Soc. Am. **73**(6), 860–861 (1983). [CrossRef]

**55. **J. W. Goodman, *Statistical Optics* (Wiley Interscience, New York, 1985).

**56. **A. G. York, A. Ghitani, A. Vaziri, M. W. Davidson, and H. Shroff, “Confined activation and subdiffractive localization enables whole-cell PALM with genetically expressed probes,” Nat. Methods **8**(4), 327–333 (2011). [CrossRef] [PubMed]