From a2df42ad09b27685d51d974ab86a306276f43a72 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 29 Dec 2017 09:04:49 +0100 Subject: DPDCE: Add status option --- dpd/src/Adapt.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'dpd/src') 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 -- cgit v1.2.3