diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-12-29 09:04:49 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-12-29 09:04:49 +0100 |
commit | a2df42ad09b27685d51d974ab86a306276f43a72 (patch) | |
tree | 282a4d484aeae96214c34be5060646af2077decb /dpd/src | |
parent | 1a3ae6085967be4cd76cabb2a630a04464f38748 (diff) | |
download | dabmod-a2df42ad09b27685d51d974ab86a306276f43a72.tar.gz dabmod-a2df42ad09b27685d51d974ab86a306276f43a72.tar.bz2 dabmod-a2df42ad09b27685d51d974ab86a306276f43a72.zip |
DPDCE: Add status option
Diffstat (limited to 'dpd/src')
-rw-r--r-- | dpd/src/Adapt.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/dpd/src/Adapt.py b/dpd/src/Adapt.py index 153442b..53ef037 100644 --- a/dpd/src/Adapt.py +++ b/dpd/src/Adapt.py @@ -42,6 +42,19 @@ def _write_lut_file(scalefactor, lut, path): f.write("{}\n{}\n".format(coef.real, coef.imag)) f.close() +def dpddata_to_str(dpddata): + if dpddata[0] == "poly": + coefs_am = dpddata[1] + coefs_pm = dpddata[2] + return "dpd_coefs_am {}, dpd_coefs_pm {}".format( + self.coefs_am, self.coefs_pm) + elif dpddata[0] == "lut": + scalefactor = dpddata[1] + lut = dpddata[2] + return "LUT scalefactor {}, LUT {}".format( + scalefactor, lut) + else: + raise ValueError("Unknown dpddata type {}".format(dpddata[0])) class Adapt: """Uses the ZMQ remote control to change parameters of the DabMod |