Image and Plot Display

hugheslab.display.qshow(img, title=None, axes=None, cmap='gray', dpi=150, figsize=(5, 5), figsizem=None)

Utility to quickly display an image in a matplotlib figure wtih useful defaults.

Arguments:
imgndarray

image to display

Keyword Arguments:
titlestr

plot title, default is not title

axes(str, str)

x and y axis labels, default is no labels

cmapstr

matplotlib colormap, default is ‘gray’

dpiint

display dpi, default is 150

figsize(float, float)

x and y size of figure in inches, default (5,5)

figsizem(float, float)

x and y size of figure in mm, default None (overrides figsize if specified)

Returns: tuple of (Figure, AxesImage) : figure and image objects from matplotlib

hugheslab.display.cshow(img, dpi=150, figsize=(10, 5), figsizem=None, phase_cmap='twilight', amp_cmap='gray', title=None)

Utility to quickly display a complex image as two subplots, one for amplitude and one for phase.

Arguments:
imgnumpy.ndarray

complex image to display

Keyword Arguments:
dpiint

resolution of figure in dots per inch (default = 100)

figsizetuple of (float, float)

size of figure in inches (default = (10, 5))

figsizemtuple of (float, float)

size of figure in millimeters (overrides figsize if specified, default = None)

phase_cmapstr

name of matplotlib colormap to use for phase (default = ‘twilight’)

amp_cmapstr

name of matplotlib colormap to use for amplitude (default = ‘gray’)

titlestr or None

title to set for whole figure (default = None)

Returns:

tuple of (Figure, (Axes, Axes)) : figure and axes objects from matplotlib

hugheslab.display.qplot(data1, data2=None, title=None, axes=None, dpi=150, figsize=(5, 5), figsizem=None)

Utility to quickly display a plot in a matplotlib figure wtih useful defaults.

Arguments:
xndarray

x data to plot

yndarray

y data to plot