finesse.plotting.plot.plot_field

finesse.plotting.plot.plot_field(modes, amplitudes, qs, *, x=None, y=None, samples=100, scale=3, ax=None, colorbar=True, **kwargs)[source]

Plots a 2D optical field for a given set of modes, modal amplitudes, and beam parameters.

x and y dimensions can be specified if required, otherwise it will return an area of scale times the spot sizes. When x and y are provided scale and samples will not do anything.

Parameters
modesarray_like

Pairs of modes (n,m). Can be an 2xN array or a list or tuple of modes.

amplitudesarray_like

Array of complex amplitudes for each mode

qsBeamParam or Tuple(BeamParam, BeamParam)

Compex beam parameter object for x and y planes. If singular value give, qx = qy.

x, yndarray, optional

Specify x and y coordinates to plot beam

samplesint, optional

Number of sample points to use in x and y

scalefloat, optional

Number of sample points to use in x and y

axAxis, optional

A Matplotlib axis to put the image on. If None, a new figure will be made.

colorbarbool

When True the colorbar will be added

**kwargs

Extra keyword arguments will be passed to the pcolormesh plotting function.