Commit f1d5b3a8 authored by Andreas Freise's avatar Andreas Freise
Browse files

first version of gettext for pd.

parent 7141968c
......@@ -60,6 +60,9 @@ class photodiode(Detector):
def __setitem__(self, key, value):
list.__setitem__(self,key, SIfloat(value))
def append(self, value):
list.append(self,SIfloat(value))
### todo add append with SIfloat
class __Phi(list):
......@@ -83,6 +86,9 @@ class photodiode(Detector):
def __setitem__(self,key,value):
list.__setitem__(self,key, self.__convertValue(value))
def append(self, value):
list.append(self,self.__convertValue(value))
### todo add append with convertValue
......@@ -151,13 +157,18 @@ class photodiode(Detector):
#raise NotImplementedError("This function is not implemented")
def getFinesseText(self) :
print "a"
if self.enabled:
print "b"
rtn = []
__f_phi=range(len(self.f)+len(self.phi))
__f_phi[::2]=self.f
__f_phi[1::2]=self.phi
if self._alternate_beam:
rtn.append("pd {0} {1}".format(self.name, self.node.name))
rtn.append("pd{0}{1} {2} {3} {4}".format(self.sensype, self.num_demods, __f_phi, self.name, self.node.name))
else:
rtn.append("pd {0} {1}*".format(self.name, self.node.name))
rtn.append("pd{0}{1} {2} {3} {4}*".format(self.senstype, self.num_demods, __f_phi, self.name, self.node.name))
if self.noplot:
rtn.append("noplot {0}".format(self.name))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment