Commit daae3ce9 by Andreas Freise

### removing float conversion again, after Daniels fix of SIfloat

parent 2edab215
 ... ... @@ -117,7 +117,7 @@ def pd_phase(tmpkat): # function for root finding def PD_q_test(x): kat.PDrefl_q.phase1=float(x) kat.PDrefl_q.phase1=x out = kat.run() print('\r root finding: function value {0:<16g}'.format(float(out.y)), end='') sys.stdout.flush() ... ... @@ -180,7 +180,7 @@ def resonance(tmpkat): # function for root finding def carrier_resonance(x): kat.ETM.phi=float(x) kat.ETM.phi=x out = kat.run() phase = (out.y[0,0]-out.y[0,1]-90)%360-180.0 print('\r root finding: function value {0:<16g}'.format(float(phase)), end='') ... ...
 ... ... @@ -178,7 +178,7 @@ def asc_phases(tmpkat): kat.maxtem=1 def demod_phase1(x): kat.WFS1_I.phase1=float(x[0]) kat.WFS1_I.phase1=x[0] out = kat.run() signal = out["WFS1_I"] print('\r minimising: function value {0:<16g}'.format(float(signal)), end='') ... ... @@ -186,7 +186,7 @@ def asc_phases(tmpkat): return -1*abs(signal) def demod_phase2(x): kat.WFS2_I.phase1=float(x[0]) kat.WFS2_I.phase1=x[0] out = kat.run() signal = out["WFS2_I"] print('\r minimising: function value {0:<16g}'.format(float(signal)), end='') ... ... @@ -196,14 +196,14 @@ def asc_phases(tmpkat): kat.ITM.ybeta=1e-10 kat.ETM.ybeta=0.0 res = fmin(demod_phase1, [0.0], xtol=1e-8, disp=False) WFS1_phase = float(res[0]) WFS1_phase = res[0] print("") print(" WFS1 demod phase : %.10g deg" % WFS1_phase) kat.ITM.ybeta=0.0 kat.ETM.ybeta=-1e-10 res = fmin(demod_phase2, [0.0], xtol=1e-8, disp=False) WFS2_phase = float(res[0]) WFS2_phase = res[0] print("") print(" WFS2 demod phase : %.10g deg" % WFS2_phase) return(WFS1_phase, WFS2_phase) ... ...
 ... ... @@ -16,10 +16,10 @@ import copy import sys def set_thermal_lens(kat, f): kat.ITM_TL.f=float(f) kat.ITM_TL.f=f # if a bs-based cavity is used, we need to set second lens if "ITM_TL_r" in kat._kat__components: kat.ITM_TL_r.f=float(f) kat.ITM_TL_r.f=f return (kat) def main(): ... ... @@ -91,14 +91,14 @@ def main(): x1=0.70 x2=0.30 if "ITM_TL_r" in kat._kat__components: beam50 = beam_param(z=float(x1*beam1[1].z+x2*beam2[1].z), w0=float(x1*beam1[1].w0+x2*beam2[1].w0)) beam5 = beam_param(z=float(x1*beam1[1].z+x2*beam3[1].z), w0=float(x1*beam1[1].w0+x2*beam3[1].w0)) beam50 = beam_param(z=(x1*beam1[1].z+x2*beam2[1].z), w0=(x1*beam1[1].w0+x2*beam2[1].w0)) beam5 = beam_param(z=(x1*beam1[1].z+x2*beam3[1].z), w0=(x1*beam1[1].w0+x2*beam3[1].w0)) node_text = "at ITM->nITM1r" t_comp=kat.ITM t_node=kat.ITM.nITM1r else: beam50 = beam_param(z=float(x1*beam1[4].z+x2*beam2[4].z), w0=float(x1*beam1[4].w0+x2*beam2[4].w0)) beam5 = beam_param(z=float(x1*beam1[4].z+x2*beam3[4].z), w0=float(x1*beam1[4].w0+x2*beam3[4].w0)) beam50 = beam_param(z=(x1*beam1[4].z+x2*beam2[4].z), w0=(x1*beam1[4].w0+x2*beam2[4].w0)) beam5 = beam_param(z=(x1*beam1[4].z+x2*beam3[4].z), w0=(x1*beam1[4].w0+x2*beam3[4].w0)) node_text = "at s2->npo2" t_comp=kat.s2 t_node=kat.s2.npo2 ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!