From 70b921992764ca8988564001d49041bf2f5e1594 Mon Sep 17 00:00:00 2001 From: Michael Ossmann Date: Sun, 12 Feb 2017 15:03:05 -0700 Subject: [PATCH] Changed labels from dBm to dB. hackrf_sweep outputs dBFS, but rtl_power outputs dB with some weird offset. In no case would dBm be correct without a calibration option. The relative "dB" label should be acceptable for all cases. --- qspectrumanalyzer/plot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qspectrumanalyzer/plot.py b/qspectrumanalyzer/plot.py index e9fbd55..7b2c159 100644 --- a/qspectrumanalyzer/plot.py +++ b/qspectrumanalyzer/plot.py @@ -37,7 +37,7 @@ class SpectrumPlotWidget: self.posLabel = self.layout.addLabel(row=0, col=0, justify="right") self.plot = self.layout.addPlot(row=1, col=0) self.plot.showGrid(x=True, y=True) - self.plot.setLabel("left", "Power", units="dBm") + self.plot.setLabel("left", "Power", units="dB") self.plot.setLabel("bottom", "Frequency", units="Hz") self.plot.setLimits(xMin=0) self.plot.showButtons() @@ -204,7 +204,7 @@ class SpectrumPlotWidget: if self.plot.sceneBoundingRect().contains(pos): mousePoint = self.plot.vb.mapSceneToView(pos) self.posLabel.setText( - "f={:0.3f} MHz, P={:0.3f} dBm".format( + "f={:0.3f} MHz, P={:0.3f} dB".format( mousePoint.x() / 1e6, mousePoint.y() )