[RowSigma,ColSigma] = BeamSpread(Img,RelThresh,N,DisplayPlot)
Computes beam spread in 2 axes (image row and column) given input image. Beam spread is quantified as least squares fit for Sigma with Gaussian form $exp(0.5(x/sigma)^2)$. Image is averaged down rows and across columns, normalized to the peak, and fit is made to normalized irradiance above RelThresh. If there is an input for N that is greater than 0, it is interpolated over N points, centered about the centroid. Fit can be displayed by setting DisplayPlot=1.
Parameters 
Description 
Img [matrix] 
Average beam irradiance (arbitrary units) or a grid structure with fields .x, .y and .g 
RelThresh [scalar] 
Attenuation relative to the peak for Gaussian fit 
N [scalar] 
(Optional) Number of points for irradiance interpolation 
DisplayPlot [scalar] 
(Optional) Option (1/0) to display plot of row and column fit. Default is FALSE. 
Return Values 
Description 
RowSigma [scalar] 
Fit of beam irradiance in image row axis (pixels/units of .y) 
ColSigma [scalar] 
Fit of beam irradiance in image column axis (pixels/units of .x) 
Copyright (c) 2009. All rights reserved.

What do you think about this topic? Send feedback!
