## 1.

## Introduction

Charged-couple devices (CCD) and complementary metal oxide semiconductor (CMOS) image sensors have become standard beam radius measurement tools due to their ability to return a two-dimensional (2-D) beam intensity profile. The first-order moment (arithmetic centroid) has been used with CCD sensors to track the position of lasers,^{1} Shack–Hartman wavefronts,^{2} and stars.^{3} From values such as second moment beam diameter, beam ellipticity, and beam orientation, more complex propagation related beam quality metrics such as ${\mathrm{M}}^{2}$ may be determined.^{4}5.^{–}^{6} We note that for a pure ${\mathrm{TEM}}_{00}$ Gaussian beam, the second moment radius equals the $1/{e}^{2}$ (13.53%) radius determined by percent-of-peak intensity. Although previous literature has dealt primarily with the CCD sensor, CMOS sensors are quickly replacing CCD sensors as they are more economical to produce and require less power.^{7}

The second moment beam radius measurement technique, in conjunction with the CCD or CMOS sensor, improves on simpler beam profiling devices, which return only a one-dimensional (1-D) beam intensity profile through use of a scanning slit or knife edge. The beam radius on the scanning beam profilers is calculated by finding the radius at which the beam’s 1-D intensity profile intersects a predetermined percentage (e.g., 13.53%) of the beam’s peak intensity.^{8} Although a similar method can be used with CCD or CMOS sensors, the second moment utilizes the full 2-D beam profile, providing a more accurate beam measurement technique. The radius of the monochromatic beam ${w}_{\sigma}(z)$ is given by the second moment as^{5}

## (2)

$${\sigma}_{r}^{2}(z)=\frac{\iint {r}^{2}I(r,z)r\mathrm{d}r\mathrm{d}\theta}{\iint I(r,z)r\mathrm{d}r\mathrm{d}\theta},$$^{9}

In the past, image sensors were avoided for beam measurement since high noise levels from background light photon noise, readout noise, background level, and sampling error^{10} were problematic when coupled with the second moment measurement method, which is highly susceptible to error from noise. However, the last two decades have seen improvements to image sensor hardware and the development of noise reduction techniques, which enable image sensors to provide accurate beam radius measurements. The noise reduction techniques can be understood by considering the second moment integrals [see Eq. (2)], which heavily weight noise at high values of $r$.^{11} If—for a theoretical sensor—the limits of ${\sigma}_{r}^{2}(z)$ extended toward infinity, then the second moment integral would be completely dominated by noisy pixels.^{12} Even with finite dimensions, noise at high $r$ values and outside the beam area can adversely affect the accuracy of small beam measurements. Two techniques are generally used to reduce noise. In the first method, pixels below a certain threshold value are removed from the second moment calculation (thresholding) in an attempt to retain only valid beam data.^{13} However, noisy pixels falling above the threshold value can remain. Therefore, the second technique limits the region about the centroid over which the summation occurs (software aperture) to further reduce the second moment error due to noise.^{14}

The thresholding algorithm is applied to the image sensor data before using a software aperture or calculating the second moment.^{13} Thresholding entails first sampling an unilluminated portion of the sensor (e.g., the four corners) to determine the mean $\mu $ and standard deviation ${\sigma}_{n}$ of the background noise. The mean and standard deviation are then used to calculate a threshold value against which each pixel’s intensity value is compared. Pixels falling below the threshold value are considered unilluminated, whereas pixels above the threshold have the mean subtracted from their intensity value and are then used in the second moment calculation. A pixel ${I}_{p}(x,y)$ is considered illuminated when

^{13}If $n$ is set too low, noisy pixels are considered illuminated, but if $n$ is set too high then valid beam data are lost (see Fig. 1). Therefore, there exists an optimum value of $n$ for which noise is excluded from the beam measurement but at which the beam truncation is minimal.

^{10}Regardless of the value $n$, some portion of a noisy beam is truncated by the thresholding procedure.

After thresholding, the software aperture can be applied to exclude extraneous noise from the second moment calculation yet retain valid beam data. The software aperture is centered on the beam and extends a finite distance from the centroid [see Fig. 2(b)]. While the software aperture removes noise, it also truncates the tails of the Gaussian beam (see Fig. 1), and a balance must be struck between eliminating extraneous noise and removing valid data.^{15} Theoretical work and simulations have shown that the optimal software aperture size varies with both the value $n$ used in thresholding^{14} and the radius of the beam.^{11} Although $n$ is predetermined, the beam radius is generally not known before measurement, and an iterative algorithm must determine the optimal software aperture size for the measured beam.^{5}

An elliptically invariant scale factor that corrects for the truncation of a Gaussian beam by both thresholding and the software aperture is derived in this paper. Since a scale factor must be based on the expected beam,^{15} we use the ubiquitous ${\mathrm{TEM}}_{00}$ Gaussian, which has a time-averaged intensity profile $I(r,z)$ represented by

## 2.

## Scale Factor Derivation

The scale factor derived herein corrects for the truncation of the Gaussian beam by both thresholding and the software aperture. To derive the scale factor, three main steps are needed. First, the radius (threshold radius) at which the Gaussian beam is truncated by thresholding alone must be determined. This value is then used to calculate the software aperture radius—where the beam is truncated by both noise reduction techniques. Finally, the software aperture radius is applied to the second moment integrals, which yields an analytic solution and allows the scale factor to be determined through algebraic manipulation.

## 2.1.

### Thresholding

Thresholding is performed on the sensor data before the software aperture is applied or the second moment is calculated. For ease of calculation, the standard deviation of the noise is rewritten as the peak beam intensity multiplied by a scalar $k$

After the threshold comparison has been applied, the mean is subtracted from the illuminated pixels. The radius ${r}_{t}$ at which the Gaussian intensity distribution is truncated by thresholding can then be found by setting $I({r}_{t},z)$ equal to the threshold value $nk{I}_{0}$ Solving Eq. (7) for ${r}_{t}$ yields## 2.2.

### Software Aperture

The software aperture is applied after thresholding to include valid beam data and exclude extraneous noise from the second moment calculations. Although previous work has focused on a square or rectangular software aperture,^{12}^{,}^{13} a radially symmetric software aperture (for a radially symmetric beam) has the advantage of excluding extraneous noise found in the corners of a rectangle or square. We define the software aperture as a circular region centered on the beam, which includes a portion $\beta $ of the sensors total power ${P}_{T}$ after thresholding. $\beta $ is given as

## (10)

$$P={\int}_{0}^{2\pi}{\int}_{0}^{R}{I}_{0}{e}^{-\gamma {r}^{2}}r\mathrm{d}r\mathrm{d}\theta =\frac{\pi {I}_{0}}{\gamma}(1-{e}^{-\gamma {R}^{2}}).$$## (11)

$$\beta =\frac{{P}_{S}}{{P}_{T}}=\frac{\frac{\pi {I}_{0}}{\gamma}(1-{e}^{-\gamma {r}_{s}^{2}})}{\frac{\pi {I}_{0}}{\gamma}(1-{e}^{-\gamma {r}_{t}^{2}})}=\frac{1-{e}^{-\gamma {r}_{s}^{2}}}{1-nk},$$## 2.3.

### Scale Factor

To find the radius of the beam, Eq. (2) is first rewritten with integration limits defined by the software aperture

## (14)

$${\sigma}_{r}^{2}(z)=\frac{{\int}_{0}^{2\pi}{\int}_{0}^{{r}_{s}}{r}^{2}I(r,z)r\mathrm{d}r\mathrm{d}\theta}{{\int}_{0}^{2\pi}{\int}_{0}^{{r}_{s}}I(r,z)r\mathrm{d}r\mathrm{d}\theta}.$$## (15)

$${\int}_{0}^{2\pi}{\int}_{0}^{{r}_{s}}{r}^{3}{I}_{0}{e}^{-\gamma {r}^{2}}\mathrm{d}r\mathrm{d}\theta =\frac{\pi {I}_{0}}{\gamma}\left(\frac{1-{e}^{-\gamma {r}_{s}^{2}}(\gamma {r}_{s}^{2}+1)}{\gamma}\right),$$## (16)

