Teststorm: Simulator for Optimizing Sample Labeling and Image Acquisition in Localization Based Super-resolution Microscopy

Localization-based super-resolution microscopy image quality depends on several factors such as dye choice and labeling strategy, microscope quality and user-defined parameters such as frame rate and number as well as the image processing algorithm. Experimental optimization of these parameters can be time-consuming and expensive so we present TestSTORM, a simulator that can be used to optimize these steps. TestSTORM users can select from among four different structures with specific patterns, dye and acquisition parameters. Example results are shown and the results of the vesicle pattern are compared with experimental data. Moreover, image stacks can be generated for further evaluation using localization algorithms, offering a tool for further software developments. Surpassing the lateral resolution limit by a factor of two using structured illumination microscopy, " J. Sub-diffraction-limit imaging by stochastic optical reconstruction microscopy (STORM), " Nat. Evaluation of fluorophores for optimal performance in localization-based super-resolution imaging, " Nat. Ultra-high resolution imaging by fluorescence photoactivation localization microscopy, " Biophys. Imaging biological structures with fluorescence photoactivation localization microscopy, " Nat. " Direct stochastic optical reconstruction microscopy with standard fluorescent probes, " Nat. The effect of photoswitching kinetics and labeling densities on super-resolution fluorescence imaging, " J. Live-cell photoactivated localization microscopy of nanoscale adhesion dynamics, " Nat. " 4D Super-resolution microscopy with conventional fluorophores and single wavelength excitation in optically thick cells and tissues, " PLOS ONE 6(5), e20645 (2011). Orientation imaging of single molecules by wide-field epifluorescence microscopy, " J. Position and orientation estimation of fixed dipole emitters using an effective Hermite point spread function model, " Opt. Blind assessment of localization microscopy image resolution, " Opt. Real-time computation of subdiffraction-resolution fluorescence images, " J. " Secretory vesicles are preferentially targeted to areas of low molecular SNARE density, " PLoS ONE Elements of image processing in localization microscopy, " J. In situ measurements of the formation and morphology of intracellular β-Amyloid fibrils by super-resolution fluorescence imaging, " J. Photoinduced formation of reversible dye radicals and their impact on super-resolution imaging, " Photochem. " Correcting chromatic offset in multicolor super-resolution localization microscopy, " Opt. Simultaneous multiple-emitter fitting for single molecule super-resolution imaging, " Biomed. Test samples for optimizing STORM super-resolution microscopy, " J. 1. Introduction Fluorescence microscopy methods are essential imaging tools in modern biological and medical research [1-3]. Their suitability for in situ and multicolor imaging with high selectivity and sensitivity has led to the success of wide-field and confocal instruments for


Introduction
Fluorescence microscopy methods are essential imaging tools in modern biological and medical research [1][2][3].Their suitability for in situ and multicolor imaging with high selectivity and sensitivity has led to the success of wide-field and confocal instruments for imaging on the basis of fluorescence intensity, spectrum, lifetime, anisotropy, FRET, etc. measurements.Innovative technologies have been continuously integrated into these systems to improve their technical parameters.One of the most interesting streams of development is the improvement of spatial resolution to the extent that allows researchers to observe biophysical mechanisms at the single molecule level [4].Although traditional optical fluorescence imaging methods are limited by optical diffraction [5] -the Rayleigh limit of spatial resolution is around 200 nm when using a high numerical aperture objective with visible light -this limit can be surpassed using super-resolution techniques.
Super-resolution microscopy methods such as stimulated emission depletion (STED) [6,7], structured illumination (SI) [8] and the localization based (STORM, dSTORM, PALM etc.) [9][10][11][12][13][14] microscopy methods can overcome this diffraction limit in practice.These methods require system modifications and new imaging protocols.Established fluorescence labeling methods can be applied as a starting point, but they require significant optimization too.Especially in localization microscopy the fluorescent labeling density and photoswitching lifetime (dependent on buffer, pH, and laser settings), and camera exposure time are critical parameters that significantly affect the final image quality [15].Another issue is that optimization also depends on the structure of the imaged object.Imaging with unoptimized parameters can produce artifacts which hinder evaluation of the final super-resolution image.Since both sample preparation and imaging are time consuming processes, a simulation tool for preliminary parameter optimization can be extremely helpful.Quantitative evaluation of super-resolved images has been intensely studied in the last few years.The effects of the density of localized molecules and feature motion [16], different rendering algorithms [17], position and orientation of localized single molecules [18][19][20], as well as sampling and photon counts [21] to the final image quality were presented.
In this paper we present a test sample generator program (TestSTORM) that provides simulated image stacks which can be analyzed by localization software such as rainSTORM [22,23], quickPALM [24] and rapidSTORM [25].We study how parameter optimization can be performed to determine the process window of imaging and how artifacts occurring in localization microscopy can be studied and explained.In case of the vesicle pattern we demonstrate a characteristic artifact, namely the "bridge formation" artifact that may occur between individual, densely labeled vesicles, and show that simulations can be used to find experimental conditions that minimize this problem.Simulated and experimental data is compared using labeled vesicles of clathrin mediated endocytosis.

