Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
finesse
pykat
Commits
116c2d7a
Commit
116c2d7a
authored
11 years ago
by
Andreas Freise
Browse files
Options
Downloads
Patches
Plain Diff
fixing problem with m1/m2.
parent
bd378f92
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
pykat/components.py
+5
-4
5 additions, 4 deletions
pykat/components.py
pykat/detectors.py
+5
-7
5 additions, 7 deletions
pykat/detectors.py
with
10 additions
and
11 deletions
pykat/components.py
+
5
−
4
View file @
116c2d7a
...
...
@@ -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
])
...
...
This diff is collapsed.
Click to expand it.
pykat/detectors.py
+
5
−
7
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,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
"
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment