aboutsummaryrefslogtreecommitdiffstats
path: root/dpd
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-08-18 16:44:49 +0200
committerandreas128 <Andreas>2017-08-18 16:44:49 +0200
commit3802516eb13a985f68fb5157677e90b2dd87c837 (patch)
tree4b60a430bb51d8bdf8942027d28e145d8494d2c3 /dpd
parent9fa77f1cd8e0eda8229afc6e0ddffc4862c56554 (diff)
downloaddabmod-3802516eb13a985f68fb5157677e90b2dd87c837.tar.gz
dabmod-3802516eb13a985f68fb5157677e90b2dd87c837.tar.bz2
dabmod-3802516eb13a985f68fb5157677e90b2dd87c837.zip
Add logging for raw signal
Diffstat (limited to 'dpd')
-rw-r--r--dpd/src/Dab_Util.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/dpd/src/Dab_Util.py b/dpd/src/Dab_Util.py
index 974d4cf..e85d45d 100644
--- a/dpd/src/Dab_Util.py
+++ b/dpd/src/Dab_Util.py
@@ -86,6 +86,14 @@ class Dab_Util:
"""
Returns an aligned version of sig1 and sig2 by cropping and subsample alignment
"""
+
+ if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
+ dt = datetime.datetime.now().isoformat()
+ txframe_path = ('/tmp/tx_0_' + dt + '.iq')
+ sig1.tofile(txframe_path)
+ rxframe_path = ('/tmp/rx_0_' + dt + '.iq')
+ sig2.tofile(rxframe_path)
+
logging.debug("Sig1_orig: %d %s, Sig2_orig: %d %s" % (len(sig1), sig1.dtype, len(sig2), sig2.dtype))
off_meas = self.lag_upsampling(sig2, sig1, n_up=1)
off = int(abs(off_meas))
@@ -101,7 +109,20 @@ class Dab_Util:
sig1 = sig1[:-1]
sig2 = sig2[:-1]
+ if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
+ txframe_path = ('/tmp/tx_1_' + dt + '.iq')
+ sig1.tofile(txframe_path)
+ rxframe_path = ('/tmp/rx_1_' + dt + '.iq')
+ sig2.tofile(rxframe_path)
+
sig2 = sa.subsample_align(sig2, sig1)
+
+ if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
+ txframe_path = ('/tmp/tx_2_' + dt + '.iq')
+ sig1.tofile(txframe_path)
+ rxframe_path = ('/tmp/rx_2_' + dt + '.iq')
+ sig2.tofile(rxframe_path)
+
logging.debug("Sig1_cut: %d %s, Sig2_cut: %d %s, off: %d" % (len(sig1), sig1.dtype, len(sig2), sig2.dtype, off))
return sig1, sig2