Materials and methods
The program (TestSTORM) has been developed to simulate the entire experimental imaging process in localization microscopy.The algorithm first generates the 3D coordinates of each fluorescent molecule attached to the selected geometrical structure.The spatial coordinates of fluorophores are determined by simulating random attachment to the pre-defined pattern, and these positions are then taken to be static.Such a stack of coordinates describes the real positions of the molecules, but lacks information about their temporal behavior (repetitive blinking process).The orientation of absorption/emission dipoles was not taken into consideration in this study.Although the exact PSF does depend on the emitter orientation, its effect on the final image quality is typically neglected in the literature.The behavior of each molecule over time is simulated in the second phase of the algorithm, based on known dye parameters (characteristic time constants etc.) which are available within the software.In this approach the spatial and temporal behavior of the molecules were handled independently of the detection, just like in a real sample where the detection does not affect the emission of the fluorescence sample.The diffraction limited, pixelated image frames are generated in the third step of the algorithm, taking into consideration the user-defined or pre-established parameters of the imaging, such as the number of emitted photons during the exposure time, the defocus and magnification of the image, the gain and quantum efficiency of the detector.The software generates image frame stacks of a selected 3D sample using preset dye and acquisition parameters for 2D imaging.

Basic patterns
TestSTORM produces image stacks based on four basic types of patterns ("star", "array", "vesicles" and "lines") with predefined geometrical and system parameters.The first two patterns ("star" and "array") are artificial structures which are designed to be helpful for the optimization of imaging parameters rather than to mimic biological samples.However, the two latter ones ("lines" and "vesicles") model real biological samples, such as thin actin filaments and endocytotic vesicles.The labeling model is the same in all cases: the point-like fluorescent dye molecules are linked to the pattern with a linker (for example an antibody) with a user defined length.In this model the size of the fluorescent molecule is not taken into consideration directly: the length of the linker defined in the code must equal to the sum of the actual length of the applied linker and the characteristic radius of the fluorescent molecule.The probability distribution for the attachment of the dye molecules to the specimen is homogeneous and isotropic: there are not "hot spots" inside the stained regions and both the excitation and the detection are polarization independent.The four types of patterns can be seen in Fig. 1.The surface of the green spheres and hemispheres in the insets represent the possible positions of the dye molecules (red dots) considering the random orientation of the linkers (black arrows).All the patterns are three-dimensional.The "star" pattern forms a centered star on the frame with 16 arms [Fig.1(a)].The contact points (epitopes) of the linkers are randomly distributed on the surface of each arm.The number of dye molecules linked to each arm, the length of the arms and the defocus of the pattern in z position can be set (the focal plane at z=0 nm).This sample is a classical one in optical imaging to determine and demonstrate the resolution of a microscope.
The "array" pattern is a centered grid on the frame [Fig.1(b)].The linkers are attached randomly to the points of the grid.The number of dye molecules linked to each point, the plane of the central line of the pattern in z position and the angle between horizontal plane and the plane of the pattern (elevation angle) are variable.The distance between the grid points and the size of the array can be modified by the user too.
The "vesicles" pattern consists of labeled spheres [Fig.1(c)] [26,27].The vesicle locations can be defined by the user, or randomly distributed within a volume of userspecified extent.The linkers are randomly placed on the external surface of each sphere.The possible positions of the molecules form a hemisphere.The input parameters in the case of a random sample are: the average radius of vesicles, the standard deviation of radius of the vesicles, the average number of molecules linked to one vesicle, the standard deviation of the number of molecules linked to one vesicle, the size of the active area, the number of vesicles and the maximum distance between the center of the vesicles and the focal plane in the z direction.The radius of each vesicle and the number of molecules linked to it are then simulated from normal distributions.The input parameters in the case of a fixed sample are: the x, y and z coordinates of each vesicle center, the radius of each vesicle and the number of molecules linked to each vesicle.
The "lines" pattern [15,28,29] consists of five stained lines with fixed position [Fig.1(d)].The linkers are randomly distributed throughout each line.The following parameters can be modified by the users: The number of molecules/µm linked to one line, the z position of the initial point of each line (marked by bold "×" in Fig. 1(d)), the elevation angle of the lines and the size of the pattern.The separation of the 4th and 5th line is also specifiable.

