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.
- Parameters:
- datandarray
Complex valued ImageVisual data. Should be a two dimensional array with a dtype of np.complex64 or np.complex128.
- complex_modestr
- 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_data(image)#
Set the image data.
- Parameters:
- imagearray-like
The image data.
- texture_formatstr or None