diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-11-28 15:14:45 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2018-11-28 15:14:45 +0100 |
commit | d952405886dab44f12c1de53b57912b34320c7c8 (patch) | |
tree | 370b2dfea6f07a388ff78a5792ad63d2c155a7e3 /gui/dpd/__init__.py | |
parent | 8b42d3115db2ecec9031c5d1421463b0191e055c (diff) | |
download | dabmod-d952405886dab44f12c1de53b57912b34320c7c8.tar.gz dabmod-d952405886dab44f12c1de53b57912b34320c7c8.tar.bz2 dabmod-d952405886dab44f12c1de53b57912b34320c7c8.zip |
Get calibration to show nice numbers on web page
Diffstat (limited to 'gui/dpd/__init__.py')
-rw-r--r-- | gui/dpd/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/dpd/__init__.py b/gui/dpd/__init__.py index 85abe86..2c7649b 100644 --- a/gui/dpd/__init__.py +++ b/gui/dpd/__init__.py @@ -57,8 +57,8 @@ class DPD: def capture_calibration(self): tx_ts, tx_median, rx_ts, rx_median, coarse_offset, correlation_coefficient = self.capture.calibrate() result = {'status': "ok"} - result['tx_median'] = "{:.2}dB".format(20*np.log10(tx_median)) - result['rx_median'] = "{:.2}dB".format(20*np.log10(rx_median)) + result['tx_median'] = "{:.2f}dB".format(20*np.log10(tx_median)) + result['rx_median'] = "{:.2f}dB".format(20*np.log10(rx_median)) result['tx_ts'] = tx_ts result['rx_ts'] = rx_ts result['coarse_offset'] = int(coarse_offset) |