Temporal behavior
A three-state model was used to characterize the temporal behavior of the dye molecules [Fig.2(a)] [30,31].In this approach the molecules can be in the active (A, able to fluorescence), in the passive (P, non-fluorescent) or in the bleached (B) states.The molecules can transit between these states (except from the bleached one) described by the characteristic rate time constants (τ) or transition rates (k=1/τ).

Modeling image acquisition
The third part of the algorithm models image acquisition.A frame stack is generated with the images of the molecules in the appropriate position in space and time considering the generated random trajectories and coordinates [Fig.2(c)].A 3D Gaussian Point Spread Function (PSF) is used in the program [32].The size and the number of the image stack and the frame rate are determined by the user.Input parameters are the pixel size (measured in the focal region of the objective: camera pixel size/magnification), the full width at half maximum of the PSF (measured in the focal region of the objective) and the refractive index of the sample medium (used in the calculation of 3D Gaussian PSF) as well.The user can also modify the exposure time of the CCD camera (full frame time -readout time, Fig. 2(c)).The incoming photon-count conversion of the camera is calculated in the following way: the product of the incoming photon number, the pre-amplification, the actual electron multiplying gain and the quantum efficiency of the camera is divided by the electron/count rate.These parameters can be found in the manual of a commercial EMCCD [33].The optical collection efficiency describes the portion of the emitted photon flux which can be collected by the microscope system and imaged onto the surface of the CCD camera.This parameter is determined by the total transmittance of the system and the numerical aperture (NA) of the microscope objective [34].Its typical value is ~ 0.3-0.4 in case of an oil immersion objective with high numerical aperture.Poisson noise is added to the frames with an average background level determined by the user.

The interface of the program
A user-friendly graphical user interface (GUI) is provided as shown in Fig. 3.The program runs in MATLAB 2011a or in a newer version on a basic platform, and it does not need any extra toolbox.The generated frame stack can be saved in TIF or binary RAW file formats.The values of the parameters and the coordinates of dye molecules are available from the workspace after each run.More information can be found in the program package [35].

