Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
finesse
pykat
Commits
116c2d7a
Commit
116c2d7a
authored
Dec 10, 2013
by
Andreas Freise
Browse files
fixing problem with m1/m2.
parent
bd378f92
Changes
2
Hide whitespace changes
Inline
Side-by-side
pykat/components.py
View file @
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
])
...
...
pykat/detectors.py
View file @
116c2d7a
...
...
@@ -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"
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment