finesse.solutions.beamtrace.PropagationSolution.plot

PropagationSolution.plot(*args, filename=None, show=True, ignore=None, name_xoffsets=None, name_yoffsets=None, ylims=None, npts=1000, resolution='adaptive', single_sided=False, subs=None)[source]

Plot any combination of the beam sizes, accumulated Gouy phases and / or wavefront curvatures over the propagated path.

The expected, valid positional arguments are any combination of:
  • “beamsize”,

  • “gouy”,

  • “curvature”,

or “all” to plot all of the above.

If no positional args are given then the beamsize (first axis) and accumulated Gouy phase (second axis) will be plotted by default.

The locations of each component will be marked on the figure, unless the component is in ignore or the component has “AR” or “HR” in its name.

Parameters:
filenamestr or file-like, optional

Name of a file or existing file object to save the figure to.

showbool, optional; default: True

Whether to show the figure.

ignorecomponent, sequence of, optional

A component or sequence of components to ignore when making markers.

name_xoffsetsdict, optional

Dictionary of component names to x-axis offsets for shifting where the component name text is placed. The offset value is interpreted in terms of data co-ordinates.

name_yoffsetsdict, optional

Dictionary of component names to y-axis offsets for shifting where the component name text is placed. The offset value is interpreted in terms of data co-ordinates.

ylimsdict, optional

Dictionary of target names (i.e. “beamsize”, “gouy” or “curvature”) to manual axis y-limits.

nptsint, optional; default: 1000

See equivalent argument in PropagationSolution.all_segments().

resolutionstr, optional; default: “adaptive”

See equivalent argument in PropagationSolution.all_segments().

single_sidedbool

If False the beamsize plot is a single positive line.

subsdict, optional

A dictionary of model parameter to value substitutions to pass to the eval methods of symbolic expressions.

If this solution object is not symbolic then this argument is ignored.

Returns:
figFigure

Handle to the figure.

axsaxes

The axis handles.