finesse.plotting.plot.ws_phase_space

finesse.plotting.plot.ws_phase_space(W, S, OL, cmap='bone', levels=None, wscale='mm', sscale='m', contour_kwargs=None, clabel_kwargs=None, show=True, fig=None, ax=None)[source]

Plots the overlap contours for WS phase space data.

The return values of ws_overlap_grid() correspond to the first three arguments of this function.

Parameters
Wnumpy.ndarray

The W space (as a 2D grid).

Snumpy.ndarray

The S space (as a 2D grid).

OLnumpy.ndarray

The overlap as a function of the WS phase space (as a 2D grid).

cmapstr or colormap, optional; default: “bone”

A matplotlib colormap, or its name.

levelslist, optional; default: None

List of contour levels to pass to contour plotting explicitly.

wscalestr, optional; default: “mm”

Units for W-axis (i.e. beam size units).

sscalestr, optional; default: “m”

Reciprocal units for S-axis (i.e. defocus units).

contour_kwargsdict, optional

Dictionary of keyword arguments to pass to matplotlib contour function. If not specified then the following defaults are used:

  • “colors”: “k”

  • “linestyles”: “–”

  • “linewidths”: 0.5

clabel_kwargsdict, optional

Dictionary of keyword arguments to pass to matplotlib clabel function. If not specified then the following defaults are used:

  • “colors”: same as contour_kwargs

  • “inline”: True

showbool, optional; default: True

Whether to show the figure immediately.

figFigure, optional, default: None

The figure object to use. If not specified a new figure will be drawn.

axAxes, optional, default: None

The axes to use. If not specified the first pair will be used, or created. Ignored if fig is None.

Returns
figFigure

Handle to the matplotlib Figure.

axAxes

Handle to the matplotlib Axis.

See also

ws_overlap_grid