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
Sebastian Steinlechner
pykat
Commits
02c09c9e
Commit
02c09c9e
authored
10 years ago
by
Daniel Brown
Browse files
Options
Downloads
Patches
Plain Diff
adding zernike test file
parent
fc4b9be4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
bin/test_zernike.py
+55
-0
55 additions, 0 deletions
bin/test_zernike.py
with
55 additions
and
0 deletions
bin/test_zernike.py
0 → 100644
+
55
−
0
View file @
02c09c9e
import
numpy
as
np
from
pykat.utilities.maps
import
zernikemap
import
random
import
pykat
import
pylab
import
os
r
=
0.0125
size
=
np
.
array
([
200
,
200
])
pylab
.
figure
()
legends
=
[]
for
n
in
xrange
(
0
,
3
):
for
m
in
range
(
-
n
,
n
+
1
):
legends
.
append
(
"
%i,%i
"
%
(
m
,
n
))
zmap
=
zernikemap
(
'
dsad
'
,
size
,
2
*
r
/
size
,
2
*
r
,
1e-7
)
zmap
.
setZernike
(
m
,
n
,
10
)
zmap
.
type
=
'
phase reflection
'
zmap
.
write_map
(
"
zernike.map
"
)
kat
=
pykat
.
finesse
.
kat
()
kat
.
parseCommands
(
"""
l l1 1 0 n0
m m1 0.99 0.01 0 n0 n1
s s1 12 n1 n2
m m2 0.999 0.001 0 n2 n3
attr m1 Rc -20
attr m2 Rc 20
cav c1 m1 n1 m2 n2
pd refl n0
pd circ n1
pd tran n3
bp wz x w n2
trace 2
yaxis re:im
map m2 %s/zernike.map
maxtem 4
xaxis m2 phi lin -10 190 2000
"""
%
os
.
path
.
realpath
(
os
.
path
.
curdir
))
out
=
kat
.
run
(
printerr
=
1
)
print
out
[
"
wz
"
][
0
]
pylab
.
semilogy
(
out
.
x
,
out
[
"
tran
"
])
pylab
.
legend
(
legends
)
pylab
.
xlim
(
min
(
out
.
x
),
max
(
out
.
x
))
pylab
.
show
()
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