Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem to show waterfall data on Kali Linux #103

Open
QuixoteSystems opened this issue Oct 16, 2022 · 6 comments
Open

Problem to show waterfall data on Kali Linux #103

QuixoteSystems opened this issue Oct 16, 2022 · 6 comments

Comments

@QuixoteSystems
Copy link

QuixoteSystems commented Oct 16, 2022

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()

@ianmorti
Copy link

ianmorti commented Feb 5, 2023

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)

@betzburger
Copy link

@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!

@fobdy
Copy link

fobdy commented Jul 3, 2023

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? :)

@jfritsch75
Copy link

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.

@jeroenynt
Copy link

ianmorti

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

@jotamjr
Copy link

jotamjr commented Apr 14, 2024

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

aeburriel added a commit to aeburriel/qspectrumanalyzer that referenced this issue Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants