Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pykat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
finesse
pykat
Commits
f415451c
Commit
f415451c
authored
10 years ago
by
Andreas Freise
Browse files
Options
Downloads
Patches
Plain Diff
more fixes to asc_test example
parent
54f24c7b
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
examples/asc_test/master.py
+2
-1
2 additions, 1 deletion
examples/asc_test/master.py
examples/asc_test/master2.py
+4
-3
4 additions, 3 deletions
examples/asc_test/master2.py
examples/asc_test/master4.py
+8
-6
8 additions, 6 deletions
examples/asc_test/master4.py
with
14 additions
and
10 deletions
examples/asc_test/master.py
+
2
−
1
View file @
f415451c
...
...
@@ -100,8 +100,9 @@ def pd_signal(tmpkat):
"""
kat
.
parseKatCode
(
code1
)
kat
.
noxaxis
=
True
#global out
out
=
kat
.
run
()
print
"
Cavity power: {0:.6f}W
"
.
format
(
out
.
y
[
2
,
0
])
print
"
Cavity power: {0:.6f}W
"
.
format
(
out
.
y
[
0
,
2
])
return
(
out
.
y
[
0
,
0
],
out
.
y
[
0
,
1
])
def
pd_phase
(
tmpkat
):
...
...
This diff is collapsed.
Click to expand it.
examples/asc_test/master2.py
+
4
−
3
View file @
f415451c
...
...
@@ -280,17 +280,18 @@ def tilt(tmpkat):
def
compute_tilt
(
tmpkat
):
kat
=
copy
.
deepcopy
(
tmpkat
)
global
out
out
=
kat
.
run
()
# compute data x range in meters
beamsize
=
out
[
"
w0y
"
][
0
,
0
]
beamsize
=
out
[
"
w0y
"
][
0
]
xrange
=
beamsize
*
(
out
.
x
.
max
()
-
out
.
x
.
min
())
stepsize
=
xrange
/
(
len
(
out
.
x
)
-
1
)
print
"
Beamsize %e m
"
%
beamsize
print
"
Measurement range: %e m, stepszie: %e m
"
%
(
xrange
,
stepsize
)
# compute difference in angle between wavefront of carrier and sidebands
diff_l
=
(
out
[
"
PDrefl_low
"
]
[:,
1
]
-
out
[
"
PDrefl_car
"
]
[:,
1
]
)
/
stepsize
diff_u
=
(
out
[
"
PDrefl_up
"
]
[:,
1
]
-
out
[
"
PDrefl_car
"
]
[:,
1
]
)
/
stepsize
diff_l
=
(
out
[
"
PDrefl_low
"
]
-
out
[
"
PDrefl_car
"
])
/
stepsize
diff_u
=
(
out
[
"
PDrefl_up
"
]
-
out
[
"
PDrefl_car
"
])
/
stepsize
tilt_l
=
diff_l
[
1
:
-
1
]
-
diff_l
[
0
:
-
2
]
tilt_u
=
diff_u
[
1
:
-
1
]
-
diff_u
[
0
:
-
2
]
print
"
Tilt (upper - car), mean: %e m/deg, stddev %e m/deg
"
%
(
np
.
mean
(
tilt_u
),
np
.
std
(
tilt_u
))
...
...
This diff is collapsed.
Click to expand it.
examples/asc_test/master4.py
+
8
−
6
View file @
f415451c
...
...
@@ -187,11 +187,12 @@ def get_qs(tmpkat,f):
# add thermal lens and propagate input beam to ITM
kat
=
set_thermal_lens
(
kat
,
f
)
global
out
out
=
kat
.
run
(
printout
=
0
,
printerr
=
0
)
# computing beam size at ITM
# and then we reflect of ITM, an set it as new startnode
q_in
=
complex
(
out
[
'
w1
'
]
[
0
],
out
[
'
w1
'
][
1
])
q_in
=
out
[
'
w1
'
]
from
pykat.optics.ABCD
import
apply
,
mirror_refl
abcd
=
mirror_refl
(
1
,
-
2500
)
q_out
=
apply
(
abcd
,
q_in
,
1
,
1
)
...
...
@@ -207,13 +208,13 @@ def get_qs(tmpkat,f):
out
=
kat
.
run
(
printout
=
0
,
printerr
=
0
)
# computing beam size at WFS1 and WFS2
q2
=
complex
(
out
[
'
w2
'
]
[
0
],
out
[
'
w2
'
][
1
])
q2
=
out
[
'
w2
'
]
beam2
=
gauss_param
(
q
=
q2
)
q3
=
complex
(
out
[
'
w3
'
]
[
0
],
out
[
'
w3
'
][
1
])
q3
=
out
[
'
w3
'
]
beam3
=
gauss_param
(
q
=
q3
)
# computing beam size at pick off
q4
=
complex
(
out
[
'
w4
'
]
[
0
],
out
[
'
w4
'
][
1
])
q4
=
out
[
'
w4
'
]
beam4
=
gauss_param
(
q
=
q4
)
print
"
Input mode beam size with thermal lens f={0}
"
.
format
(
f
)
print
"
- ITM w={0:.6}cm (w0={1}, z={2})
"
.
format
(
100.0
*
beam1
.
w
,
beam1
.
w0
,
beam1
.
z
)
...
...
@@ -223,13 +224,14 @@ def get_qs(tmpkat,f):
#raw_input("Press enter to continue")
return
[
beam1
,
beam2
,
beam3
,
beam4
]
global
out
,
kat
print
""
.
join
(
kat
.
generateKatScript
())
# run finesse with input laser mode matched to cavity (no thermal lens)
out
=
kat
.
run
(
printout
=
0
,
printerr
=
0
)
# beam at laser when matched to cold cavity
# (note the sign flip of the real part to change direction of gauss param)
q0
=
complex
(
-
1.0
*
out
[
'
w0
'
]
[
0
],
out
[
'
w0
'
][
1
]
)
q0
=
-
1.0
*
out
[
'
w0
'
]
.
conjugate
(
)
beam0
=
gauss_param
(
q
=
q0
)
# compute beam sizes when tracing this beam back through the system
(
beam1
,
beam2
,
beam3
,
beam4
)
=
beam_size
(
kat
,
f
,
beam0
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment