aboutsummaryrefslogtreecommitdiffstats
path: root/dpd
diff options
context:
space:
mode:
authorandreas128 <Andreas>2017-09-14 12:09:38 +0200
committerandreas128 <Andreas>2017-09-14 12:09:38 +0200
commite7e7e81730961bba6c8910c21f34616a7548afcb (patch)
tree639184f23bbd83912ab09aa9a64af94aa78f77a8 /dpd
parent4193a475bbdd034d86e2b14ea97300cc999bd994 (diff)
downloaddabmod-e7e7e81730961bba6c8910c21f34616a7548afcb.tar.gz
dabmod-e7e7e81730961bba6c8910c21f34616a7548afcb.tar.bz2
dabmod-e7e7e81730961bba6c8910c21f34616a7548afcb.zip
Simplify argparse
Diffstat (limited to 'dpd')
-rwxr-xr-xdpd/main.py10
-rw-r--r--dpd/src/Model_Poly.py0
2 files changed, 5 insertions, 5 deletions
diff --git a/dpd/main.py b/dpd/main.py
index 320c291..e17cd5a 100755
--- a/dpd/main.py
+++ b/dpd/main.py
@@ -55,13 +55,13 @@ import argparse
parser = argparse.ArgumentParser(
description="DPD Computation Engine for ODR-DabMod")
-parser.add_argument('--port', default='50055',
+parser.add_argument('--port', default=50055, type=int,
help='port of DPD server to connect to (default: 50055)',
required=False)
-parser.add_argument('--rc-port', default='9400',
+parser.add_argument('--rc-port', default=9400, type=int,
help='port of ODR-DabMod ZMQ Remote Control to connect to (default: 9400)',
required=False)
-parser.add_argument('--samplerate', default='8192000',
+parser.add_argument('--samplerate', default=8192000, type=int,
help='Sample rate',
required=False)
parser.add_argument('--coefs', default='poly.coef',
@@ -79,10 +79,10 @@ parser.add_argument('--digital_gain', default=1,
help='Digital Gain',
required=False,
type=float)
-parser.add_argument('--samps', default='81920',
+parser.add_argument('--samps', default='81920', type=int,
help='Number of samples to request from ODR-DabMod',
required=False)
-parser.add_argument('-i', '--iterations', default='1',
+parser.add_argument('-i', '--iterations', default=1, type=int,
help='Number of iterations to run',
required=False)
parser.add_argument('-l', '--load-poly',
diff --git a/dpd/src/Model_Poly.py b/dpd/src/Model_Poly.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/dpd/src/Model_Poly.py