diff --git a/secop/modules.py b/secop/modules.py index 63d3aae..c5c26e2 100644 --- a/secop/modules.py +++ b/secop/modules.py @@ -305,6 +305,19 @@ class Module(HasProperties, metaclass=ModuleMeta): pass def registerCallbacks(self, modobj, autoupdate=()): + """register callbacks to another module + + - whenever a self. changes: + .update_ is called with the new value as argument. + If this method raises en exception, . gets into an error state. + If the method does not exist and is in autoupdate, + . is updated to self. + - whenever . gets into an error state: + .error_update_ is called with the exception as argument. + If this method raises an error, . gets into an error state. + If the method does not exist, and . gets into the same error state as self. + """ for pname in self.parameters: errfunc = getattr(modobj, 'error_update_' + pname, None) if errfunc: diff --git a/secop_psi/softcal.py b/secop_psi/softcal.py index 7b4e405..c45cd39 100644 --- a/secop_psi/softcal.py +++ b/secop_psi/softcal.py @@ -51,7 +51,7 @@ class StdParser: self.xdata, self.ydata = [], [] def parse(self, line): - """get numbers from a line and put them to self.output""" + """get numbers from a line and put them to self.xdata / self.ydata""" row = line.split() try: self.xdata.append(float(row[self.xcol]))