blob: c5befc21d8a69ccb987aacb5aed54a65fafeb68b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
% Returns the field radius of the beam at any point z along a Gaussian beam
%
% SYNTAX: [w,R,zR]=beamradius([w0,z0,lambda],z);
%
% w0 = waist size
% z0 = position of waist
% lambda = wavelength
%
% w = spot size (field radius) at z
% R = curvature of phasefront at z
% zR = Raleigh length.
%
%-------------------------------------------------------------------
% SYNTAX: [w,R,zR]=beamradius([w0,z0,lambda],z);
%-------------------------------------------------------------------
function [w,R,zR]=beamradius(params,z)
w0=params(1); % beam (field) width at waist [meters]
z0=params(2); % waist position [meters]
lambda=params(3); % wavelength [meters]
zR=pi*w0^2/lambda; % Raleigh length [meters]
w=w0.*sqrt(1+((z-z0)/zR).^2); % beam width at z [meters]
if nargout>=2
R=z.*(1+(zR./z).^2); % beam phasefront curvature at z
end
|