Tunable Wide-Field Illumination and Single-Molecule Photoswitching with a Single MEMS Mirror

Homogeneous illumination in single-molecule localization microscopy (SMLM) is key for the quantitative analysis of super-resolution images. Therefore, different approaches for flat-field illumination have been introduced as alternative to the conventional Gaussian illumination. Here, we introduce a single microelectromechanical systems (MEMS) mirror as a tunable and cost-effective device for adapting wide-field illumination in SMLM. In flat-field mode the MEMS allowed for consistent SMLM metrics across the entire field of view. Employing single-molecule photoswitching, we developed a simple yet powerful routine to benchmark different illumination schemes on the basis of local emitter brightness and ON-state lifetime. Moreover, we propose that tuning the MEMS beyond optimal flat-field conditions enables to study the kinetics of photoswitchable fluorophores within a single acquisition.

* sı Supporting Information ABSTRACT: Homogeneous illumination in single-molecule localization microscopy (SMLM) is key for the quantitative analysis of super-resolution images. Therefore, different approaches for flatfield illumination have been introduced as alternative to the conventional Gaussian illumination. Here, we introduce a single microelectromechanical systems (MEMS) mirror as a tunable and cost-effective device for adapting wide-field illumination in SMLM. In flat-field mode the MEMS allowed for consistent SMLM metrics across the entire field of view. Employing single-molecule photoswitching, we developed a simple yet powerful routine to benchmark different illumination schemes on the basis of local emitter brightness and ON-state lifetime. Moreover, we propose that tuning the MEMS beyond optimal flat-field conditions enables to study the kinetics of photoswitchable fluorophores within a single acquisition. KEYWORDS: super-resolution microscopy, dSTORM, tunable flat-field illumination, MEMS micromirror, photoswitching, quantitative microscopy F luorescence-based super-resolution microscopy techniques have become standard tools in bioimaging. 1,2 Among these, single-molecule localization microscopy (SMLM) techniques, such as (fluorescence) photoactivated localization microscopy (PALM/FPALM) and (direct) stochastic optical reconstruction microscopy (STORM/dSTORM), can improve on the classical resolution limit of ∼200 nm by a factor of 10 and more. 3−6 In addition to its high-resolution capabilities, SMLM is now routinely used for quantitative imaging of proteins in subcellular compartments. 7−11 SMLM relies on photoswitches, that is, molecules that can be reversibly or irreversibly transferred from a nonfluorescent dark or OFF-state to a fluorescent ON-state. 12, 13 Typically, irreversibly photoactivatable or photoconvertible dark states are employed in PALM and FPALM, 3,4 whereas reversibly photoswitchable organic dyes are used in STORM and dSTORM. 5,6 The rate constants for the transitions between ON-and OFF-states are mainly dependent on the irradiation intensities 6,14 and affect the average number of localizations obtained per molecule over the course of an acquisition.
It is therefore desirable, especially for quantitative SMLM, to use homogeneous illumination across the field of view (FOV). This is per se not the case in conventional wide-field microscopy employing Gaussian illumination, in which a trade-off between homogeneous illumination and high excitation intensity exists. Typically, this leads to a confinement of laser power in the center and to a significant drop of intensity toward the edges of the FOV, thus, affecting photoswitches nonuniformly. To compensate for this, the beam can be extensively spread to significantly overfill the objective, although at the cost of an overall decrease in excitation intensity at the sample plane. 15 For this reason, different flat-field approaches have been introduced to allow for uniform illumination, for example, by employing multimode fibers, 16,17 microlens arrays, 18 refractive beam shaping elements, 19−21 and spatial light modulators. 22 Recently, fast scanning mirrors have been used to achieve flat-field illumination, called adaptable scanning for tunable excitation region (ASTER). 23 Here, we propose the use of a single optical microelectromechanical systems (MEMS) element for creating tunable flat-field illumination. MEMS devices have started to be employed in biomedical imaging applications over the last two decades, ranging from optical scanner for light delivery control 24 over optical biosensors 25 to optical sensors for signal acquisition in photoacoustic microscopy. 26 One of the most advanced and readily used elements employed to date are MEMS digital micromirror devices (DMDs), which consist of arrays of individual mirror elements that have defined on/off states, allowing the use as high speed (typical pattern update rates of 32 kHz) spatial light modulators. While their flexibility in generating fully custom patterns can allow flexible tailored point spread function engineering, 27−30 their size and control electronic requirements still hinder integration in small packages.
Using single MEMS mirror elements with analogue 1D or 2D movement capabilities instead of DMDs leverages the inherent advantage of reduced size but also lower electric control requirements, high reliability and easy integration in small package sizes next to higher power throughput as no diffractive losses are present. Specifically size advantages have seen the implementation of MEMS mirrors in endoscopic applications, ranging from confocal microscopy applications 31 over optical coherence tomography 32 to photoacoustic microscopy. 33 Next to this, MEMS mirrors have also been employed as small scale 1D or 2D scanners in table top microscopy systems to allow reliable and fast position and scan control of the sample illumination, for example, in light-sheet microscopy. 34,35 All these applications use maximum pattern speeds below 50 kHz, with concepts of faster mirror movements opening up potentials for further functionality integration in microscopy systems.
In this paper we compare the performance of a single MEMS mirror with a commercially available refractive beam shaper (PiShaper), which has been previously characterized. 21,23,36 We further present a strategy to benchmark the performance of illumination schemes on the single-molecule level, which includes single-molecule brightness and photoswitching metrics that are directly accessible from the SMLM acquisition. We further propose that MEMS settings between Gaussian and optimal flat-field illumination can be beneficially used to study single-molecule photoswitching.

