prysm.plotting#

Plotting-related functions.

prysm.plotting.share_fig_ax(fig=None, ax=None, numax=1, sharex=False, sharey=False)#

Reurns the given figure and/or axis if given one. If they are None, creates a new fig/ax.

Parameters
  • fig (matplotlib.figure.Figure, optional) – figure

  • ax (matplotlib.axes.Axis) – axis or array of axes

  • numax (int) – number of axes in the desired figure, 1 for most plots, 3 for plot_fourier_chain

  • sharex (bool, optional) – whether to share the x axis

  • sharey (bool, optional) – whether to share the y axis

Returns

  • matplotlib.figure.Figure – A figure object

  • matplotlib.axes.Axis – An axis object

prysm.plotting.add_psd_model(psd, fig=None, ax=None, invert_x=False, lw=None, ls='--', color='k', alpha=1, zorder=None, psd_fcn=None, **psd_fcn_kwargs)#

Add a PSD model to a line plot.

Parameters
  • psd (prysm.interferogram.PSD) – a PSD object

  • fig (matplotlib.figure.Figure) – Figure containing the plot

  • ax (matplotlib.axes.Axis) – Axis containing the plot

  • invert_x (bool, optional) – if True, plot with x axis of spatial period

  • lw (float, optional) – line width

  • ls (str, optional) – line style

  • color (str, optional) – something matplotlib understands as a color

  • alpha (float, optional) – alpha (transparency) parameter for matplotlib

  • zorder (int, optional) – z order (height in the stack)

  • psd_fcn (callable, optional) – a callable function. If None, inferred between ab_psd and abc_psd based on if c is in psd_fcn_kwargs

  • **psd_fcn_kwargs – keyword arguments arguments passed to psd_fcn after the spatial frequency variable

Returns

  • fig (matplotlib.figure.Figure) – Figure containing the plot

  • ax (matplotlib.axes.Axis) – Axis containing the plot