summaryrefslogtreecommitdiff
path: root/axial/w0_.m
blob: 9c1003f76633d22cae53c3a988ac1d1ffdc4c7eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
%---------------------------------------------------------------
% Given the q-factor and wavelength of a beam, this function
% returns the size of the waist assuming free space 
% propagation. 
%
% SYNTAX: w0=w0_(q <,lambda>);   
%
% q      = q-factor of the beam at the position where R and w are to
%          be found. q can be a vector
% lambda = wavelength. Can be a vector or scalar.
%
% If both q and lambda are vectors, they must be the same size.
%
%---------------------------------------------------------------
% SYNTAX: w0=w0_(q <,lambda>); 
%---------------------------------------------------------------

function w0=w0_(q ,varargin); 

if nargin>=2, lambda=varargin{1}; else lambda=1064e-9; end

w0=sqrt(imag(q).*lambda/pi);