summaryrefslogtreecommitdiffstats
path: root/dpd
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-08-18 16:46:02 +0200
committerandreas128 <Andreas>2017-08-18 16:46:02 +0200
commit4f1956a30847f53c1638dfbe02595ad8ce640357 (patch)
tree649989d32c1009693b419e170af8549bb96238d8 /dpd
parent3802516eb13a985f68fb5157677e90b2dd87c837 (diff)
downloaddabmod-4f1956a30847f53c1638dfbe02595ad8ce640357.tar.gz
dabmod-4f1956a30847f53c1638dfbe02595ad8ce640357.tar.bz2
dabmod-4f1956a30847f53c1638dfbe02595ad8ce640357.zip
Add normalization in Measure.py
Diffstat (limited to 'dpd')
-rw-r--r--dpd/src/Measure.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/dpd/src/Measure.py b/dpd/src/Measure.py
index 49e2431..2662159 100644
--- a/dpd/src/Measure.py
+++ b/dpd/src/Measure.py
@@ -80,18 +80,21 @@ class Measure:
else:
rxframe = np.array([], dtype=np.complex64)
+ txframe = txframe / np.median(np.abs(txframe))
+ rxframe = rxframe / np.median(np.abs(rxframe))
+
if logging.getLogger().getEffectiveLevel() == logging.DEBUG:
txframe_path = ('/tmp/txframe_fft_' +
datetime.datetime.now().isoformat() +
'.pdf')
- plt.plot(np.abs(np.fft.fftshift(np.fft.fft(txframe[2048:]))))
+ plt.plot(np.abs(np.fft.fftshift(np.fft.fft(txframe[:self.samplerate]))))
plt.savefig(txframe_path)
plt.clf()
rxframe_path = ('/tmp/rxframe_fft_' +
datetime.datetime.now().isoformat() +
'.pdf')
- plt.plot(np.abs(np.fft.fftshift(np.fft.fft(rxframe[2048:]))))
+ plt.plot(np.abs(np.fft.fftshift(np.fft.fft(rxframe[:self.samplerate]))))
plt.savefig(rxframe_path)
plt.clf()