From 1890439e8786feaaf4fa6612289812984a0c75e9 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Wed, 9 May 2018 17:22:39 +0200 Subject: DPDCE: fix linalg.lstsq warning --- dpd/src/Measure.py | 4 +--- dpd/src/Model_AM.py | 2 +- dpd/src/Model_PM.py | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'dpd') 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) -- cgit v1.2.3