$${\int}_{0}^{2\pi}{\int}_{0}^{{r}_{s}}I(r)r\u200a\mathrm{d}r\mathrm{d}\theta =\frac{\pi {I}_{0}}{\gamma}(1-{e}^{-\gamma {r}_{s}^{2}}).$$## (18)

$${\sigma}_{r}(z)=\frac{1}{\gamma}{[1+\frac{(1-\nu )\mathrm{ln}(1-\nu )}{\nu}]}^{\frac{1}{2}}.$$Although the scale factor accounts for both thresholding and the software aperture, it simplifies when only one noise reduction technique is used (either thresholding or the software aperture). If only thresholding is used, $\beta =1$ and $\nu =1-nk$, so the scale factor reduces to

Conversely, when only the software aperture is applied, $n=0$ and $\nu =\beta $. Thus, the scale factor becomes If neither thresholding nor the software aperture is used, the limit as $\beta $ goes to one and $n$ goes to zero yields Equation (20) can then be rewritten with $\psi (\nu )$ replaced by Eq. (24) as which is the expected result since the Gaussian beam is truncated by neither thresholding nor the software aperture.It can be shown (see Appendix A) that the scale factor is invariant to the ellipticity of the beam. However, to find analytical solutions to the second moment integrals, the scale factor derivation must be performed with a radially symmetric Gaussian intensity distribution and the polar second moment equations. Therefore, an elliptical intensity distribution in region $S$ is rewritten as a radially symmetric distribution in the new region ${S}^{\prime}$ (see Fig. 2) through use of a linear transform. The scale factor derivation demonstrated above is then performed in region ${S}^{\prime}$ with the polar second moment equations. After transforming from region ${S}^{\prime}$ back to $S$, the scale factor has the same form as Eq. (21) and corrects the second moment calculated radii along both the $x$ and $y$ axes.

## 3.

## Testing

Both simulations and real beam data were used to test the scale factor. Whereas simulations provided a more in-depth analysis of the scale factor’s effectiveness—by comparing the measured beam radii to the actual beam radii, determined *a priori*—the analysis of real beam data was needed to demonstrate the efficacy of the scale factor in real-world applications. However, since the radius of a real beam cannot be predetermined, the noise reduction parameters ($n$ and $\beta $) were varied during measurement to show that radii corrected by the scale factor are invariant to $n$ and $\beta $ as derived.

## 3.1.

### Simulations

Simulated laser beams were generated to test the scale factor’s effectiveness and invariance to ellipticity by comparing the generated radii $w(z)$ to the measured radii ${w}_{\sigma}(z)$ and determining the error in the measured radii. The beams were simulated on a 16-bit sensor of $512\times 512\text{\hspace{0.17em}\hspace{0.17em}}\text{pixels}$, with each pixel’s length and width equal to ${p}_{w}=5.5\text{\hspace{0.17em}\hspace{0.17em}}\mu \mathrm{m}$. Although most image sensors are 12 bit, error from analog-to-digital quantization can be ignored when using a 16-bit sensor.^{14} The beams were generated with the beam’s peak amplitude scaled to $0.9{a}_{m}$, where ${a}_{m}$ is the total analog-to-digital converter levels for a sensor (i.e., ${a}_{m}={2}^{16}$ for a 16-bit sensor).

Beam analysis software calculated the second moment radii of the generated beams and allowed thresholding and the software aperture to be turned on or off independently. Thresholding was applied with $n$ (the scalar of the standard deviation of the noise) set to 4 (highest allowable value per the ISO 11146 standard). Generally, $n$ is optimized to sufficiently threshold noise yet minimize beam truncation; however, the scale factor corrects error due to truncation, allowing high values of $n$—which remove more noise—to be used. The software aperture radius (or major and minor axes for an ellipse) was iterated by the software until

which corresponds to an aperture radius roughly 1.5 times the beam radius. When both thresholding and the software aperture were turned on, the software aperture radius was calculated after thresholding had been applied.Due to the layout of the image sensor’s pixels as a rectangular grid, the second moment equations in Cartesian coordinate form, rather than polar coordinate form, were used. Since, for the beams generated, the angle between the measurement axes and the beam axes was zero, the second moment equations for the beam radii simplified to^{16}

