From 33a3c83dece3b0b4b95c6a884f934fd27de93d1e Mon Sep 17 00:00:00 2001 From: Daniel Brown <ddb@star.sr.bham.ac.uk> Date: Fri, 24 Apr 2015 23:51:01 +0100 Subject: [PATCH] small fixes --- pykat/components.py | 8 +++++--- pykat/finesse.py | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pykat/components.py b/pykat/components.py index de58e64..5ab8a26 100644 --- a/pykat/components.py +++ b/pykat/components.py @@ -1050,7 +1050,7 @@ class modulator(Component): self.__f = Param("f", self, SIfloat(f)) self.__midx = Param("midx", self, SIfloat(midx)) self.__phase = Param("phase", self, SIfloat(phase), canFsig=True, fsig_name="phase") - self.__order = order + self.__order = int(order) self.type = modulation_type self._default_fsig_param = self.__phase @@ -1071,13 +1071,15 @@ class modulator(Component): def phase(self, value): self.__phase.value = SIfloat(value) @property - def order(self): return self.__order + def order(self): return int(self.__order) @order.setter def order(self, value): + value = int(value) + if value <= 1 and value > 6: raise pkex.BasePyKatException("modulator order must be between 1 and 6") - self.__order = int(value) + self.__order = value @property def type(self): return self.__type diff --git a/pykat/finesse.py b/pykat/finesse.py index 8fe50ed..b1bb0c5 100644 --- a/pykat/finesse.py +++ b/pykat/finesse.py @@ -1224,9 +1224,9 @@ class kat(object): traceFiles = [file for file in os.listdir(path) if file.endswith(".trace") and file.startswith(base)] - print("Found %i trace files" % len(traceFiles)) - print(path) - print(traceFiles) + #print("Found %i trace files" % len(traceFiles)) + #print(path) + #print(traceFiles) if len(traceFiles) > 0: import fileinput @@ -1243,7 +1243,7 @@ class kat(object): a = line.split(':', 1) if a[0].isdigit(): - print("Found %s" % a[0]) + #print("Found %s" % a[0]) values = a[1].split() -- GitLab