summaryrefslogtreecommitdiff
path: root/silx/gui/plot/items/complex.py
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@debian.org>2021-01-06 14:10:12 +0100
committerPicca Frédéric-Emmanuel <picca@debian.org>2021-01-06 14:10:12 +0100
commitb3bea947efa55d2c0f198b6c6795b3177be27f45 (patch)
tree4116758aafe4483bf472c1d54b519e685737fd77 /silx/gui/plot/items/complex.py
parent5ad425ff4e62f5e003178813ebd073577679a00e (diff)
New upstream version 0.14.0+dfsg
Diffstat (limited to 'silx/gui/plot/items/complex.py')
-rw-r--r--silx/gui/plot/items/complex.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/silx/gui/plot/items/complex.py b/silx/gui/plot/items/complex.py
index 8f0694d..0e492a0 100644
--- a/silx/gui/plot/items/complex.py
+++ b/silx/gui/plot/items/complex.py
@@ -124,10 +124,9 @@ class ImageComplexData(ImageBase, ColormapMixIn, ComplexMixIn):
"""Overrides supported ComplexMode"""
def __init__(self):
- ImageBase.__init__(self)
+ ImageBase.__init__(self, numpy.zeros((0, 0), dtype=numpy.complex64))
ColormapMixIn.__init__(self)
ComplexMixIn.__init__(self)
- self._data = numpy.zeros((0, 0), dtype=numpy.complex64)
self._dataByModesCache = {}
self._amplitudeRangeInfo = None, 2
@@ -264,17 +263,9 @@ class ImageComplexData(ImageBase, ColormapMixIn, ComplexMixIn):
'Image is not complex, converting it to complex to plot it.')
data = numpy.array(data, dtype=numpy.complex64)
- self._data = data
self._dataByModesCache = {}
self._setColormappedData(self.getData(copy=False), copy=False)
-
- # TODO hackish data range implementation
- if self.isVisible():
- plot = self.getPlot()
- if plot is not None:
- plot._invalidateDataRange()
-
- self._updated(ItemChangedType.DATA)
+ super().setData(data)
def getComplexData(self, copy=True):
"""Returns the image complex data
@@ -283,7 +274,7 @@ class ImageComplexData(ImageBase, ColormapMixIn, ComplexMixIn):
False to use internal representation (do not modify!)
:rtype: numpy.ndarray of complex
"""
- return numpy.array(self._data, copy=copy)
+ return super().getData(copy=copy)
def getData(self, copy=True, mode=None):
"""Returns the image data corresponding to (current) mode.