Rapid, aurate partile traing by alulation of radial symmetry enters Raghuveer Parthasarathy Supplementary Text and Figures Supplementary Figures Supplementary Figure 1 Supplementary Figure Supplementary Figure 3 Supplementary Figure 4 Supplementary Figure 5 Supplementary Figure 6 Supplementary Figure 7 Supplementary Note Supplementary Results Referenes Traing auray for various partile loalization algorithms applied to simulated partile images with a signal-to-noise ratio of 0. Loalization auray over a range of SNr for radial-symmetry-based traing and other methods Loalization auray over a range of SNr, with true partile enters distributed over ±.0 pixels in x and y. Loalization auray in the presene of a seond partile. Loalization auray for simulated images of onentri rings. More experimental tests of radial-symmetry-based partile loalization. The relationship between total number of photons deteted and signal-tonoise ratio (SNr). Partile Loalization Algorithm Additional haraterizations of partile loalization auray Referenes for Supplementary Notes and Results 1
Supplementary Figure 1. Traing auray for various partile loalization algorithms applied to simulated partile images with a signal-to-noise ratio of 0. Radial Sym. indiates the radial-symmetry-based approah introdued here; Centroid indiates entroid finding; Gaussian NLLS and Gaussian MLE refer to Gaussian fitting performed using nonlinear least squares minimization and maximum lielihood estimation, respetively. (a,b) The total error, defined as the differene between the fit-determined and true partile enters, plotted as a funtion of the true enter loation. The true partile enters are randomly distributed over ± 0.5 pixels in x and y. The error in the x and y dimensions are plotted separately. The lower panels show the same points as the upper panels but with the entroid-fit values omitted. () The total error in x for true partile enters spanning ±.0 pixels. The mean errors for the radial symmetry, Gaussian NLLS, and Gaussian MLE methods are very similar to their values over the smaller range (noted in the main text): 0.045, 0.04, and 0.048 px, respetively. (d) The total error in x from radial symmetry based traing as alulated with and without loal smoothing of slopes.
Supplementary Figure. Loalization auray. (a) Total error, (b) preision, () bias, and (d) omputation time from traing simulated partile images over a range of SNr using radial-symmetry-based traing, Gaussian NLLS and MLE fitting, entroid determination, and linearized weighted Gaussian fitting. (See Online Methods for preise definitions of terms.) The examined range of signal-to-noise ratios orresponds to a total number of deteted photons from 100 to 300,000 (see Supplementary Results Figure ). Eah point denotes the average of 1,000 tests at eah SNr. The true partile enters are randomly distributed over ± 0.5 pixels in x and y. The solid lines in (a) and (b) indiate the Cramér- Rao bound on loalization preision. Panel (a) is the same as Figure b; the larger size failitates disrimination between the various symbols. Panel () magnifies Panel (1). 3
Supplementary Figure 3. Loalization auray. (a) Total error, (b) preision, () bias, and (d) omputation time as in Supplementary Fig., but with true partile enters distributed over ±.0 pixels in x and y rather than 0.5 pixels. The solid line in (a) indiates the Cramér- Rao bound on loalization preision. 4
Supplementary Figure 4. Loalization auray in the presene of a seond partile. Model images were onstruted at SNr=0, onsisting of two partiles at a given enter-toenter separation and a random angular orientation. Eah point denotes the average, over 400 images, of error in the position determined for the entral partile. Inset: A model image with two partiles separated by 4 px and oriented at -45 degrees with respet to the x-axis. The yellow box indiates the 7x7 pixel region analyzed to loalize the entral partile. Supplementary Figure 5. The auray of enter determination for simulated images of onentri rings over a range of signal-to-noise ratios. Eah point denotes the average of 00 simulated images for SNr<0 and 50 images for SNr>0. Inset: A simulated image with SNr=0. 5
Supplementary Figure 6. More experimental tests of radial-symmetry-based partile loalization. (a) Confoal mirograph of fluoresent. µm diameter PMMA mirospheres; (b) the D pair orrelation funtion g(r). () Confoal mirograph of fluoresent 1.1 µm diameter PMMA mirospheres; (d) the orresponding g(r). (e) Fluoresene image of quantum dot labeled aetylholine reeptors in a HEK 93 ell. Bar = 5 mirons. (f) Meansquare-displaement for a single quantum dot trajetory. The traes derived from radialsymmetry-based and Gaussian traing are visually indistinguishable; their differene is shown in (g). (h) Histograms of step sizes derived from images of quantum-dot labeled inesins traed with radial-symmetry-based (upper) and Gaussian fitting (lower) methods. Solid lines: two-gaussian fits to the histograms. Supplementary Figure 7. The total number of photons deteted in the CCD plane as a funtion of the pea SNr for the simulated images used in this paper. The number of photons deteted at the brightest pixel is SNr ; the plotted total sums over all pixels. 6
Supplementary Note: Partile Loalization Algorithm My approah to partile loalization is to determine the enter of radial symmetry of an intensity distribution sampled at disrete points, { I ( x, y )}, where I denotes the intensity and the subsripts label ij ij ij rows and olumns on a two-dimensional lattie with oordinates x and y. Typially, these oordinates will be those of pixels in a CCD array, and the set of intensities will orrespond to a single partile imaged by a noisy optial devie. Radial symmetry is not in itself a number whose value an be omputed and optimized, and so we need a measure of symmetry that is alulable for a disretely sampled funtion. Many possibilities exist; a fruitful approah is to note that the gradient of a funtion that has perfet radially symmetry about the oordinate origin will, at any point, point toward the origin. A line through any point with orientation parallel to the loal gradient will interset the origin. (This basi fat has been observed before, e.g. in Ref. 1 in the ontext of onentri rings.) It is fruitful to thin of the origin as the point that minimizes the distane between itself and all suh lines, that distane being zero. This perspetive, I propose, an be extended to noisy, imperfetly symmetri funtions. We an identify the point of minimal distane to gradient-oriented lines as an estimate of the true partile enter, and test the auray of this proposition by proessing simulated images with nown enter positions. Given the intensities at eah pixel position, { I ( x, y )}, we alulate the intensity gradient on a ij ij ij grid displaed half a pixel in eah dimension using a Roberts ross operator S1 (Fig. S1). For any set of four pixels of indies {(i, j), (i+1, j), (i, j+1), (i+1, j+1)} (Figure a), the gradient at the midpoint ( x, y ) is I = I I u ˆ + I I vˆ, where the uv-axes are rotated 45º from xy (Figures 1, a). The ( + 1, + 1, ) (, + 1 + 1, ) i j i j i j i j Roberts ross allows assignment of both omponents of the gradient at the same point, in ontrast, for example, to alulating x-omponents from differenes along olumns ( Ii+ 1, j Ii, j ) and y-omponents along rows ( Ii, j+ 1 Ii, j ). The slope of the gradient at the midpoint in the xy oordinate system, rotated 45 degrees with respet to uv, is given by m ( I + 1, + 1 I, ) + ( I, + 1 I + 1, ) ( Ii+ 1, j+ 1 Ii, j) ( Ii, j+ 1 Ii+ 1, j) = i j i j i j i j the terms in parentheses are the u and v omponents of loated at ( x, y ), we an now write the equation of a line of slope ( x x ) y= y + m. Suh a line is illustrated in Fig. S1b. ; I noted above. For any of our grid midpoints, m passing through ( x, y ) : 7
Figure S1. Pixel and gradient geometry. (a) The gradient of the image intensity is determined on a grid (one site of whih is indiated in dar gray) displaed half a pixel in x and y from the grid of pixel enters (light gray). (b) At eah point at whih the gradient is alulated (e.g. ( x, y ), we an onsider a line parallel to gradient, passing through that point. We wish to loate the point ( x, y ) that minimizes the weighted sum of the squared distanes of losest approah, d, to all suh lines. We next onsider some arbitrary point ( x, y ). It is a straightforward exerise in geometry to show that the distane, d, between (, ) x y and the line y y + m ( x x ) d = = is given by ( y y ) m ( x x ) m + 1 Considering all lattie midpoints, labeled, we wish to determine the best fit point ( x, y ) that minimizes d w χ, where w is some weighting of point, disussed below. Setting the derivative of respet to x equal to zero; after some algebra one obtains: Similarly, for y : This yields expressions for x and (1.1) (1.) where x y = = x + y = m + m + m x. ( m x ) m w mw mw y 1 1 + 1 + m + m ( x ) mw w w y m + y = m 1 1 + 1 y that are simple ombinations of the above sums: ( ) w mw ( y ) 1 mw y mx mx w m + 1 m + 1 m + 1 m + 1 1 ( ) mw m w ( y ) mw y mx m x w m + 1 m + 1 m + 1 m + 1 χ with 8
(1.3) mw mw w m m m = + 1 + 1 + 1 Weighting It is reasonable to apply different weightings to the distanes alulated from different grid points. The intensity gradient is more aurately determined in areas of high intensity, as the image signal is larger ompared to the noise. The distane to ( x, y ) is more aurately determined for points that are lose to ( x, y ), as errors in the slope m lead to errors in d that grow with the distane d, between the point ( x, y) and the enter. A simple hoie of weighting that inorporates both of these ideas is I (1.4) w = d Use of the intensity gradient rather than the intensity avoids the influene of onstant baground intensities on the weighting. The distane d, is of ourse unnown prior to alulation of ( x, y ). It an, however, be approximated by the distane, d between ( x, y ) and the entroid of I ; this approah is used throughout this paper. There are many possible weighting funtions, some of whih may onfer greater auray than the form written above. The results are not liely to be strongly dependent on the hoie of denominator in the weighting funtion, however. For example, even the very naive approah of using the distane to the brightest pixel, rather than d, yields a roughly 1% hange in mean auray, orresponding to less than 0.001 pixels at a signal-to-noise ratio of 0. Weighting by the square of the gradient magnitude and the inverse distane to a entroid has the virtue of oneptual simpliity and, as shown in the main text and in the Supplemental Results, it allows aurate determination of ( x, y ). One ould alulate ( x, y ) and realulate the weights to input into a revised determination of the enter position; this method yields a negligible improvement in auray (not shown) at the expense of one omputational repetition. Smoothing A small but signifiant improvement in auray results from smoothing the array of slopes, { m }. Again, many approahes to smoothing are available; a simple one is to replae eah m with the average slope of the 3x3 pixel neighborhood entered on site. I illustrate the auray of image enter determination with and without this averaging below (Setion.1). Software Computer ode implementing the above algorithm for partile enter loalization, written in MATLAB, is provided as Supplementary Software, together with additional ode. Summary Equations 1.1-1.4 provide analytially alulable expressions for the loation of the enter of an imaged radially symmetri partile. 9
10
Supplementary Results: Additional haraterizations of partile loalization auray Contents 1 Total error, bias, and preision The FluoroBanroft algorithm 3 Loalization auray for asymmetri images 4 Tests using experimental data 1 Total error, bias, and preision I ontinue here the disussion of auray illustrated by loalization tests on images with SNr=0, as in Fig. a. The total errors plotted in Fig. a have ontributions from the methods bias, i.e. the slope of the error graphs shown, and their preision, i.e. the satter about this slope (see Online Methods for formal definitions of these properties). Centroid finding shows high preision together with a large, well-nown bias that reports alulated enter positions as being loser to the image enter than the true partile enter loation (Supplementary Fig. 1a,b). Gaussian fitting and radial-symmetry-based traing show small biases. Smoothing As desribed in the Supplementary Note, I apply a smoothing of the gradient slope prior to the determination of the symmetry enter. Without smoothing of the loal slopes, the total error of the radial symmetry method is slightly larger, e.g. 0.044 px ompared to 0.07 px for the data at SNr=0 (Supplementary Fig. 1d), and the exeution time is about 0% shorter. This faster performane is inonsequential given the intrinsially very high speed of radial symmetry based traing, so all tests and implementation in this paper (exept that reported in Supplementary Fig. 1d) employ the smoothing of m over a 3px x 3px neighborhood. It is reasonable that this loal averaging of gradient slopes mitigates the effet of noise in the determination of the best-fit enter loation; I annot, however, provide a mathematially rigorous justifiation of the effet of smoothing on the algorithm s performane. Coordinate axis bias As noted in the main text, the errors plotted in Fig. a and Supplementary Fig. 1a,b, and d are derived from simulated images with true enters spanning x 0, y 0 [-0.5, 0.5] px, distributed throughout this two-dimensional spae. To examine any potential bias towards partiular oordinate axes, I plot in Fig. Sa the total error for x 0=y 0, i.e. true enters distributed along a line 45 degrees tilted from the x or y axes. The mean total errors are 0.08 px, 0.030 px, and 0.06 px for radial symmetry traing, Gaussian NLLS fitting, and Gaussian MLE fitting, respetively, whih are nearly idential to those determined for x 0, y 0 distributed independently throughout [-0.5, 0.5] px. In addition, I plot in Fig. Sb the error in y versus the error in x, whih does not show any appreiable asymmetry. The two eigenvalues of the ovariane matrix of the x and y errors are similar to eah other for eah of the various traing methods: 4.6 10-4 and 5.0 10-4 for the radial symmetry method, 6.4 10-4 and 7.1 10-4 for Gaussian NLLS, and 4.0 10-4 and 4.4 10-4 for Gaussian MLE. The Pearson orrelation oeffiients for the x and y errors are 0.0034, 0.014, and 0.0031 for radial symmetry traing, Gaussian NLLS fitting, and Gaussian MLE fitting, respetively. There appears to be no disernible bias with respet to oordinate axes. 11
Figure S. Traing auray for various partile loalization algorithms applied to simulated partile images with a signal-to-noise ratio of 0, in whih the true enters are distributed along the line x 0=y 0. (a) Traing auraies. The symbol r indiates the vetor between the alulated or true partile loation and the origin. (b) The error in the y oordinate of the partile enter versus the error in the x oordinate; there is no appreiable asymmetry. Correlations between methods The errors resulting from radial symmetry traing and Gaussian fitting of the same simulated image are strongly orrelated (Fig. S3), suggesting that both reflet the inherent auray with whih noisy images an be assessed. Figure S3. The total error for radial-symmetry-based traing and Gaussian fitting of the same simulated partiles, with Gaussian fitting performed using (a) nonlinear least squares minimization and (b) maximum lielihood estimation. For the same partile, the error obtained with eah of these loalization methods are highly orrelated. The FluoroBanroft algorithm I briefly omment on another analytially exat partile traing algorithm that has been reently proposed to be fast and aurate, the FluoroBanroft algorithm 14. The method requires as a parameter the standard deviation of the presumed Gaussian intensity distribution, given theoretially as: 1
0.6λ σ FB =, NA where the symbols are as defined in Setion 1. We an onsider different widths, parameterized as σ = fσ, with f = 1 giving the theoretial value. I plot in Fig. S4 the traing error and bias over a range FB of SNr for the FluoroBanroft algorithm with various f and for radial-symmetry-based traing. The FluoroBanroft algorithm gives very large error, arising from a large bias it is more aurate for partiles loated near the enter of a pixel, and less aurate for partiles farther away from the enter. This bias was not noted in Refs. 14 and 16, but has been desribed in more reent wor S. Also, we note that the traing error is strongly dependent on the value of σ hosen, with the lowest error arising from f = 1.5. Sine partile image widths are rarely exatly equal to theoretial values, and may vary from setup to setup, the strong dependene of traing error on the input width parameter is a signifiant onern. Both the FluoroBanroft and weighted linearized Gaussian methods 13 use the logarithm of intensity values to dedue properties of a Gaussian intensity funtion. Logarithmi saling reates nontrivial transformations of noise and baground values, however, easily overweighting noisy or baground pixels. In fat, the traing errors for the FluoroBanroft fits shown below assume zero baground; inorporating the atual baground level used in reating the simulated images results in greater error. Figure S4. The auray of traing simulated partiles using radial-symmetry-based traing and the FluoroBanroft algorithm for various values of f, inluding the theoretial value f=1. Eah point denotes the average error over 1,000 images. 3 Loalization auray for asymmetri images One an as how this radial-symmetry-based traing and symmetri Gaussian fitting deal in pratie with objets whose appearane is unintentionally asymmetri, for example due to optial aberrations. (Of ourse, for objets that have some nown, intrinsi asymmetry, one should fit partile images to an asymmetri model.) There are an infinite number of possible asymmetries, the ataloging of whih is beyond the sope of this paper, so as a simple illustration I examine simulated images for whih the point spread funtion is asymmetri, being expanded and ontrated by a fator of 1.5 in y and x, respetively. The auray of loalization of these images is examined over a range of SNr (Fig. S5). The radial-symmetrybased traing and Gaussian fitting methods are similar in their performane with respet to these images, and the overall auray is not dramatially worse than for symmetri images. 13
Figure S5. The auray of enter determination for simulated images of asymmetri spots. Eah point denotes the average of 100 simulated images, onstruted using an asymmetri point spread funtion saled by (1/1.5) and 1.5 in the x and y diretions, respetively. Inset: A simulated image with SNr=0. 4 Tests Using Experimental Data This setion ontinues the disussion of tests of partile loalization using experimental data begun in the main text. Soures of experimental data are desribed in Online Methods. Imaging the struture and dynamis of olloidal assemblies provides important insights into the material properties of self-assembled strutures. Confoal mirosopy of fluoresent miropartiles has enabled, for example, detailed haraterizations of rystalline growth S3 and non-equilibrium states S4. Supplementary Figs. 6a, show onfoal mirosopy slies of three-dimensional olloidal assemblies omposed of. and 1.1 µm diameter poly(methyl metharylate) (PMMA) and mirospheres, respetively (see Online Methods). The two-dimensional pair orrelation funtion g(r) averaged over eah slie of the data sets provides a simple derived quantity with whih to examine the traing output. These g(r) are plotted in Supplementary Figs. 6b,d, and are nearly idential for Gaussian fitting and radial-symmetry-based traing. The radial-symmetry-based results may show fewer artifatual signatures of partiles separated from other partiles by less than one partile diameter (Supplementary Fig. 6d). Traing the motions of fluorophore-onjugated proteins reveals mehanisms underlying a variety of ellular ativities. Supplementary Fig. 6e shows a fluoresene image of quantum dot labeled aetylholine reeptors in HEK 93 ells (see Online Methods), together with one example of the mean square displaement of a partile as a funtion of time (Supplementary Fig. 6f,g). Extrating the protein diffusion oeffiient from the trajetories of approximately 60 reeptors gives a mean value of 0.48 px /frame for the radial-symmetry-based traing and, nearly identially, 0.49 px /frame for the Gaussian-fit traing; the standard deviation aross all trajetories is ± 0.34 px /frame for both methods. The median differene between objet positions for the two methods is 0.09 px. 14
Supplementary Fig. 6h shows results derived from fluoresene images of five quantum dot labeled inesins traveling along mirotubules. Prior studies of these motor proteins have revealed disrete 8 nm stepping motions 1. Assessment of partile displaements using a student s t-test S5 gives the probability distribution of step sizes shown in Supplementary Fig. 6h, the first pea of whih is entered at 8.7 nm and 8.3 nm for the radial-symmetry-based and Gaussian-fit partile data, respetively. Referenes for Supplementary Notes and Results S1. Solomon, C. & Breon, T. Fundamentals of Digital Image Proessing: A Pratial Approah with Examples in Matlab. (John Wiley and Sons: 011). S. Shen, Z. & Andersson, S. B. Bias and Preision of the fluorobanroft Algorithm for Single Partile Loalization in Fluoresene Mirosopy. IEEE Transations on Signal Proessing 59, 4041 4046 (011). S3. Ganapathy, R., Buley, M. R., Gerbode, S. J. & Cohen, I. Diret measurements of island growth and stepedge barriers in olloidal epitaxy. Siene 37, 445 8 (010). S4. Wees, E. R., Croer, J. C., Levitt, A. C., Shofield, A. & Weitz, D. A. Three-dimensional diret imaging of strutural relaxation near the olloidal glass transition. Siene 87, 67 31 (000). S5. Yardimi, H., van Duffelen, M., Mao, Y., Rosenfeld, S. S. & Selvin, P. R. The mitoti inesin CENP-E is a proessive transport motor. Pro. Natl. Aad. Si. U.S.A. 105, 6016 601 (008). 15