Skip to content
Snippets Groups Projects
Commit 116c2d7a authored by Andreas Freise's avatar Andreas Freise
Browse files

fixing problem with m1/m2.

parent bd378f92
No related branches found
No related tags found
No related merge requests found
......@@ -230,17 +230,18 @@ 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,14 +103,16 @@ 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)
# 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):
......@@ -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":
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment