Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sebastian Steinlechner
pykat
Commits
f80f2693
Commit
f80f2693
authored
Jan 31, 2014
by
Andreas Freise
Browse files
adapting example to new pd syntax.
parent
0ebac484
Changes
2
Hide whitespace changes
Inline
Side-by-side
examples/asc_test/master.py
View file @
f80f2693
...
...
@@ -60,8 +60,8 @@ def main():
scale 2 PDrefl_q
"""
kat
.
parseKatCode
(
code_det
)
kat
.
PDrefl_p
.
phi
[
0
]
=
result
[
'p_phase'
]
kat
.
PDrefl_q
.
phi
[
0
]
=
result
[
'q_phase'
]
kat
.
PDrefl_p
.
phi
1
=
result
[
'p_phase'
]
kat
.
PDrefl_q
.
phi
1
=
result
[
'q_phase'
]
print
"--------------------------------------------------------"
print
" 4. adding a 0.1nm offset to ETM and compute PDH signal"
...
...
@@ -117,7 +117,7 @@ def pd_phase(tmpkat):
# function for root finding
def
PD_q_test
(
x
):
kat
.
PDrefl_q
.
phi
[
0
]
=
x
kat
.
PDrefl_q
.
phi
1
=
x
out
=
kat
.
run
()
print
'
\r
root finding: function value %g '
%
out
.
y
,
sys
.
stdout
.
flush
()
...
...
examples/asc_test/master2.py
View file @
f80f2693
...
...
@@ -96,10 +96,10 @@ def main():
kat
.
parseKatCode
(
code_WFS2
)
(
WFS1_phase
,
WFS2_phase
)
=
asc_phases
(
kat
)
kat
.
WFS1_I
.
phi
[
0
]
=
WFS1_phase
kat
.
WFS1_Q
.
phi
[
0
]
=
WFS1_phase
+
90.0
kat
.
WFS2_I
.
phi
[
0
]
=
WFS2_phase
kat
.
WFS2_Q
.
phi
[
0
]
=
WFS2_phase
+
90.0
kat
.
WFS1_I
.
phi
1
=
WFS1_phase
kat
.
WFS1_Q
.
phi
1
=
WFS1_phase
+
90.0
kat
.
WFS2_I
.
phi
1
=
WFS2_phase
kat
.
WFS2_Q
.
phi
1
=
WFS2_phase
+
90.0
result
[
'WFS1_phase'
]
=
WFS1_phase
result
[
'WFS2_phase'
]
=
WFS2_phase
...
...
@@ -178,7 +178,7 @@ def asc_phases(tmpkat):
kat
.
maxtem
=
1
def
demod_phase1
(
x
):
kat
.
WFS1_I
.
phi
[
0
]
=
x
[
0
]
kat
.
WFS1_I
.
phi
1
=
x
[
0
]
out
=
kat
.
run
()
signal
=
out
[
"WFS1_I"
]
print
'
\r
minimising: function value %g '
%
signal
,
...
...
@@ -186,7 +186,7 @@ def asc_phases(tmpkat):
return
-
1
*
abs
(
signal
)
def
demod_phase2
(
x
):
kat
.
WFS2_I
.
phi
[
0
]
=
x
[
0
]
kat
.
WFS2_I
.
phi
1
=
x
[
0
]
out
=
kat
.
run
()
signal
=
out
[
"WFS2_I"
]
print
'
\r
minimising: function value %g '
%
signal
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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