Results
To demonstrate the effectiveness of our program we show an application to each type of pattern.In all cases the following common parameters were used (Table 1.):The simulated image stacks were generated with different frame rate and linker length.The exposure time was calculated with 5 ms readout time.The parameters were chosen to mimic real measurement situations (with Alexa Fluor 647 [10,15,31], an Andor iXon DV887 EMCCD camera [31], and experimental setup [36]).The simulated frame stacks were analyzed and visualized with rainSTORM software [23] on its default settings.
First we demonstrated the z dependence of resolution in a localization based microscope with the star pattern [Fig.4].The defocus of the pattern was changed from 0 nm to 400 nm.The depth of field (DOF=2λ/NA 2 ) was 549 nm.500 molecules were located in each arm, randomly attached by 7 nm long linkers.The radius of the pattern, or equivalently the length of the arms, was 3200 nm.The frames were captured at a rate of 20 frames/s.The radius where the structure of the star pattern becomes unresolvable tends to increase with defocus, and the contrast of the reconstructed image declines.These effects are caused by three factors: localization becomes less precise when handling defocused images [22]; filtering (imprecise localizations may be rejected); and mislocalizations arising from the incorrect localization of partly overlapping PSFs, which become more frequent as the PSFs expand with defocus [22,37].Secondly, we presented the effect of the labeling density on the reconstructed structure by means of the array pattern [Fig.5].The number of molecules linked onto a single array point was changed from 5 to 80.The length of the linker was 75 nm.The distance between the points of the array was 400 nm.The frames were captured at a rate of 20 frames/s.Up to 20 molecules per array point the ring structure enhances with increasing density.This artifact is caused by the projection of the 3D spheres onto a 2D plane, so that a ring of fluorophore density is observed.Considering 16 nm super-resolved pixel, ~35% of the emitters should tend to be located in the outermost pixels of the circle.In these simulations the probability of overlapping PSFs arising inside a single sphere is negligible because of the low number of linked emitters.However, above a density of 20 molecules per array point, the increased rate of mis-localizations "fills in" the centers of the structures and the background, making the rings harder to see.
Thirdly, a possible artifact was investigated in case of imaging single isolated linear features at high labeling density.The length of the simulated line was 2200 nm and the number of attached fluorophores/µm in the simulation was varied between 225 and 1800.The data were simulated for an imaging rate of 20 frames/s.At low labeling density the observed localization density was linear and homogeneous as expected [Fig.6], however above a threshold (≈450/ µm), two hot spots appeared close to the ends of the line.The explanation of this artifact is straightforward.At high labeling density the probability of overlapping two PSFs is higher if one of them is in the middle of the line.This leads to a higher probability that the localization microscopy software rejects localizations (due to the size or eccentricity of overlapping PSFs), and disproportionately reduces the localization density observed in the middle of the line.In contrast, if one of the two active molecules are near the ends of the line, their separation is larger hence they are more likely to be localized separately, which increases the overall the intensity towards two ends [Fig.6].However, if the two active molecules are very close to each other, they can be mis-localized as a single molecule.This introduces an artificial position which is an average position of the molecules weighted by their photons numbers.In the central region such mis-localized positions represent the position of real molecules, hence the structure of the image does not deteriorate.However, if the active doubles are close to the ends of the line, the mis-localized positions are always shifted towards the center .Mis-localized positions cannot be at the ends of the line.This effect can even lead to line-shortening under very high labeling density.Fourthly, another possible artifact was investigated in the case of imaging vesicles.Real, experimental images were captured from a HeLa cell sample with Alexa 647 fluorescently tagged epidermal growth factor (EGF).When added to live cells, fluorescent EGF binds to EGF receptors, causing it to cluster into vesicles which then internalized via clathrin mediated endocytosis.The cells were fixed and imaged by means of a dSTORM system [38].After the reconstruction, "bridge formations" emerged on the reconstructed image between some vesicles [Fig.7].The essential question is whether these are real connections between the vesicles or just artifacts coming from the reconstruction.The appearance of bridge formations is caused by the mislocalizations rooted in the overlapping images of the fluorophores on adjacent vesicles.The probability of overlapping is larger in case of lower frame rates or denser labeling, because these increase the observed PSF density.
Two merit functions were used for quantitative analysis of the reconstructed images, the localization efficiency (η) and the vesicle-bridge contrast (C).The localization efficiency was defined as the ratio of the number of true-localizations (localizations of isolated molecules) and the total number of localizations (true-and mis-localizations together).The contrast was calculated for the two vesicles located in the center of the image, based on the number of truelocalizations (forming the vesicules) and mis-localizations (forming the bridges).The contrast was calculated as: where M ves is the mean value of true-localizations in the vesicles and M bridge is the mean value of mis-localizations in the bridge.Both merit function decreases as the number of molecules linked to the vesicles grows.This effect can be easily explained by the increased rate of mislocalized molecules.However, the dependency of image quality as a function of frame rate is more complex.At a low molecule number (25) the introduced merits probably cannot fully characterize the image quality because of the limited number of localizations.However, at higher molecule numbers (100, 175 and 250) an optimum can be seen at a frame rate of 45, in good agreement with the subjective visual evaluation.

Conclusion
We developed a program for modeling the whole imaging procedure in an optical fluorescence localization microscope.Four types of sample are provided with different geometry: star, array, vesicles and lines.The algorithm creates the structure of the sample, generates a temporal trajectory of photoswitching fluorescent states to each dye molecule according to the three-state model and simulates the image acquisition process.We demonstrated the effectiveness of our program for analyzing and exploring artifacts in localization microscopy.The z-dependent resolution, the effect of the labeling density on a structure, the high intensity ends and the bridge formations were analyzed with the star, array, lines and vesicles pattern, respectively.We shortly sum up in Table 2 the possible artifacts analyzed in the paper, and some further ones in cases of different sample geometries along with their likely causes and solutions.
In the future we plan to develop TestSTORM further with some add-ons such as incorporated dye library with the parameters of widely used photoswitching dyes, 3D image acquisition with z-dependent PSFs and for the simulation of molecular diffusion imagery.

Fig. 2 .
Fig. 2.(a) The schematic view of the three state model of fluorescent dye in a switching buffer, (b) Two examples for randomly generated trajectories for fluorescent molecules, (c) Image acquisition model in time with the example-trajectories In the second part of the algorithm the time-dependence of each fluorophore's fluorescent state is independently generated based on its tabulated photoswitching parameters.This random temporal trajectory is linked to each molecule.Blue and red graphs in Fig. 2(b) illustrate two possible trajectories.The molecule represented by the red curve was active three times while molecule represented by the blue curve bleached after two active phases.The characteristic rate time of the dye states are determined by the user.Each molecule has a photon budget emitted during the active state.Input parameters are the emitted photon flux (photons/s) and the wavelength of the emission as well.

Fig. 4 .
Fig. 4. The reconstructed star pattern at different z planes (0 nm is the focal plane, the contrast is the same in all figures, scale bar: 1µm)

Fig. 5 .
Fig. 5. Auto-scaled reconstructed images of array patterns with different numbers of molecules linked to the points of the array (linker length 75 nm, distance between the array points: 400 nm, scale bar: 500 nm).The insets depict the cross sections going through the centers of 5 array points.

Fig. 6 .
Fig. 6.The reconstructed line patterns with different numbers of linked molecules/µm (length of the line: 2200 nm, scale bar: 1µm)

Fig. 7 .
Fig. 7. Reconstructed image of labeled vesicles of clathrin mediated endocytosis with bridge formation between the vesicles, scale bar: 5 µm We used TestSTORM to analyze this problem.The "vesicles" pattern was used with four vesicles at fixed positions (relative positions in x and y in nm: (0,0); (200,200); (200,400) and (400,600)) [Fig.8].The radius of the vesicles was chosen to be 30 nm.The length of the linker was 7 nm.The number of Alexa 647 molecules linked to the vesicles was changed from 25 to 250.The frames were simulated with different frame rates.As shown in Fig.8the "bridge formations" appear on the reconstructed image in some cases similarly to the measured image.The images with blue points represent the localized coordinates and the insets are the reconstructed, super-resolved images (visualized with 2D histograms).

Fig. 8 .
Fig. 8. Simulated samples with four vesicles captured with different frame rates and the number of molecules linked to the vesicles was varied, 1 pixel: 160 nm, in the insets: 1 pixel: 16 nm