where w0 is the beam radius, 
p0 is the focal plane on the 
z-axis, 
Ebg0 is the background electric field amplitude and the spot radius for different positions along the propagation axis is given by
 
    
    Note that the time-harmonic ansatz in COMSOL is 
ejωt and with this convention, the beam above propagates in the +
z direction. The equations are modified accordingly for beams propagating along the other coordinate axes. 
 
    where the beam is assumed to be propagating in the z direction, the focal plane is spanned by the 
x and 
y coordinates, 
e is the unit magnitude transverse polarization in the focal plane, 
l and 
m denote the indices for the wave vectors, the index 
n accounts for the two polarizations per wave vector 
klm, 
almn is the amplitude, 
un(
klm) is the unit magnitude polarization, and 
r is the position vector.
 
    Multiplying with the conjugate of the exponential factor above and the polarization factor un(
klm) and applying a surface integral over the entire focal plane allows us to extract the amplitudes as
 
    where kt,lm is the magnitude of the transverse wave vector component.