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
finesse
pykat
Commits
58032632
Commit
58032632
authored
Jan 07, 2014
by
Andreas Freise
Browse files
some more cleaning up.
parent
e09afcea
Changes
4
Show whitespace changes
Inline
Side-by-side
examples/asc_test/master.py
View file @
58032632
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
)
...
...
examples/asc_test/master2.py
View file @
58032632
from
pykat
import
finesse
from
pykat
import
finesse
from
pykat.commands
import
*
from
pykat.commands
import
*
import
pylab
as
pl
import
pylab
as
pl
...
@@ -53,14 +52,15 @@ def main():
...
@@ -53,14 +52,15 @@ def main():
kat
.
maxtem
=
3
kat
.
maxtem
=
3
Lambda
=
1064.0e-9
Lambda
=
1064.0e-9
print
"--------------------------------------------------------"
# disable PDH photo diode as we won't need it for most of this
print
" 5. checking wavefronts for ITM/ETM tilt of 0.1nrad"
kat
.
PDrefl_p
.
enabled
=
False
kat
.
PDrefl_q
.
enabled
=
False
# this does not work yet due to the scale command
#kat.PDrefl_p.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"
...
...
examples/asc_test/master3.py
View file @
58032632
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,6 +49,10 @@ def main():
...
@@ -50,6 +49,10 @@ def main():
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
)
...
...
examples/asc_test/master4.py
View file @
58032632
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
...
@@ -51,6 +50,10 @@ def main():
...
@@ -51,6 +50,10 @@ def main():
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
=
{}
...
...
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