aboutsummaryrefslogtreecommitdiffstats
path: root/dpd/main.py
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-09-18 13:16:06 +0200
committerandreas128 <Andreas>2017-09-18 13:16:15 +0200
commit9551c8adb5c909e2072b4fad6f9ebdc4c93c848a (patch)
treef3f1bb7c02b7abece64676a5caa65b7e8b21ae6b /dpd/main.py
parentbf608feeb2b7819b1bff5b1880af6c4903e847e5 (diff)
downloaddabmod-9551c8adb5c909e2072b4fad6f9ebdc4c93c848a.tar.gz
dabmod-9551c8adb5c909e2072b4fad6f9ebdc4c93c848a.tar.bz2
dabmod-9551c8adb5c909e2072b4fad6f9ebdc4c93c848a.zip
Add Measure_Shoulders
Diffstat (limited to 'dpd/main.py')
-rwxr-xr-xdpd/main.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/dpd/main.py b/dpd/main.py
index b4355c3..ee75146 100755
--- a/dpd/main.py
+++ b/dpd/main.py
@@ -49,6 +49,7 @@ import src.TX_Agc as TX_Agc
import src.Symbol_align
import src.const
import src.MER
+import src.Measure_Shoulders
import argparse
parser = argparse.ArgumentParser(
@@ -65,7 +66,7 @@ parser.add_argument('--samplerate', default=8192000, type=int,
parser.add_argument('--coefs', default='poly.coef',
help='File with DPD coefficients, which will be read by ODR-DabMod',
required=False)
-parser.add_argument('--txgain', default=73,
+parser.add_argument('--txgain', default=70,
help='TX Gain',
required=False,
type=int)
@@ -99,9 +100,10 @@ num_req = cli_args.samps
samplerate = cli_args.samplerate
num_iter = cli_args.iterations
+c = src.const.const(samplerate)
SA = src.Symbol_align.Symbol_align(samplerate)
MER = src.MER.MER(samplerate)
-c = src.const.const(samplerate)
+MS = src.Measure_Shoulders.Measure_Shoulder(c, plot=True)
meas = Measure.Measure(samplerate, port, num_req)
extStat = ExtractStatistic.ExtractStatistic(c, plot=True)
@@ -195,9 +197,12 @@ while i < num_iter:
rx_gain = adapt.get_rxgain()
digital_gain = adapt.get_digital_gain()
tx_median = np.median(np.abs(txframe_aligned))
+ rx_shoulders = MS.average_shoulders(rxframe_aligned)
+ tx_shoulders = MS.average_shoulders(txframe_aligned)
logging.info(list((name, eval(name)) for name in
- ['i', 'tx_mer', 'rx_mer', 'mse', 'tx_gain',
+ ['i', 'tx_mer', 'tx_shoulders', 'rx_mer',
+ 'rx_shoulders', 'mse', 'tx_gain',
'digital_gain', 'rx_gain', 'rx_median',
'tx_median']))
if dpddata[0] == "poly":