ptypy.utils.plot_utils.plot_storage#

ptypy.utils.plot_utils.plot_storage(S, fignum=100, modulus='linear', slices=(slice(None, 1, None), slice(None, None, None), slice(None, None, None)), si_axes='x', mask=None, **kwargs)#

Quickly display the data buffer of a Storage instance.

Keyword arguments are the same as PtyAxis

Parameters:
  • S (Storage) – Storage instance

  • fignum (int, optional) – Number of the figure.

  • slices (tuple of slices or string of numpy index expression, optional) – Determines what part of Storage buffer is displayed, i.e. which layers and which region-of-interest. Layers are subplotted horizontically next to each other. Figsize is (6,6*layers)

  • modulus (str, optional) – One of sqrt, log or linear to apply to modulus of array buffer. Useful to reduce dynamic range for diffraction images.

  • si_axes (str, optional) – One of ‘x’,’xy’,’y’ or None, determins which axes display length units instead of pixel units

  • mask (ndarray, scalar or None) – Bool array of valid pixel data for rescaling.

Returns:

fig

Return type:

maplotlib.pyplot.figure

See also

imsave, Storage