■ RESULTS AND DISCUSSION
The MEMS element consisted of a suspended structure formed by a circular mirror plate surrounded by an elliptical frame ( Figure 1a). The latter has four integrated thin-film piezoelectric actuators, which can be used to drive the mechanical resonances of the device and generate tip and tilt movement of the mirror plate through mechanical coupling with the frame ( Figure S1 and Methods). Initial characterization led to the selection of 45.5 and 85.5 kHz as vertical and horizontal tilt modes, respectively ( Figure 1b). The MEMS mirror was then inserted in the excitation scheme of the SMLM setup ( Figure S2). Using μM dye solutions, we characterized the MEMS for a 2D Lissajous scan at a frequency being the greatest common divisor of two axial tilt modes and for a range of oscillation amplitudes, settling on the use of three different voltage settings for comparison with Gaussian and PiShaper flat-field illumination: 1.5, 2.8, and 4.2 V ( Figure  S2). An increase in MEMS voltage led to an overall improvement in flatness. In contrast to the refractive beamshaping element, PiShaper, a rectangle intensity profile was obtained, which better fits common detector geometry.
For SMLM, it is additionally appropriate to directly study the effect of the illumination scheme on single-molecule brightness. 16,21,23 We prepared single-molecule surfaces of the carbocyanine dye Alexa Fluor 647 (AF647) for dSTORM imaging 37,38 (Figure 2). By this means, all emitters originated from the same axial position, which allowed us to measure comparable single-molecule intensities throughout different illumination modes. 38 We then took dSTORM image stacks for each illumination mode at a constant frame rate of 10 Hz. From the dSTORM acquisition, it can be seen that across the FOV flat-field illumination significantly reduced variation in background fluorescence and single-molecule brightness ( Figure 2b). The obtained localizations within the FOV were then subdivided into circular regions of interest (ROIs) to study the average single-molecule brightness per frame (referred to as spot brightness; Figure 2c). 21,23 The radial progress of spot brightness from the center to the edge of the FOV was similar for the PiShaper, MEMS 2.8 and 4.2 V settings, although the overall brightness was reduced for the MEMS (Figures 2d and S3b). This can be assigned to a lower excitation intensity at the sample plane due to the reflectance of our current MEMS prototype of ∼40% and a general spread of the laser beam through an increase in oscillation amplitude for the MEMS 4.2 V setting. Notably, the curve progression for the MEMS with only 1.5 V actuation was fairly linear, whereas the Gaussian showed the expected nonlinear trend. As the histograms of spot brightness were skewed for most radial ROIs of the Gaussian illumination (Figure 2e), we used the median of the respective distributions of photon counts per As emitter brightness is directly linked to localization precision, 39,40 we further evaluated the experimental localization precision on the basis of a clustering algorithm (Methods). We obtained precision maps in agreement to our intensity maps, as a higher local excitation intensity was associated with higher localization precision ( Figure S3). The change in precision from the center to the edge of the FOV was fairly low for PiShaper, MEMS 2.8, and 4.2 V, whereas the precision for conventional Gaussian illumination increased by a factor of 2.2 ( Figure S3c). Likewise, the localization density was equalized for the entire FOV using PiShaper, MEMS 2.8 and 4.2 V, whereas Gaussian and MEMS 1.5 V showed a reduction of localizations toward the edges ( Figure S4).
Next, we analyzed the characteristic lifetimes of the ONstate, τ on , and OFF-state, τ off , for each imaging condition. Therefore, each localization pattern that could be reliably assigned to a single photoswitchable molecule, was analyzed with regards to ON-and OFF-times ( Figure S5). To achieve this, the entire set of localizations was subdivided into 10 × 10 ROIs. The obtained ON-and OFF-times were binned into separate histograms, which were fitted to a single-exponential decay model to yield τ on and τ off , respectively. Figure 3 shows the maps for Gaussian, MEMS 2.8 V and PiShaper illumination mode. In addition, a map of the τ off /τ on ratio was created, which determines the achievable resolution in SMLM, that is, the ability to resolve a certain density of fluorophores. 41 The corresponding statistical analysis can be found in Table S1. As can be seen, both MEMS 2.8 V and PiShaper generated homogeneous distributions of τ on , τ off , and τ off /τ on over the entire FOV, which is in contrast to Gaussian illumination. Due to the excitation power properties described above, τ on was  Localizations within an area of (62 μm) 2 were binned to 10 × 10 sub-ROIs. Average ON-(τ on ) and OFF-state lifetimes (τ off ), τ off /τ on ratio, and FRC resolution are shown for Gaussian (top), MEMS 2.8 V (middle), and PiShaper illumination (bottom). Scale refers to the mean of all ROIs ± 50%, the FRC maps are displayed as mean ±25%. One frame corresponds to 100 ms. prolonged for the MEMS 2.8 V and shorter for the PiShaper, thus resulting in higher τ off /τ on ratios for the latter.
τ off was slightly decreased for the PiShaper when compared to MEMS 2.8 V. Although τ off is mainly shortened by irradiation at shorter wavelengths, for example, 514 and 405 nm, 6,37 the ON-state can also be repopulated solely through the read-out excitation intensity, for example, at 641 nm for AF647 as in our experiment. This effect can be specifically observed in Gaussian illumination (Figure 3 upper panel), with τ off shortened in the center of the FOV where the excitation intensity is the highest. This is, however, accompanied by a dramatic reduction of τ on and, hence, the τ off /τ on ratio peaked in the center of the FOV, which is the reason why this area generally provides the highest resolution capabilities in SMLM experiments employing Gaussian illumination. The τ off /τ on ratio could be, in principle, further increased through adaption of laser excitation intensity and camera frame rate, as well as buffer conditions. 37,42 Higher irradiation intensities will significantly shorten τ on with moderate reduction of τ off . On the other hand, it has been shown that this can interfere with other SMLM parameters such as spot brightness, bleaching rate and number of localizations per fluorophore, suggesting that reduced excitation intensities and low imaging speeds are favorable in SMLM. 43 Finally, the achieved local resolution of the three illumination modes was determined by creating Fourier ring correlation (FRC) maps. 44 Although the label density should be quite similar for all imaging modes, low spot brightness due to lower excitation intensities lead to a spread of localizations with impact on the FRC resolution. Overall, the FRC resolution maps confirmed the results of precision and τ off / τ on ratio for the different illumination modes. Both MEMS 2.8 V and PiShaper reached low FRC values with low variability across the FOV, with a slightly higher resolution for the PiShaper (30 vs 27 nm, respectively), which can be attributed to a generally higher laser power at the sample plane.
The data in Figures 2 and 3 and Table S1 clearly indicate that especially the spot brightness and the ON-state lifetime, τ on , of each ROI are very sensitive parameters for characterizing the illumination mode. Single-molecule fluorescence emission shows a linear dependence on the excitation intensity when being below the saturation limit in the lower kW cm −2 range. 45,46 We therefore used the median spot brightness, that is, photons detected per molecule and frame, abbreviated N Det in the following, for the same ROIs as shown in Figure 3, and plotted N Det against τ on (Figure 4a). The dependence can be linearized by plotting N Det against the inverse of τ on (Figure  4b,c). As can be seen, the Gaussian illumination led to a large spread of data points. The average excitation intensity of the entire FOV was determined to 0.43 kW cm −2 . Where the excitation intensity was low, coordinates were found in the lower left, whereas for increasing intensity they moved to the upper right. This spread is naturally linked to Gaussian geometry and implicates a huge variability in local brightness and localization density within the SMLM image. It is worth mentioning that especially for the Gaussian illumination, emissions of low brightness that typically appeared in the corner of the FOV were not always found by the localization algorithm ( Figure S4), and therefore, the analysis was, in principle, underestimating τ on . To take this into account, we implemented a blink interval in the ON-time analysis, which was set to tolerate a gap of four frames between two consecutive localizations ( Figure S6).
In comparison to Gaussian illumination, both MEMS 2.8 V and PiShaper produced very narrow distributions on the plot (Figure 4b), which corresponds to a homogeneous excitation intensity of the entire FOV. The center of the distribution was linked to the excitation intensity, which was measured to 0.62 kW cm −2 for the PiShaper for the entire FOV. The corresponding values of τ on −1 for the PiShaper are 2.4-fold greater than those of the MEMS 2.8 V (0.40 and 0.17 frame −1 , respectively), which can be attributed to the reflectance of the MEMS (∼40%). In general, high values of N Det and τ on −1 led to higher precision and resolution, as shown in Figure 3.
We then investigated different settings for the MEMS, as shown in Figure 4c. A voltage of 4.2 V led to a further decrease in N Det and τ on −1 (0.08 frame −1 ), whereas the 1.5 V setting led to a distinct spread of coordinates, which agrees with the Gaussian-like intensity profile. N Det showed a linear dependence on τ on −1 up to a value of 0.35 frame −1 . Beyond this value the curve first slightly deviated from the linear dependence followed by a strong deviation with asymptotic behavior above 0.4 frame −1 . We fitted the MEMS 1.5 V data below 0.35 frames −1 to a linear model (gray line in Figure 4b,c) and obtained a gradient of 6878 ± 52 photons per molecule. This value can be considered as the average photon budget of AF647 per ON-state, which is characteristic for probe, detection efficiency of the setup, and applied buffer conditions. The linearity in the lower part was proved in simulations ( Figure S7). As τ on reached values toward the camera integration time (here 100 ms), the analysis overestimated τ on and N Det started to saturate. On the other hand, high photon thresholds in the localization software allowed to measure higher values for N Det as dim emissions originating from fractions of the integration time were filtered out.
Eventually, the plot in Figure 4 allowed to determine optimal camera frame rates for a given excitation intensity under experimental conditions. We propose the MEMS 1.5 V as ideal illumination mode for this evaluation, but the low intensity regime of a Gaussian mode with τ on −1 < 0.3 frames −1 could be used as well. If it is desired to achieve a minimum of localizations per single ON-state with overall high spot brightness in SMLM experiments, the integration time should be adapted to fit 1−2 camera frames. To optimize the data acquisition, the integration time (100 ms) for the PiShaper in Figure 4b could be hence increased by a factor of 1.25−2.5, and for the MEMS 2.8 V by 2.7−5.3.
Finally, we compared the quality of each illumination mode in a single plot. To this end, we determined the coefficient of variation (CV) for each distribution of N Det and τ on , that is, the standard deviation divided by the mean (Figure 5). The Gaussian had the highest variation of 46% and 56% in N Det and τ on , respectively, followed by the MEMS 1.5 V (CV of 30% and 39% for N Det and τ on , respectively). PiShaper and MEMS 2.8 V achieved excellent results with both parameters ≤10%. The MEMS 4.2 V setting even optimized the variation in spot brightness to 6%. By discarding regions at the edges of the FOV, MEMS and PiShaper flat-field schemes could be further improved to just 5% as determined by the root-mean-square (RMS) of both coefficients ( Figure 5). Cropping the illumination of the Gaussian to the central 36 and 16% of the full FOV led to an overall improvement of the CV from 51 (full field) to 24 and 12% (RMS), respectively. This is often the simplest measure to facilitate quantitative SMLM studies with conventional illumination, but it cannot compete with the PiShaper and MEMS 2.8 V full-field modes. As any Gaussian illumination maintains a certain inhomogeneity, flat-field illumination should therefore be routinely used for quantitative SMLM with the advantage of a significantly increased FOV.

