summaryrefslogtreecommitdiffstats
path: root/python/dpd/Model_Poly.py
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-18 16:53:56 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-12-18 16:53:56 +0100
commit9d2c85f7a2a23fcf9ce3c842d86227afed43a153 (patch)
treefe3961130d308212047381eb23a8d2b6e2065dfe /python/dpd/Model_Poly.py
parente83e1324a50055a4b972b78e26383df7ee290fee (diff)
downloaddabmod-9d2c85f7a2a23fcf9ce3c842d86227afed43a153.tar.gz
dabmod-9d2c85f7a2a23fcf9ce3c842d86227afed43a153.tar.bz2
dabmod-9d2c85f7a2a23fcf9ce3c842d86227afed43a153.zip
GUI: Automatically iterate captures and show model plots
Diffstat (limited to 'python/dpd/Model_Poly.py')
-rw-r--r--python/dpd/Model_Poly.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/python/dpd/Model_Poly.py b/python/dpd/Model_Poly.py
index c8f6135..ca39492 100644
--- a/python/dpd/Model_Poly.py
+++ b/python/dpd/Model_Poly.py
@@ -36,20 +36,20 @@ class Poly:
"""Calculates new coefficients using the measurement and the previous
coefficients"""
- def __init__(self,
- c,
- learning_rate_am=1.0,
- learning_rate_pm=1.0):
+ def __init__(self, c, learning_rate_am=1.0, learning_rate_pm=1.0):
self.c = c
- self.plot = c.MDL_plot
self.learning_rate_am = learning_rate_am
self.learning_rate_pm = learning_rate_pm
self.reset_coefs()
- self.model_am = Model_AM.Model_AM(c, plot=self.plot)
- self.model_pm = Model_PM.Model_PM(c, plot=self.plot)
+ self.model_am = Model_AM.Model_AM(c)
+ self.model_pm = Model_PM.Model_PM(c)
+
+ def plot(self, am_plot_location, pm_plot_location, title):
+ self.model_am.plot(am_plot_location, title)
+ self.model_pm.plot(pm_plot_location, title)
def reset_coefs(self):
self.coefs_am = np.zeros(5, dtype=np.float32)