## (29)

$${\sigma}_{x}^{2}(z)=\frac{\sum _{}^{}{(x-\overline{x})}^{2}{I}_{p}(x,y)\mathrm{\Delta}x\mathrm{\Delta}y}{\sum _{}^{}{I}_{p}(x,y)\mathrm{\Delta}x\mathrm{\Delta}y},$$## (30)

$${\sigma}_{y}^{2}(z)=\frac{\sum _{}^{}{(y-\overline{y})}^{2}{I}_{p}(x,y)\mathrm{\Delta}x\mathrm{\Delta}y}{\sum _{}^{}{I}_{p}(x,y)\mathrm{\Delta}x\mathrm{\Delta}y}.$$## (31)

$$\overline{x}=\frac{\sum _{}^{}x{I}_{p}(x,y)\mathrm{\Delta}x\mathrm{\Delta}y}{\sum _{}^{}{I}_{p}(x,y)\mathrm{\Delta}x\mathrm{\Delta}y},$$## (32)

$$\overline{y}=\frac{\sum _{}^{}y{I}_{p}(x,y)\mathrm{\Delta}x\mathrm{\Delta}y}{\sum _{}^{}{I}_{p}(x,y)\mathrm{\Delta}x\mathrm{\Delta}y},$$Three sets of radially symmetric beams were generated and analyzed with different noise reduction settings to characterize the effectiveness of the scale factor. Whereas the first set of beams used only thresholding and the second set of beams applied only the software aperture, the third set of beams employed both thresholding and the software aperture together. Gaussian noise with a mean of $\mu =0.0174{a}_{m}$ and a standard deviation of ${\sigma}_{n}=0.0036{a}_{m}$ was added to the first and third set of beams to simulate noise on the image sensor. The values for $\mu $ and ${\sigma}_{n}$ were chosen to reflect the noise levels seen when measuring real beam data. Since, the second set of beams was analyzed without thresholding, the scale factor reduced to Eq. (23) and had no dependence on noise; therefore, for these beams, no noise was added.

The error of the corrected radii was over an order of magnitude lower than the error of the uncorrected radii across all three sets of calculated beam radii. The error for the first set of calculated beam radii exhibited exponentially decaying behavior and became asymptotic at a radius of $30{p}_{w}$ [see Fig. 4(a)] with an average error of 3.46% and 0.07% for the uncorrected and corrected beams, respectively. The smaller beams had fewer illuminated pixels, and the noise left after the thresholding process dominated the second moment calculation, which led to high errors. For the second set of beams, the error was approximately constant with an average of 2.41% for the uncorrected radii and 0.20% for the corrected radii [see Fig. 4(b)]. The third set of beams showed exponential decay, which reached an asymptote around $30{p}_{w}$ with an average uncorrected error of 5.24% and a corrected error of 0.05% [see Fig. 4(c)]. Although the large error for the smaller beams was similar to the first set of beams (thresholding only), the software aperture removed outlying noisy pixels, which significantly reduced the error compared to thresholding alone.

Whereas the first and second tests demonstrated that the scale factor independently corrects for beam truncation due to either thresholding or the software aperture, the third test showed it can correct for them simultaneously. Indeed, thresholding and the software aperture were needed in conjunction since thresholding alone was unable to return accurate beam measurements for the small beams. Although the uncorrected error was significantly higher when both thresholding and the software aperture were used (due to the combination of systematic errors), the corrected error was of similar magnitude as the corrected error when only thresholding or the software aperture were employed.

Finally, a set of elliptical beams was generated with Gaussian noise ($\mu =0.0174{a}_{m}$ and ${\sigma}_{n}=0.0036{a}_{m}$) to determine whether the scale factor is, as derived, invariant to the ellipticity of the ${\mathrm{TEM}}_{00}$ Gaussian beam (see Fig. 5). The generated beams had ellipticities ($\epsilon $) ranging from 0.08 to 1.00, and their second moment radii were calculated after both thresholding and the software aperture had been applied. The error for the corrected radii was approximately constant as the beam ellipticities changed (see Fig. 5), and the scale factor reduced the error from an average of 5.23% (uncorrected) to 0.06% (corrected). Although slight variations were seen in the corrected error, these were due to the random Gaussian noise in the beams rather than changes in ellipticity. The significant reduction in beam radius error coupled with the consistency of the corrected error, with respect to the changes in ellipticity, demonstrated that the scale factor corrects for the truncation of a Gaussian beam irrespective of ellipticity.

