pyoptics.beams¶
Analytical beam definitions.
Includes
Gaussian beams
plane waves
Convention: fields vary as exp(i(k.r - omega*t)); the time dependence exp(-i*omega*t) is implicit. A beam travelling in +z thus carries the phase exp(+i*k*z), a diverging wavefront (z > 0 behind a waist) has the phase +k*r**2/(2*R(z)) with R(z) > 0, and the Gouy phase enters as exp(-i*psi(z)).
References¶
Siegman, “Lasers”, University Science Books (1986).
H. Kogelnik and T. Li, “Laser beams and resonators”, Appl. Opt. 5, 1550-1567 (1966).
B. E. A. Saleh and M. C. Teich, “Fundamentals of Photonics”, 2nd ed., Wiley (2007).
Functions
Hermite-Gaussian beam HG_lm (paraxial, waist at z = 0). |
|
Laguerre-Gaussian beam LG_pl (paraxial, waist at z = 0). |
|
Return plane wave defined by direction vector. |
|
Return spherical wave |
|
Rayleigh length from the waist and the far field divergence. |
- pyoptics.beams.plane_wave(A, dir_vec, x, y, z, wl, n=1.0)[source]¶
Return plane wave defined by direction vector.
- Parameters:
- Anumber
Amplitude (scalar or vector-valued).
- dir_vecarray
Dimensionless direction vector of unit length. Relates to wave vector by k_vector = n*2*pi/lambda dircetion_vector.
- x, yarrays
x, y coordinate arrays.
- znumber
z position.
- wlnumber
Vacuum wavelength.
- nnumber, optional
Refractive index.
- Returns:
- Earray
Sampled electric field E(x, y, z; k) = A*exp(+i*k_vector.r).
- pyoptics.beams.spherical_wave(x, y, z, wavelength, x0, y0, z0, U0=1.0, n=1.0)[source]¶
Return spherical wave
- Parameters:
- x, yarrays
- znumber
- wlnumber
- x0, y0, z0numbers
- U0: number, optional
Complex amplitude factor.
- nnumber, optional
Refractive index of medium.
- Returns:
- Uarray
U0*exp(+-ikR)/R, diverging (exp(+ikR)) for z >= z0 and converging towards (x0, y0, z0) (exp(-ikR)) for z < z0, both travelling in +z for the exp(-i*omega*t) time dependence.
- pyoptics.beams.z_r_from_divergence_angle(w0, theta, n=1.0, wl=None)[source]¶
Rayleigh length from the waist and the far field divergence.
z_r = w0/theta (paraxial).
- Parameters:
- w0number
Waist radius.
- thetanumber
Far field divergence half angle in the medium (radians).
- n, wloptional
Not needed, only kept for backwards compatibility.
- Returns:
- z_rnumber
- pyoptics.beams.gauss_laguerre(p, l, x, y, z, w_0, z_r, wl)[source]¶
Laguerre-Gaussian beam LG_pl (paraxial, waist at z = 0).
- Parameters:
- p, lint
Radial and azimuthal mode index.
- x, yarrays
- znumber
Distance from the waist.
- w_0number
Waist radius.
- z_rnumber
Rayleigh length (pi*w_0**2/wl).
- wlnumber
Wavelength.
- Returns:
- fieldarray
Field proportional to exp(i*(k*z + k*r**2/(2*R(z)) + l*phi - (2p +
|l|+ 1)*arctan(z/z_r))). For l > 0, the helical phase exp(+i*l*phi) carries the orbital angular momentum +l*hbar per photon along +z (exp(-i*omega*t) convention).
- pyoptics.beams.gauss_hermite(l, m, x, y, z, w_0, z_r, wl)[source]¶
Hermite-Gaussian beam HG_lm (paraxial, waist at z = 0).
- Parameters:
- l, mint
Mode indices in x and y.
- x, yarrays
- znumber
Distance from the waist.
- w_0number
Waist radius.
- z_rnumber
Rayleigh length (pi*w_0**2/wl).
- wlnumber
Wavelength.
- Returns:
- fieldarray
Field proportional to exp(i*(k*z + k*r**2/(2*R(z)) - (l + m + 1)*arctan(z/z_r))).