aboutsummaryrefslogtreecommitdiffstats
path: root/tests/correlator/acproc.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/correlator/acproc.py')
-rwxr-xr-xtests/correlator/acproc.py57
1 files changed, 0 insertions, 57 deletions
diff --git a/tests/correlator/acproc.py b/tests/correlator/acproc.py
deleted file mode 100755
index e119520..0000000
--- a/tests/correlator/acproc.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/env python3
-
-import numpy as np
-import matplotlib.pyplot as plt
-import acgen
-
-# Parameters
-# samples per symbol
-sps = 4
-# number of initial bytes (to ignore)
-nzeros = 10
-# length of the access code in bytes
-aclen = 2
-
-# Create samples
-print("Modulating symbols")
-acgen.main()
-
-# Extract one sequence
-print("Extracting symbol sequence")
-
-# raw data
-data = np.fromfile("acgen.dat", dtype=np.complex64)
-plt.plot(data.real)
-plt.plot(data.imag)
-plt.title("Raw Data (time domain)")
-plt.show()
-
-# take only symbols
-symbols = data[1::sps]
-plt.plot(symbols.real, symbols.imag)
-plt.title("Symbols only (constellation)")
-plt.show()
-
-# where ac symbols start, in symbols
-ac_start = nzeros * 8
-ac_end = ac_start + aclen * 8
-
-ac = symbols[ac_start:ac_end]
-
-fig, (ax1, ax2) = plt.subplots(2, 1)
-fig.tight_layout()
-
-ax1.plot(ac.real, ac.imag)
-ax1.set_title("Symbols of Access Code (constellation)")
-
-ax2.plot(ac.real, ".-")
-ax2.plot(ac.imag, ".-")
-ax2.set_title("Symbols of Access Code (time)")
-plt.show()
-
-fir = list(np.conj(ac[::-1]))
-
-# print the symbols
-print(f"Generated {len(ac)} symbols from a {aclen} byte sequence")
-print("Reversed symbols (for FIR filter):")
-print(fir)