diff options
author | andreas128 <Andreas> | 2017-09-27 17:45:12 +0200 |
---|---|---|
committer | andreas128 <Andreas> | 2017-09-27 17:45:12 +0200 |
commit | 09a9dcf3f857e912c099806bece452bcf96722cb (patch) | |
tree | 55afe62780e66b629a170ac1a6e330c886d57cde /dpd/src/Adapt.py | |
parent | 5db7642424ddb5c6c304899efd4e8f74a8351a65 (diff) | |
download | dabmod-09a9dcf3f857e912c099806bece452bcf96722cb.tar.gz dabmod-09a9dcf3f857e912c099806bece452bcf96722cb.tar.bz2 dabmod-09a9dcf3f857e912c099806bece452bcf96722cb.zip |
Cleanup
Diffstat (limited to 'dpd/src/Adapt.py')
-rw-r--r-- | dpd/src/Adapt.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dpd/src/Adapt.py b/dpd/src/Adapt.py index 84b65f6..b17f059 100644 --- a/dpd/src/Adapt.py +++ b/dpd/src/Adapt.py @@ -137,7 +137,8 @@ class Adapt: def get_predistorter(self): """Load the coefficients from the file in the format given in the README, - return ("poly", [AM coef], [PM coef]) or ("lut", scalefactor, [LUT entries])""" + return ("poly", [AM coef], [PM coef]) or ("lut", scalefactor, [LUT entries]) + """ f = open(self.coef_path, 'r') lines = f.readlines() predistorter_format = int(lines[0]) @@ -155,7 +156,7 @@ class Adapt: else: raise ValueError( "Incorrect coef file format: too many coefficients in {}, should be {}, coefs are {}" - .format(path, n_coefs, coefs)) + .format(self.coef_path, n_coefs, coefs)) i += 1 f.close() return ("poly", coefs_am_out, coefs_pm_out) @@ -206,8 +207,7 @@ class Adapt: self.send_receive("set memlesspoly coeffile {}".format(self.coef_path)) def dump(self, path=None): - if path is None: - dt = datetime.datetime.now().isoformat() + dt = datetime.datetime.now().isoformat() path = logging_path + "/" + dt + "_adapt.pkl" d = { "txgain":self.get_txgain(), |