summaryrefslogtreecommitdiff
path: root/gr-uhd/apps/uhd_fft
Commit message (Collapse)AuthorAgeFilesLines
* uhd: pep8 formattingJosh Morman2021-11-241-61/+95
| | | | Signed-off-by: Josh Morman <jmorman@gnuradio.org>
* qtgui: Replace pyqwidget() with qwidget()David Winter2021-09-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Previously, two versions of the `qtwidget` functions existed, `qwidget()` and `pyqwidget()`, with the only difference being that `qwidget()` returned a pointer to the `QWidget` object managed by the corresponding block, while `pyqwidget()` returned that same pointer, but as an integer (Or `PyLong` in this case). While `qwidget()` is used by C++ code accessing the widgets, `pyqwidget()` is only used for the python interface. This makes these two methods redundant, thus this commit entirely removes `pyqwidget()`, and modifies the `qwidget()` python wrapper to behave like `pyqwidget()`. Note that we can be fairly confident that this change will not effect potential users of `qwidget()`, because any invocation on the objects previously returned by `qwidget()` would cause a segmentation fault. This commit also fixes a memory leak: Internally, the `pyqwidget()` functions were returning a PyLong `PyObject *`, which was then upwrapped in a pybind trampoline without decrementing the reference count of that python object. Signed-off-by: David Winter <david.winter@analog.com>
* uhd: Fix phase relations plot (Qt issue)Martin Braun2021-03-161-1/+2
| | | | | | | The phase-relations plot didn't specify a handle for the Qt parent, which used to be OK (it would default to None) but no longer is. Signed-off-by: Martin Braun <martin@gnuradio.org>
* uhd: Fix Qt apps (XInitThreads call order, terminate handling)Martin Braun2021-03-161-22/+32
| | | | | | | | | | | | uhd_fft and uhd_siggen_gui are standalone apps that, a long time ago, were spun off from GRC apps. In the last years, there were some fixes to Qt apps that haven't yet made it into these two UHD apps: - 0cc238fb: Better terminate handling - 40f5e6cd: XInitThreads() as early as possible. This was accidentally moved downwards as part of refactoring in 77871a9b. Signed-off-by: Martin Braun <martin.braun@ettus.com>
* fft: update window python enums to fft.window.*Josh Morman2020-12-171-2/+2
| | | | Signed-off-by: Josh Morman <jmorman@perspectalabs.com>
* uhd: uhd_fft: Add support for --power argumentMartin Braun2020-09-101-8/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | This enables absolute power support for uhd_fft. For example: uhd_fft --power -20 --args [...] will run uhd_fft with all the usual settings, but will set the gain such that the reference power level is -20 dBm. The y-axis will be labeled differently ("RX Power Level (dBm)") and the gain slider will be replaced by a power reference level slider. Reading the actual received power from the display requires some DSP knowledge. First, the choice of window will move energy into sidelobes, and of course, scalloping loss plays a role. By choosing a boxcar window, and moving the signal close to the center of a bin, it is possible to measure the power of a single tone, assuming the USRP has been previously calibrated. A more accurate y-label would be "dBm per FFT bin after FFT processing" but that is considered a bit unwieldy. The y-axis scaling is achieved by throwing in a multiplier that moves a full-scale signal to the corresponding power value, and using the recently introduced features to normalize windows. That means scaling the reference power will be visible in the scope plot, but not in the FFT plot unless the signal starts to clip.
* uhd: Update uhd_siggen_gui to allow setting absolute powerMartin Braun2020-09-101-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Note: This requires a USRP with power API enabled. Summary of changes: - uhd_app now provides the --power argument and applies it as a reference power level. It clashes with --gain. UHDApp now has two 'modes' for setting the power: Via gain (the previous, standard way) or by setting a power. UHDApp calls all the right APIs for each use case. - uhd_siggen_base is now aware of these settings and will make sure the output power is correct by combining the requested power and the requested amplitude (meaning, it sets a ref power that is at the correct level above the requested power level). - The GUI can now set either power or gain, depending on command line arguments. When changing the amplitude in power mode, the ref power is also changed so the output power (in dBm) stays the same when the amplitude changes. - siggen now checks for invalid amplitudes (must be in 0 <= amplitude <= 1). - --amplitude was moved from uhd_app.py to uhd_siggen_base.py, where it belongs. uhd_fft for example does not have that argument. - If --amplitude is set to 0.0, then it now fails in power mode. It's still possible in gain mode.
* uhd: uhd_fft: Clean up Python, fix PyLint warningsMartin Braun2020-08-181-116/+147
| | | | | | | | | | | This in preparation for future modifications of uhd_fft (and easier review thereof). This is mostly: - Whitespace cleanup - Removal of dead code - Breaking of long lines PyLint is much happier and can provide more useful warnings. No functional changes.
* python: Remove unnecessary 'from __future__ import'Oleksandr Kravchuk2020-08-031-2/+0
| | | | | | | | | | | | | | | | All of the removed `from __future__ import` were needed in older versions of Python (mostly 2.5.x and below) but later became mandatory in most versions of Python 3 hence are not necessary anymore. More specifically, according to __future__.py[1]: - unicode_literals is part of Python since versions 2.6.0 and 3.0.0; - print_function is part of Python since versions 2.6.0 and 3.0.0; - absolute_import is part of Python since versions 2.5.0 and 3.0.0; - division is part of Python since versions 2.2.0 and 3.0.0; Get rid of those unnecessary imports to slightly clean up the codebase. [1] https://github.com/python/cpython/blob/master/Lib/__future__.py
* uhd: fix pybind11 bindingsJosh Morman2020-06-101-4/+7
| | | | | | | | | Instead of relying on the pyuhd pybind11 bindings, create new gr::uhd pybind11 bindings that wrap the underlying types. Trying to use the pyuhd bindings directly has many issues Also, push some of the overloading into the constructors as opposed to in the __init__ functions with constructor interception
* uhd: Change import order for sip and Qt modulesMartin Braun2020-05-101-2/+1
| | | | | | This moves the `import sip` statements in uhd_fft and uhd_siggen_gui below the import for Qt, without which import errors can occur on platforms such as Fedora 31.
* Update license header to SPDX formatdevnulling2020-01-271-13/+1
|
* Disable Python 2kMarcus Müller2020-01-041-1/+1
| | | | | | | | | | - Update SWIG settings - Update CMake - Remove Python2 references Note: This does not touch a lot of Python files, and many Python files will still work with Python 2 after this commit. However, we won't allow that in our CMake, and the support will be gone too.
* Python 3 fixesClayton Smith2019-10-191-4/+5
|
* uhd: Skip restoreGeometry() when no previous settings existMartin Braun2019-08-051-1/+3
| | | | | | There are cases when the Qt-based apps in gr-uhd would crash because Qt would try and load previous geometry settings which didn't exist. This disables applying previous geometry if the setting is empty.
* gr-uhd: fixed argparse note for uhd_fft --update-rateMarc L2019-06-151-1/+1
| | | --update-rate is really a period, not a rate, from what I can tell. Instead of changing the variable name, I just edited the argparse note to mention that the units are in seconds.
* uhd: Fix UHD apps to use Qt5Martin Braun2018-11-151-8/+11
| | | | Qt4 no longer supported.
* uhd: Fix Python issuesMartin Braun2018-11-151-2/+2
| | | | | - Import order for uhd_fft - Convert iterators to lists
* uhd: Fix call to enable_tags(), use 0 instead of -1 as defaultMarc L2018-10-231-2/+2
| | | | | 1f857d3 changed variable "which" to be unsigned, so the default can't be -1.
* gr-uhd: uhd_fft allows double clicking waterfall plot to re-tuneMarc Lichtman2018-10-231-0/+6
|
* python: Py3k compatAndrej Rode2018-06-231-4/+4
|
* Merge branch 'maint'Johnathan Corgan2017-06-071-2/+8
|\
| * uhd: uhd_fft can now handle the case where the gain range is scalarMartin Braun2017-06-061-2/+8
| |
* | uhd_fft: Added abs(lo_offset) correction to set_bandwidth command so we dont ↵ejk2017-02-201-2/+3
|/ | | | filter out signal of interest
* gr-uhd: channel numbers are resolved in usrp_block, work with indices in uhd_appAndrej Rode2016-12-071-12/+12
|
* uhd: uhd_fft can now optionally plot relative phase between adjacent channelsMartin Braun2016-07-181-6/+52
|
* uhd: Fixed some uhd_fft issuesMartin Braun2015-10-191-15/+15
| | | | | - --help didn't work - Some tuning corner cases weren't properly handled
* uhd: uhd_fft now uses UHDApp, some bugfixesMartin Braun2015-09-281-281/+163
| | | | | - UHDApp would not accept new frequencies after startup - uhd_fft now has multi-channel capabiltities
* apps: removed title and legend from uhd_fft for more viewing space.Tom Rondeau2015-08-051-9/+6
|
* uhd: Updated uhd_fft example + app (moved to QT)Martin Braun2015-06-221-289/+511
|
* Removing trailing/extra whitespaces before release.Tom Rondeau2014-07-071-1/+1
| | | | We should be more careful about letting these into the code in the future. In emacs, we can use (add-hook 'before-save-hook 'delete-trailing-whitespace).
* uhd: extended uhd::dict to be able to be used like a Python dictionaryNicholas Corgan2013-09-231-4/+4
| | | | | * Both dict["key"] and dict.get("key") syntax work * Updated uhd_fft, uhd_rx_cfile, and uhd_siggen_base.py to use new syntax
* uhd: add top-level exception reporting to uhd_fftJaroslav Škarvada2013-09-071-2/+7
|
* uhd: if B2X0 is connected, change USRP config info strings to account for ↵Nicholas Corgan2013-08-161-1/+4
| | | | lack of daughterboard
* uhd: removed some debugging stuff that snuck into commit c856fe010.Tom Rondeau2013-03-201-4/+0
|
* wxgui: Moved oscope and histogram bases into wxgui.Tom Rondeau2013-03-181-0/+4
| | | | This makes gr-wxgui more like a normal component that generates a libgnuradio-wxgui.so file.
* uhd: added click to change freqMike Jameson2013-02-111-0/+4
|
* gr-uhd: uhd_fft and uhd_siggen_base.py now use subdev names instead of ↵Nicholas Corgan2012-04-231-3/+3
| | | | dboard id's
* Removed whitespace and added dtools/bin/remove-whitespace as a tool to do ↵Tom Rondeau2012-04-131-23/+23
| | | | | | this in the future. The sed script was provided by Moritz Fischer.
* Merge branch 'master' into nextJohnathan Corgan2012-04-051-4/+13
|
* Merge remote branch 'tom/cmake_builds' into nextJohnathan Corgan2012-04-041-1/+25
|
* build: removed .py extensions from uhd and shd installed Python programs.Tom Rondeau2012-04-021-0/+303