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
W :
numpy.ndarray
The W space (as a 2D grid).
S :
numpy.ndarray
The S space (as a 2D grid).
OL :
numpy.ndarray
The overlap as a function of the WS phase space (as a 2D grid).
cmap : str or colormap, optional; default: “bone”
A matplotlib colormap, or its name.
levels : list, optional; default: None
List of contour levels to pass to contour plotting explicitly.
wscale : str, optional; default: “mm”
Units for W-axis (i.e. beam size units).
sscale : str, optional; default: “m”
Reciprocal units for S-axis (i.e. defocus units).
contour_kwargs : dict, 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_kwargs : dict, 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
show : bool, optional; default: True
Whether to show the figure immediately.
fig :
Figure
, optional, default: NoneThe figure object to use. If not specified a new figure will be drawn.
ax :
Axes
, optional, default: NoneThe axes to use. If not specified the first pair will be used, or created. Ignored if fig is None.
- Returns
fig :
Figure
Handle to the matplotlib Figure.
ax :
Axes
Handle to the matplotlib Axis.
See also