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

some more cleaning up.

parent e09afcea
from pykat import finesse from pykat import finesse
from pykat.commands import * from pykat.commands import *
#import pylab as pl
import copy import copy
import shelve import shelve
import sys import sys
...@@ -106,7 +105,6 @@ def pd_phase(tmpkat): ...@@ -106,7 +105,6 @@ def pd_phase(tmpkat):
code_det = """ code_det = """
pd1 PDrefl_q 9M 90 nWFS1 pd1 PDrefl_q 9M 90 nWFS1
%scale 2 PDrefl_q
""" """
kat.parseKatCode(code_det) kat.parseKatCode(code_det)
......
from pykat import finesse from pykat import finesse
from pykat.commands import * from pykat.commands import *
import pylab as pl import pylab as pl
...@@ -52,15 +51,16 @@ def main(): ...@@ -52,15 +51,16 @@ def main():
# overwriting some variables # overwriting some variables
kat.maxtem=3 kat.maxtem=3
Lambda=1064.0e-9 Lambda=1064.0e-9
print "--------------------------------------------------------"
print " 5. checking wavefronts for ITM/ETM tilt of 0.1nrad"
# this does not work yet due to the scale command # disable PDH photo diode as we won't need it for most of this
#kat.PDrefl_p.enabled = False kat.PDrefl_p.enabled = False
#kat.PDrefl_q.enabled = False kat.PDrefl_q.enabled = False
# simulating a tuned cavity
kat.ETM.phi=result['phi_tuned'] kat.ETM.phi=result['phi_tuned']
print "--------------------------------------------------------"
print " 5. checking wavefronts for ITM/ETM tilt of 0.1nrad"
tilt(kat) tilt(kat)
print "--------------------------------------------------------" print "--------------------------------------------------------"
...@@ -70,6 +70,9 @@ def main(): ...@@ -70,6 +70,9 @@ def main():
print "--------------------------------------------------------" print "--------------------------------------------------------"
print " 7. compute optimal demodulation phase of WFS1 and WFS2" print " 7. compute optimal demodulation phase of WFS1 and WFS2"
# adding wave front sensors to global kat object, will need them later
# on as well.
code_WFS1 = """ code_WFS1 = """
pd1 WFS1_I 9M 0 nWFS1 pd1 WFS1_I 9M 0 nWFS1
pdtype WFS1_I y-split pdtype WFS1_I y-split
...@@ -103,6 +106,10 @@ def main(): ...@@ -103,6 +106,10 @@ def main():
print "--------------------------------------------------------" print "--------------------------------------------------------"
print " Saving results in temp. files to be read by master3.py" print " Saving results in temp. files to be read by master3.py"
# re-enable PDH photo diode for savinf
kat.PDrefl_p.enabled = True
kat.PDrefl_q.enabled = True
tmpkatfile = "asc_base3.kat" tmpkatfile = "asc_base3.kat"
tmpresultfile = "myshelf2.dat" tmpresultfile = "myshelf2.dat"
print " kat object saved in: {0}".format(tmpkatfile) print " kat object saved in: {0}".format(tmpkatfile)
...@@ -128,6 +135,9 @@ def asc_signal(tmpkat): ...@@ -128,6 +135,9 @@ def asc_signal(tmpkat):
""" """
kat.parseKatCode(code_lock) kat.parseKatCode(code_lock)
# need to re-enable the photo diode for lock
kat.PDrefl_p.enabled = True
kat.parseKatCode('yaxis abs') kat.parseKatCode('yaxis abs')
kat.noxaxis = True kat.noxaxis = True
kat.maxtem=1 kat.maxtem=1
...@@ -313,8 +323,6 @@ def tilt(tmpkat): ...@@ -313,8 +323,6 @@ def tilt(tmpkat):
kat.parseKatCode(code_WFS1) kat.parseKatCode(code_WFS1)
kat.ITM.ybeta=1e-10 kat.ITM.ybeta=1e-10
kat.ETM.ybeta=0.0 kat.ETM.ybeta=0.0
#kstr=kat.generateKatScript()
#print kstr
(a1, a2) = compute_tilt(kat) (a1, a2) = compute_tilt(kat)
print " ETM ybeta -0.1nm" print " ETM ybeta -0.1nm"
......
from pykat import finesse from pykat import finesse
from pykat.commands import * from pykat.commands import *
import pylab as pl
import numpy as np import numpy as np
import shelve import shelve
import copy import copy
...@@ -49,7 +48,11 @@ def main(): ...@@ -49,7 +48,11 @@ def main():
result=tmpfile['result'] result=tmpfile['result']
tmpfile.close() tmpfile.close()
except: raise Exception("Could not open temprary results file {0}".format(tmpresultfile)) except: raise Exception("Could not open temprary results file {0}".format(tmpresultfile))
kat.PDrefl_q.enabled = False
kat.WFS1_Q.enables = False
kat.WFS2_Q.enables = False
print "--------------------------------------------------------" print "--------------------------------------------------------"
print " 9. ASC signals for large misalignments (ITM)" print " 9. ASC signals for large misalignments (ITM)"
asc_large(kat) asc_large(kat)
......
from pykat import finesse from pykat import finesse
from pykat.commands import * from pykat.commands import *
import pylab as pl
import numpy as np import numpy as np
import shelve import shelve
import copy import copy
...@@ -50,7 +49,11 @@ def main(): ...@@ -50,7 +49,11 @@ def main():
result=tmpfile['result'] result=tmpfile['result']
tmpfile.close() tmpfile.close()
except: raise Exception("Could not open temprary results file {0}".format(tmpresultfile)) except: raise Exception("Could not open temprary results file {0}".format(tmpresultfile))
kat.PDrefl_q.enabled = False
kat.WFS1_Q.enables = False
kat.WFS2_Q.enables = False
print "--------------------------------------------------------" print "--------------------------------------------------------"
print " 10. ASC signals for large misalignments (ETM)" print " 10. ASC signals for large misalignments (ETM)"
asc_large(kat) asc_large(kat)
...@@ -73,7 +76,6 @@ def asc_large(tmpkat): ...@@ -73,7 +76,6 @@ def asc_large(tmpkat):
#kat.verbose=1 #kat.verbose=1
xscale = 1e6 xscale = 1e6
yscale = 1e6 yscale = 1e6
global out
tmpfilename = "datashelf2.dat" tmpfilename = "datashelf2.dat"
backupname = "datashelf2.dat.bck" backupname = "datashelf2.dat.bck"
out={} out={}
......
Markdown is supported
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