Commit 0b71b3a2 authored by Daniel Brown's avatar Daniel Brown
Browse files

Merge branch 'master' of gitmaster.atlas.aei.uni-hannover.de:pykat/pykat

parents d5ed2e10 116c2d7a
......@@ -229,18 +229,19 @@ class mirror(Component):
if values[0] != "m" and values[0] != "m1" and values[0] != "m2":
raise exceptions.RuntimeError("'{0}' not a valid Finesse mirror command".format(text))
values.pop(0) # remove initial value
if len(values) != 6:
if len(values) != 7:
raise exceptions.RuntimeError("Mirror Finesse code format incorrect '{0}'".format(text))
if len(values[0])==1:
values.pop(0) # remove initial value
return mirror(values[0], values[4], values[5], R=values[1], T=values[2], phi=values[3])
else:
if values[0][1]==1:
if values[0][1]=="1":
values.pop(0) # remove initial value
return mirror(values[0], values[4], values[5], R=1.0-SIfloat(values[1])-SIfloat(values[2]), T=values[1], phi=values[3])
else:
values.pop(0) # remove initial value
return mirror(values[0], values[4], values[5], R=values[1], T=1.0-SIfloat(values[1])-SIfloat(values[2]), phi=values[3])
......
......@@ -64,7 +64,6 @@ class photodiode(Detector):
def append(self, value):
list.append(self,SIfloat(value))
"""
### todo add append with SIfloat
class __Phi(list):
def __convertValue(self, value):
......@@ -90,8 +89,6 @@ class photodiode(Detector):
def append(self, value):
list.append(self,self.__convertValue(value))
"""
### todo add append with convertValue
@property
def f(self): return self.__f
......@@ -106,15 +103,17 @@ class photodiode(Detector):
raise NotImplementedError("pd with more than two demodulations not implemented yet")
self.num_demods = num_demods
self.senstype = senstype
# every second element into f (starting at 1)
self.__f = self.__F(demods[::2])
# Every second element into phi (starting at 2)
self.__phi = self.__Phi()
self.__phi = self.__Phi(demods[1::2])
"""
for i in demods[1::2]:
self.__phi.append(i)
"""
@staticmethod
def parseFinesseText(text):
values = text.split(" ")
......@@ -125,7 +124,6 @@ class photodiode(Detector):
__num_demods=0
__senstype=""
elif len(values[0])==3 or len(values[0])==4:
print len(values[0])
if values[0][2]=="S":
__senstype="S"
elif values[0][2]=="N":
......
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