## 3.2.

### Real Beam Data

Since the radius of a real laser beam is determined only through measurement and not known *a priori*, the measured radius cannot be compared to the exact radius as with the simulated beams. However, noting that the scale factor corrects for the second moment measurement’s dependence on the noise reduction parameters $n$ and $\beta $ [see Eq. (20)], we postulated that systematically varying the noise parameters would result in a varied uncorrected radius and a constant corrected radius. Furthermore, the invariance of the corrected radius to $n$ and $\beta $ reflected the physical description of a real laser beam—the radius of which does not change based on software parameters—and allowed the scale factor to be tested on real beam data with a predicted result.

Two tests were implemented using a single mode ${\mathrm{TEM}}_{00}$ Gaussian beam with a wavelength of 675 nm and a beam radius of $\sim 145\text{\hspace{0.17em}\hspace{0.17em}}\mu \mathrm{m}$ measured on a 12-bit image sensor of $512\times 512\text{\hspace{0.17em}\hspace{0.17em}}\text{pixels}$ (pixel height and width $5.5\text{\hspace{0.17em}\hspace{0.17em}}\mu \mathrm{m}$) with the beam analysis software described in the simulation section. Whereas the first test used only thresholding with $n$ varied from 3.5 to 4 (for $n>3.5$ the effect of the scale factor is unobscured by noise), the second test used both thresholding and the software aperture with $n$ held constant at $n=4$ and $\beta $ evenly incremented from 0.985 to 0.995. The measured radii (both uncorrected and corrected) were divided by their initial radius values to show deviations from the initial values (Fig. 6).

In both tests, the uncorrected radii decreased as the truncation of the beam increased (larger $n$ and smaller $\beta $); however, the corrected radii remained approximately constant, demonstrating that the radii corrected by the scale factor are invariant to changes in $n$ and $\beta $ as predicted. Furthermore, the tests—which were performed on real beam data—showed that the scale factor effectively corrects the second moment radius measurements in real-world application.

## 4.

## Conclusion

An image sensor (CCD or CMOS) in conjunction with the second moment radius analysis method can accurately measure the radius of a laser beam; however, the second moment method heavily weights noise and noise reduction techniques such as thresholding and a software aperture must be used before calculating the second moment beam radius. Even as these techniques reduce the random error due to noise, they simultaneously generate systematic error by truncating the tails of the Gaussian beam. A scale factor, invariant to the ellipticity of the beam, was derived to correct the second moment beam radius in response to this systematic error.

Both simulations and real beam data were used to test the scale factor. Simulated laser beams tested the effectiveness of the scale factor and its elliptical invariance by comparing the measured beam radii—corrected and uncorrected—to the generated beams’ actual radii. The measured beam radii were calculated with three different noise reduction settings: only thresholding, only the software aperture, and both thresholding and the software aperture. With all three methods, the scale factor reduced the error of the measured radii by over an order of magnitude; thus, as predicted, the scale factor significantly improved the accuracy of the second moment beam radius measurements. Next, a set of elliptical beams was generated and the radii were measured with both thresholding and the software aperture applied. The corrected error of the beam radii was approximately constant as the ellipticity changed, proving that the scale factor is, as derived, invariant to beam ellipticity. Finally, the scale factor was tested with real beam data by systematically varying the values used in the noise reduction techniques. The observed behavior—the corrected radii remained constant, while the uncorrected radii changed—matched both the derived and physical predictions, thus demonstrating the scale factor’s effectiveness in real-world applications.

Further simulations could be done to test the scale factor when either the noise levels are varied or the size of the simulated sensor is changed (e.g., 256, 1024, or 2048 pixels across). Additional theoretical work could be done to derive a scale factor that is valid for higher-order modes (i.e., Hermite–Gaussian beams and Laguerre–Gaussian beams).

