qspectrumanalyzer icon indicating copy to clipboard operation
qspectrumanalyzer copied to clipboard

Problem to show waterfall data on Kali Linux

Open QuixoteSystems opened this issue 2 years ago • 6 comments

All seems running fine on Kali Linux (Debian 5.19.11-1kali2 (2022-10-10) x86_64 GNU/Linux) but before get the waterfall workingg I get this error:

Traceback (most recent call last):
  File "/home/kali/.local/lib/python3.10/site-packages/qspectrumanalyzer/plot.py", line 289, in update_plot
    self.waterfallImg.scale((data_storage.x[-1] - data_storage.x[0]) / len(data_storage.x), 1)
TypeError: ImageItem.scale() takes no arguments (2 given)

If I can change the function call in line 289 with no parameters then I don't get any error and I think is working well. My simple test:

#self.waterfallImg.scale((data_storage.x[-1] - data_storage.x[0]) / len(data_storage.x), 1) # line 289
self.waterfallImg.scale()

QuixoteSystems avatar Oct 16 '22 14:10 QuixoteSystems

scaling still required for me. I've found the following modification to apply a transform works.

in plot.py, import QtGui (e.g. from Qt import QtCore, QtGui) then create and apply transform in update_plot function:

        # Create waterfall image on first run
        if self.counter == 1:
            self.waterfallImg = pg.ImageItem()
            tr = QtGui.QTransform()
            scale_x = (data_storage.x[-1] - data_storage.x[0]) / len(data_storage.x)
            tr.scale(scale_x, 1)
            #self.waterfallImg.scale((data_storage.x[-1] - data_storage.x[0]) / len(data_storage.x), 1)
            self.waterfallImg.setTransform(tr)
            self.plot.clear()
            self.plot.addItem(self.waterfallImg)

ianmorti avatar Feb 05 '23 11:02 ianmorti

@ianmorti This was a great help to me. I use macOS Ventura on an M1 Mac (Yes, qspectrumanalyzer runs on the Mac, too) and had the same issue with "no waterfall data". I tried your patch and no everything is fine! Thank you!

betzburger avatar Feb 24 '23 13:02 betzburger

scaling still required for me. I've found the following modification to apply a transform works.

in plot.py, import QtGui (e.g. from Qt import QtCore, QtGui) then create and apply transform in update_plot function:

        # Create waterfall image on first run
        if self.counter == 1:
            self.waterfallImg = pg.ImageItem()
            tr = QtGui.QTransform()
            scale_x = (data_storage.x[-1] - data_storage.x[0]) / len(data_storage.x)
            tr.scale(scale_x, 1)
            #self.waterfallImg.scale((data_storage.x[-1] - data_storage.x[0]) / len(data_storage.x), 1)
            self.waterfallImg.setTransform(tr)
            self.plot.clear()
            self.plot.addItem(self.waterfallImg)

@ianmorti Maybe it makes sense to create PR? :)

fobdy avatar Jul 03 '23 07:07 fobdy

scaling still required for me. I've found the following modification to apply a transform works.

in plot.py, import QtGui (e.g. from Qt import QtCore, QtGui) then create and apply transform in update_plot function:

        # Create waterfall image on first run
        if self.counter == 1:
            self.waterfallImg = pg.ImageItem()
            tr = QtGui.QTransform()
            scale_x = (data_storage.x[-1] - data_storage.x[0]) / len(data_storage.x)
            tr.scale(scale_x, 1)
            #self.waterfallImg.scale((data_storage.x[-1] - data_storage.x[0]) / len(data_storage.x), 1)
            self.waterfallImg.setTransform(tr)
            self.plot.clear()
            self.plot.addItem(self.waterfallImg)

That patch did the trick! This issue has been driving me crazy (MBP M1 Max) - - thank you so much! Hoping to see it get added in a future revision.

jfritsch75 avatar Jul 17 '23 14:07 jfritsch75

ianmorti

This adjustment of plot.py also fixed the same issue for me on windows. @ianmorti you deserve a nobel prize

jeroenynt avatar Sep 11 '23 14:09 jeroenynt

scaling still required for me. I've found the following modification to apply a transform works.

in plot.py, import QtGui (e.g. from Qt import QtCore, QtGui) then create and apply transform in update_plot function:

        # Create waterfall image on first run
        if self.counter == 1:
            self.waterfallImg = pg.ImageItem()
            tr = QtGui.QTransform()
            scale_x = (data_storage.x[-1] - data_storage.x[0]) / len(data_storage.x)
            tr.scale(scale_x, 1)
            #self.waterfallImg.scale((data_storage.x[-1] - data_storage.x[0]) / len(data_storage.x), 1)
            self.waterfallImg.setTransform(tr)
            self.plot.clear()
            self.plot.addItem(self.waterfallImg)

can confirm this works <3

jotamjr avatar Apr 14 '24 01:04 jotamjr