analysis.gaussian_beam#

Gaussian Beam Analysis

This module provides GaussianBeamAnalysis, which carries a paraxial Gaussian beam surface by surface through an optical system with the system’s ray-transfer (ABCD) matrices. It reports the beam before and after every surface, the Gouy phase gained along the way, and plots the beam envelope.

References

  1. A. E. Siegman, Lasers (University Science Books, 1986). Ray matrices: chapter 15. Gaussian beams in ABCD systems: chapter 20.

Andrei Utina, 2026

Classes

GaussianBeamAnalysis(optic, beam)

Propagate a paraxial Gaussian beam through an optical system.

class GaussianBeamAnalysis(optic: Optic, beam: GaussianBeam)[source]#

Propagate a paraxial Gaussian beam through an optical system.

Mirrors are handled by unfolding the optical axis, so systems folded by plane mirrors work. The analysis accepts the same systems as optic.paraxial.ray_transfer_matrix.

Parameters:
  • optic – The optical system.

  • beam – The input beam just before surface 1. Its waist position is measured from surface 1. If its medium differs from object space, the same waist is used in the object-space medium.

Raises:

UnsupportedParaxialGeometryError – If the system is outside the first-order engine’s domain, or if a surface has different radii in x and y (a toroidal or biconic surface), because the beam is rotationally symmetric. A powered mirror at oblique incidence only gives a ParaxialDomainWarning, because its astigmatism is ignored.

beam_at(surface_number: int, side: str = 'after') → GaussianBeam[source]#

Return the beam at a surface.

Parameters:
  • surface_number – Surface index, from 1 to the image surface. Negative values count from the end, so -1 is the image.

  • side – "before" or "after" the surface.

Returns:

The beam at that surface.

Raises:

ValueError – If the surface index or the side is not valid.

view(fig_to_plot_on: Figure | None = None, figsize: tuple[float, float] = (8, 4), *, show: bool = True, num_points: int = 200) → tuple[Figure, Axes][source]#

Plot the beam radius along the unfolded optical axis.

Parameters:
  • fig_to_plot_on – Existing figure to plot on. Creates a new figure if None.

  • figsize – Figure size when a new figure is created.

  • show – If True (default), calls plt.show(). Set False for headless use.

  • num_points – Number of samples on each leg between surfaces.

Returns:

Matplotlib Figure and Axes objects.

Return type:

tuple