Commit f80f2693 authored by Andreas Freise's avatar Andreas Freise
Browse files

adapting example to new pd syntax.

parent 0ebac484
...@@ -60,8 +60,8 @@ def main(): ...@@ -60,8 +60,8 @@ def main():
scale 2 PDrefl_q scale 2 PDrefl_q
""" """
kat.parseKatCode(code_det) kat.parseKatCode(code_det)
kat.PDrefl_p.phi[0]=result['p_phase'] kat.PDrefl_p.phi1=result['p_phase']
kat.PDrefl_q.phi[0]=result['q_phase'] kat.PDrefl_q.phi1=result['q_phase']
print "--------------------------------------------------------" print "--------------------------------------------------------"
print " 4. adding a 0.1nm offset to ETM and compute PDH signal" print " 4. adding a 0.1nm offset to ETM and compute PDH signal"
...@@ -117,7 +117,7 @@ def pd_phase(tmpkat): ...@@ -117,7 +117,7 @@ def pd_phase(tmpkat):
# function for root finding # function for root finding
def PD_q_test(x): def PD_q_test(x):
kat.PDrefl_q.phi[0]=x kat.PDrefl_q.phi1=x
out = kat.run() out = kat.run()
print '\r root finding: function value %g ' % out.y, print '\r root finding: function value %g ' % out.y,
sys.stdout.flush() sys.stdout.flush()
......
...@@ -96,10 +96,10 @@ def main(): ...@@ -96,10 +96,10 @@ def main():
kat.parseKatCode(code_WFS2) kat.parseKatCode(code_WFS2)
(WFS1_phase, WFS2_phase) = asc_phases(kat) (WFS1_phase, WFS2_phase) = asc_phases(kat)
kat.WFS1_I.phi[0]=WFS1_phase kat.WFS1_I.phi1=WFS1_phase
kat.WFS1_Q.phi[0]=WFS1_phase+90.0 kat.WFS1_Q.phi1=WFS1_phase+90.0
kat.WFS2_I.phi[0]=WFS2_phase kat.WFS2_I.phi1=WFS2_phase
kat.WFS2_Q.phi[0]=WFS2_phase+90.0 kat.WFS2_Q.phi1=WFS2_phase+90.0
result['WFS1_phase']=WFS1_phase result['WFS1_phase']=WFS1_phase
result['WFS2_phase']=WFS2_phase result['WFS2_phase']=WFS2_phase
...@@ -178,7 +178,7 @@ def asc_phases(tmpkat): ...@@ -178,7 +178,7 @@ def asc_phases(tmpkat):
kat.maxtem=1 kat.maxtem=1
def demod_phase1(x): def demod_phase1(x):
kat.WFS1_I.phi[0]=x[0] kat.WFS1_I.phi1=x[0]
out = kat.run() out = kat.run()
signal = out["WFS1_I"] signal = out["WFS1_I"]
print '\r minimising: function value %g ' % signal , print '\r minimising: function value %g ' % signal ,
...@@ -186,7 +186,7 @@ def asc_phases(tmpkat): ...@@ -186,7 +186,7 @@ def asc_phases(tmpkat):
return -1*abs(signal) return -1*abs(signal)
def demod_phase2(x): def demod_phase2(x):
kat.WFS2_I.phi[0]=x[0] kat.WFS2_I.phi1=x[0]
out = kat.run() out = kat.run()
signal = out["WFS2_I"] signal = out["WFS2_I"]
print '\r minimising: function value %g ' % signal , print '\r minimising: function value %g ' % signal ,
......
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