From bc395ef1e3ec5ab3df17f6aa16b3ac0a39188a1e Mon Sep 17 00:00:00 2001 From: andreas128 Date: Fri, 11 Aug 2017 19:08:55 +0200 Subject: Fix correlation for complex signal --- dpd/src/Dab_Util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dpd/src/Dab_Util.py b/dpd/src/Dab_Util.py index 0da7343..aee66d2 100644 --- a/dpd/src/Dab_Util.py +++ b/dpd/src/Dab_Util.py @@ -27,7 +27,7 @@ class Dab_Util: sig_rec: The signal that has been recored """ off = sig_rec.shape[0] - c = signal.correlate(sig_orig, sig_rec) + c = np.abs(signal.correlate(sig_orig, sig_rec)) return np.argmax(c) - off + 1 def lag_upsampling(self, sig_orig, sig_rec, n_up): -- cgit v1.2.3