diff --git a/pykat/components.py b/pykat/components.py index d8b01e50fb2eef308f32f638eb4fb9fec20dd20b..1d3506ccfa523d91e76f4f4b838941c6710086c5 100644 --- a/pykat/components.py +++ b/pykat/components.py @@ -125,12 +125,12 @@ class Component(object): """Parses Finesse syntax""" raise NotImplementedError("This function is not implemented") - @staticmethod @abc.abstractmethod def getFinesseText(self): """ Base class for individual Finesse optical components """ raise NotImplementedError("This function is not implemented") + @abc.abstractmethod def getQGraphicsItem(self): return None @@ -272,7 +272,7 @@ class mirror(AbstractMirrorComponent): self.name, self.R, self.T, self.phi, self.nodes[0].name, self.nodes[1].name)) - rtn.append(super(mirror, self).getAttributeText()) + rtn.extend(super(mirror, self).getAttributeText()) return rtn diff --git a/pykat/finesse.py b/pykat/finesse.py index 1ab236133c5d841001be2a4eb2f16649cd467676..2301c603103bbeccc6b504f6642a8d177340a86e 100644 --- a/pykat/finesse.py +++ b/pykat/finesse.py @@ -446,7 +446,8 @@ class kat(object): if txt != None: if isinstance(txt,list): - for t in txt: out.append(t + "\n") + for t in txt: + out.append(t + "\n") else: out.append(txt + "\n") diff --git a/pykat/utilities/optics/gaussian_beams.py b/pykat/utilities/optics/gaussian_beams.py index f0e9f9586c5bf41de9a3bf25a3dc184f8f7063dc..93dd035cdf4b765b7afd7ff73d47712299c28836 100644 --- a/pykat/utilities/optics/gaussian_beams.py +++ b/pykat/utilities/optics/gaussian_beams.py @@ -131,4 +131,14 @@ class gauss_param(object): return gauss_param(self.__lambda, self.__nr, -self.__q) def __eq__(self, q): - return complex(q) == self.__q \ No newline at end of file + return complex(q) == self.__q + + @property + def real(self): return self.__q.real + @real.setter + def real(self, value): self.__q.real = SIfloat(value) + + @property + def imag(self): return self.__q.imag + @imag.setter + def imag(self, value): self.__q.imag = SIfloat(value) \ No newline at end of file