## Appendices

## Appendix A:

### Scale Factor Invariance for Elliptical Gaussian Beams

The scale factor is invariant to the ellipticity of the beam as can be shown by transforming an elliptical beam in region $S$ to a radially symmetric beam in region ${S}^{\prime}$ and performing the scale factor derivation there. The time-averaged intensity $I(x,y,z)$ of an elliptical Gaussian beam is given in a Cartesian coordinate system $S$ as

where ${I}_{0}$ is the peak intensity, ${w}_{x}(z)$ is the radius of the beam along the $x$ axis, and ${w}_{y}(z)$ is the radius of the beam along the $y$ axis. A new region ${S}^{\prime}$ with coordinates ${x}^{\prime}$ and ${y}^{\prime}$ is formed from $S$ with a transform## (34)

$$\left|\begin{array}{cc}\frac{{w}_{y}(z)}{{w}_{x}(z)}& 0\\ 0& 1\end{array}\right|\left|\begin{array}{c}x\\ y\end{array}\right|=\left|\begin{array}{c}{x}^{\prime}\\ {y}^{\prime}\end{array}\right|,$$## (37)

$$I(x,y,z)=I({x}^{\prime},{y}^{\prime},z)={I}_{0}{e}^{\frac{-2}{{w}_{y}^{2}(z)}({x}^{\prime 2}+{y}^{\prime 2})}.$$Integrals are transformed when moving from $S$ to ${S}^{\prime}$ with the following equation:^{17}

## (40)

$${\iint}_{S}f(x,y)\mathrm{d}x\mathrm{d}y={\iint}_{{S}^{\prime}}f({x}^{\prime},{y}^{\prime})\left|\frac{\partial (x,y)}{\partial ({x}^{\prime},{y}^{\prime})}\right|\mathrm{d}{x}^{\prime}\mathrm{d}{y}^{\prime},$$## (41)

$$\left|\frac{\partial (x,y)}{\partial ({x}^{\prime},{y}^{\prime})}\right|=\left|\begin{array}{cc}\frac{\partial x}{\partial {x}^{\prime}}& \frac{\partial y}{\partial {x}^{\prime}}\\ \frac{\partial x}{\partial {y}^{\prime}}& \frac{\partial y}{\partial {y}^{\prime}}\end{array}\right|=\left|\begin{array}{cc}\alpha & 0\\ 0& 1\end{array}\right|=\alpha ,$$## (43)

$$\alpha {\iint}_{{S}^{\prime}}f({r}^{\prime},{\theta}^{\prime})r\mathrm{d}{r}^{\prime}\mathrm{d}{\theta}^{\prime}.$$## (45)

$${w}_{\sigma}^{\prime}(z)=\sqrt{2}{\sigma}_{r}^{\prime}=\frac{1}{\psi (\nu )}\sqrt{\frac{2}{\tau}}.$$## Acknowledgments

The authors would like to thank Steve Garvey for his contributions to the numeric scale factor preceding the analytic scale factor and John Cadigan for his help with Python simulations. This work was supported by DataRay Inc.

## References

## Biography

**Lucas R. Hofer** is a graduate student at the Universität Stuttgart, holding a fellowship from the International Max Planck Research School for Condensed Matter and was formerly a technical scientist at DataRay Inc. He received his BS degree in physics from the University of California, Los Angeles, USA, in 2015. He is the author of one journal paper detailing an innovative Mach–Zehnder interferometer control system.

**Rocco V. Dragone** is the CTO and VP of engineering at DataRay Inc. He received his BS and MS degrees in electrical engineering from Drexel University in 2008. His current area of interest is laser beam profiling.

**Andrew D. MacGregor** has a BSc degree in physics and a PhD in instrumentation for IR Astronomy from Imperial College, University of London. After work on IR imaging systems at Marconi Avionics and in fiber optic sensors, he joined RCA New Products in Quebec. Avalanche photodiode teamwork led to record sensitivity for intersatellite digital optical receivers and the first TTL output single photon counting module. Since 1998, he has proudly supported DataRay’s laser beam profiling instrumentation. He is a member of SPIE, OSA, and IEEE LEOS.