■ CONCLUSION
Single MEMS mirror elements can be used as low cost alternative for creating flat-field illumination (Table S2). Moreover, they add extra functionality in terms of tunability. The main advantages are low electric control requirement, overall high reliability and compactness as translation in x and y can be performed on a single device. The current limitation of our prototype is its low reflectance of ∼40%, but novel variants are currently under development, with metallic or dielectric coatings for improved reflectivity at visible wavelength allowing for higher optical power throughput. 47 We further proposed a powerful routine to benchmark different illumination schemes on the single-molecule level. Our method includes determining the median single-molecule spot brightness, N Det , and characteristic ON-state lifetime, τ on , in subregions of the FOV and the analysis of their variation ( Figure 5).
We recommend to use MEMS mirrors for SMLM imaging in the following way: the first measurement, ideally on a singlemolecule surface as test sample or alternatively on unspecifically bound labels in a final sample, 7 could be performed using a Gaussian-like aperture with a linear intensity profile from the center to the edge of the FOV. After conducting the proposed single-molecule analysis and plotting N Det vs τ on −1 , the photon budget of the employed photoswitch and the optimal camera frame rate linked to the laser power can be determined ( Figure  4). Afterward, the MEMS can be tuned to optimal settings for flat-field illumination.
In summary, homogeneous illumination will not only have significant impact on quantitative SMLM, but also on widefield based live-cell imaging, where a local variation in intensity can induce severe photodamage. 15 Beyond that, tunable devices provide access to key parameters of photoswitchable probes within a single acquisition. The MEMS mirror therefore is an ideal tool for studying chemical buffers, photoswitches, and photophysical processes alike.
■ METHODS SMLM Setup. The setup was based on a single-molecule sensitive wide-field microscope. 37 The microscope body was an IX73 (Olympus) equipped with a NA 1.49 60× oil immersion objective (APON60XOTIRF, Olympus), zt532/640rpc dichroic mirror (Chroma), and multibandpass filter ZET532/ 640 (Chroma). Sample and objective were decoupled from the microscope body using a nosepiece stage (IX2-NPS, Olympus). An imaging device with ∼1.8× post magnification (OptoSplit II, Cairn) was placed between microscope body and EMCCD camera (iXon Life 888, Andor). The camera pixel size after optical magnification was determined to 122 nm. A diode laser (iBeam Smart, 641 nm, Toptica) was used for excitation. The laser output power was kept constant at 200 mW for all dSTORM measurements. A cleanup filter (ZET635/20×, Chroma) was placed in front of the diode laser and the laser profile was cleaned using a pinhole. The refractive beam shaping device was purchased from AdlOptica (piShaper 6_6_VIS).
An intensity control device was installed in the laser beam path. It was composed of a half-wave plate (AHWP05M-600) in a rotation motor (K10CR1/M) controlled via Thorlabs Kinesis software, a polarizing cube (CCM1-PBS251/M) and a beam dump (LB1/M; all from Thorlabs). Afterward, the laser beam was either focused on the MEMS device by a 500 mm lens (AC508-500-A-ML, Thorlabs) or expanded by a telescope (LD1464-A-ML, AC254-100-A-ML, Thorlabs) and a Galilean beam expander (BE02-05-A, Thorlabs) to obtain a collimated beam of 1/e 2 diameter of 6 mm, that is, the required input for the PiShaper. Then, for both configurations, a telescope (AC254-050-A-ML, AC508-180-A-ML, Thorlabs) was used to focus the illumination beam onto the back focal plane of the microscope objective ( Figure S2).
MEMS. The microelectromechanical systems (MEMS) mirror used is a 2D optical scanner using resonant actuation produced from thin-film piezoelectric actuators, allowing low voltage and high frequency actuation. The scanner has a 400 μm mirror diameter and is etched in single-crystal silicon, ensuring good reliability, and tolerance to deformation (cf. Figure 1). 48 The device geometry uses mechanical coupling to produce tip-tilt rotations of more than 1°at frequencies greater than 100 kHz. The device was fabricated using the costeffective MEMSCAP PiezoMUMPS multiuser process using a 10 μm silicon-on-insulator device layer for the device geometry and a 500 nm aluminum nitride piezo-electric layer. 49 Residual stresses from the manufacturing process resulted in a concave scanner mirror surface with a radius of curvature of approximately 20 cm. While static voltage inputs only produce a negligible displacement of the thin film piezoelectric actuators, the mechanical stress resulting from the piezoelectric effect can be used to efficiently drive resonant modes of the mechanical structure.
Notably, the presented device exhibited several eigenmodes between 10 and 100 kHz (cf. Figure 1b) involving tip-tilt rotation of the scanning mirror plate at 45.5, 85.5, and 105 kHz. These were driven by applying an AC voltage signal to one of the four actuators on the frame. At resonance, the angular range was approximately linear proportional to the input voltage amplitude. The actuators were driven using strictly positive voltages, that is, AC voltages were offset by a DC signal to be greater than 0 V at all times to avoid possible depolarization of the piezoelectric material. The high optical absorbance of the current prototype mirror, of over 50% at visible wavelengths, could result in a resonant frequency shift at high incident optical power, as radiative heating changes the mechanical properties of the device.
To provide the two-dimensional displacement required for full-field homogeneous illumination, a single actuator was used to drive two resonant modes simultaneously, one for each tiptilt rotation axis. This was done by generating a voltage signal that was the sum of two sines at each eigenfrequency, resulting in a mechanical motion that was the superposition of both eigenmodes. This corresponds to a Lissajous scan, 50 with an effective pattern frequency equal to the greatest common denominator (GCD) of each eigenfrequency, typically in the 100−1000 Hz range. Figure S1c shows a typical Lissajous scanning pattern.
Probes and Single-Molecule Surfaces. All chemicals were obtained from Sigma-Aldrich if not otherwise stated. We used the following complementary DNA sequences purchased from Eurogentec; sense: biotin-5′-GGGAATGCGAATCAAG-TAATATAATCAGGC-3′, antisense: AF647-5′-GCCTGATT-ATATTACTTGATTCGCATTCCC-3′. Hybridization to dsDNA was performed by mixing sense and antisense strands at a ratio of 2:1 and incubating overnight at room temperature (RT). LabTek chambered coverslips (Lab-Tek II, Nunc) were cleaned according to the following protocol; 30 min sonification in Decon 90 3% at 30°C, rinsed three times with distilled water (dH 2 O), 30 min sonification in dH 2 O at 30°C , rinsed three times with dH 2 O, dried with EtOH (abs), 30 min sonification 1 M KOH at 30°C, and finally rinsed three times with dH 2 O.
Single-molecule surfaces were prepared as follows; one LabTek chamber was incubated overnight at 4°C with 200 μL of a solution consisting of 10 g/L bovine serum albumin (BSA) and 0.1 g/L biotinylated BSA in PBS, then rinsed three times with 200 μL of PBS, incubated for 20 min at RT with 150 μL of solution of 0.2 g/L NeutrAvidin (Thermofisher Scientific) in PBS, rinsed three times with 200 μL of PBS, incubated for 2 min with 100 μL of 1 nM AF647 biotinylated dsDNA in PBS at RT, and finally rinsed three times with 200 μL of PBS. For imaging, the single-molecule surfaces were embedded in photoswitching buffer: 51 50 mM mercaptoethylamine (MEA) applying an enzymatic oxygen scavenger system, 5% (w/v) glucose, 10 U mL −1 glucose oxidase, 200 U mL −1 catalase in PBS adjusted to pH 7.4. The LabTek chambers were completely filled and sealed with a coverslip on top avoiding further gas exchange and air bubbles.
SMLM Data Analysis. SMLM raw data was analyzed in rapidSTORM 3.2, 52 employing a relative intensity threshold as a factor of the local background. The spot intensity was extracted from the 2D Gaussian fit in rapidSTORM. It needs to be mentioned that for experimental data the fit intensity is underestimated, 38,40 but since plane single-molecule surfaces were used, the mismatch was constant throughout the data set.
Spot brightness and precision were analyzed using custom written routines in Python and ImageJ. Localizations were grouped in square or circular/ring-shaped regions of interest (ROIs). For each ROI, relevant quantities were calculated for the group of localizations. To determine single-molecule precision, a clustering algorithm was developed in Python. Thanks to the use of single-molecule surfaces providing well separated and randomly located single emitters, localizations were grouped and analyzed for each ROI according to the following scheme. The algorithm scanned through the list of localizations to group localizations into clusters. A cluster consisted of localizations that were close to each other, that is, less than 70 nm from the cluster center of mass. To avoid errors from adjacent clusters, the cluster was rejected if outside localizations were closer than 15 nm from the 70 nm edge. Each cluster localizations were aligned to their center of mass and summed up into a single distribution, which was finally fitted with a 2D Gaussian. The average of its standard deviations in x and y gave a precision score.
Photoswitching kinetics were analyzed with custom written macros in ImageJ/Fiji. 53 Localization files from rapidSTORM were imported with ImageJ and then reconstructed to a superresolution histogram with 10 nm pixel resolution applying bilinear interpolation. 54 The image was then smoothed with a 2D Gaussian with 1 px standard deviation and thresholded with a minimum value of 0.1 localization using the Huang method to generate a binary image. The resulting images of the localization patterns were then analyzed according to their geometry: only masks with an area between 3 and 120 px and a circularity between 0.9 and 1.0 were accepted for further analysis. The entire image was subdivided into 10 × 10 ROIs, each (6.23 μm) 2 in size. The following analysis was performed for each ROI; all localizations within each individual mask were analyzed according to their ON-and OFF-times ( Figure  S5). The obtained ON-and OFF-times for the entire ROI were then put into single distributions to determine τ on and τ off , respectively. Therefore, ON-and OFF-times were binned with 1 frame and 300 frames, respectively. Each histogram was then fitted to a single-exponential decay function of the form ln y = ln a − kx; with a as amplitude, k as time constant, and 1/k as the characteristic lifetime τ. Fitting was performed multiple times with an incremental increase of the bin size of 1 (ONtime) or 50 (OFF-time) if bins <τ/3 to allow for obtaining fits with high R 2 . Since there is the possibility of missing dim spots, due to long ON-times through low excitation intensities, short OFF-times could be artificially generated. Therefore, we allowed our algorithm to tolerate a gap of four frames between consecutive localizations ( Figure S6a) and started the OFFtime histogram after 100 frames. To increase the quality of the fit of the ON-state histogram, only the first 10 bins were considered. The spot brightness per ROI, N Det , was determined as the median photon count of all localizations. Corresponding maps of τ on , τ off , τ off /τ on ratio, and N Det were generated, which consisted of 10 × 10 px corresponding to the original number of ROIs. Fourier ring correlation (FRC) maps were generated from a set of two images of the localization file, that is, from localizations of odd and even frames, by employing the ImageJ plugin NanoJ SQUIRREL. 44 Here, the FOV was also divided into 10 × 10 segments.
Blinking simulations were performed using a custom written routine in Fiji. A stack with 100 well-separated fluorophores was simulated with the following settings: Gaussian PSF model with 340 nm PSF fwhm, 122 nm pixel size, 0.1 s camera integration time, 49 photons variance in a Poissonian noise model, and stack length of 30000 frames. The spot brightness N True across the 100 fluorophores was linearly sampled by varying the ON-state lifetime τ on of an exponential distribution of ON-times and the photon detection rate, that is, from 10 s and 675 photons s −1 for fluorophore #1 to 0.1 s and 67500 photons s −1 for fluorophore #100, thus, resulting in variable spot intensities, but keeping the total average photon number per molecule constant (6750 photons). OFF-times were simulated by using an exponential distribution with τ off fixed to 0.25 s, which were prolonged by a constant offset of 0.6 s between two ON-states to allow for many ON-state transitions and thus good statistics. The localization pattern of each fluorophore was analyzed using the same settings as for the experimental data ( Figure S7).
MEMS construction and functioning, SMLM setup, analysis of localization precision and density, photoswitching kinetics, photoswitching and resolution statistics, and comparison of different flat-field modes (PDF)