aboutsummaryrefslogtreecommitdiffstats
path: root/dpd
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-05-09 17:22:39 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-05-09 17:22:39 +0200
commit1890439e8786feaaf4fa6612289812984a0c75e9 (patch)
tree574e41f93eae237a7b727e2358e3ce0e66f7899e /dpd
parent277f4d4999b30cfc858c30bcb029a9c224b21806 (diff)
downloaddabmod-1890439e8786feaaf4fa6612289812984a0c75e9.tar.gz
dabmod-1890439e8786feaaf4fa6612289812984a0c75e9.tar.bz2
dabmod-1890439e8786feaaf4fa6612289812984a0c75e9.zip
DPDCE: fix linalg.lstsq warning
Diffstat (limited to 'dpd')
-rw-r--r--dpd/src/Measure.py4
-rw-r--r--dpd/src/Model_AM.py2
-rw-r--r--dpd/src/Model_PM.py2
3 files changed, 3 insertions, 5 deletions
diff --git a/dpd/src/Measure.py b/dpd/src/Measure.py
index b7423c6..6d8007d 100644
--- a/dpd/src/Measure.py
+++ b/dpd/src/Measure.py
@@ -94,9 +94,7 @@ class Measure:
def get_samples(self):
"""Connect to ODR-DabMod, retrieve TX and RX samples, load
into numpy arrays, and return a tuple
- (tx_timestamp, tx_samples, rx_timestamp, rx_samples)
- where the timestamps are doubles, and the samples are numpy
- arrays of complex floats, both having the same size
+ (txframe_aligned, tx_ts, rxframe_aligned, rx_ts, rx_median)
"""
txframe, tx_ts, rxframe, rx_ts = self.receive_tcp()
diff --git a/dpd/src/Model_AM.py b/dpd/src/Model_AM.py
index 9800d83..75b226f 100644
--- a/dpd/src/Model_AM.py
+++ b/dpd/src/Model_AM.py
@@ -29,7 +29,7 @@ def poly(sig):
def fit_poly(tx_abs, rx_abs):
- return np.linalg.lstsq(poly(rx_abs), tx_abs)[0]
+ return np.linalg.lstsq(poly(rx_abs), tx_abs, rcond=None)[0]
def calc_line(coefs, min_amp, max_amp):
diff --git a/dpd/src/Model_PM.py b/dpd/src/Model_PM.py
index 3aafea0..7b80bf3 100644
--- a/dpd/src/Model_PM.py
+++ b/dpd/src/Model_PM.py
@@ -81,7 +81,7 @@ class Model_PM:
return np.array([sig ** i for i in range(0, 5)]).T
def fit_poly(self, tx_abs, phase_diff):
- return np.linalg.lstsq(self.poly(tx_abs), phase_diff)[0]
+ return np.linalg.lstsq(self.poly(tx_abs), phase_diff, rcond=None)[0]
def calc_line(self, coefs, min_amp, max_amp):
tx_range = np.linspace(min_amp, max_amp)