vispy.visuals.image_complex module#

class vispy.visuals.image_complex.ComplexImageVisual(data=None, complex_mode='magnitude', **kwargs)#

Bases: ImageVisual

ImageVisual subclass displaying a complex-valued image.

This class handles complex values by using an rg32f float texture behind the scenes, storing the real component in the “r” value and the imaginary in the “g” value.


Complex valued ImageVisual data. Should be a two dimensional array with a dtype of np.complex64 or np.complex128.

The mode used to convert the complex value in each pixel into a scalar:
  • ‘real’: show only the real component.

  • ‘imaginary’: show only the imaginary component.

  • ‘magnitude’: show the magnitude (np.abs) of the complex value.

  • ‘phase’: show the phase (np.angle) of the complex value.

COMPLEX_MODES = {'imaginary', 'magnitude', 'phase', 'real'}#
property clim#

Get color limits used when rendering the image (cmin, cmax).

property complex_mode#

Set the image data.


The image data.

texture_formatstr or None