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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
finesse
pykat
Commits
ec16c34e
Commit
ec16c34e
authored
10 years ago
by
Daniel Brown
Browse files
Options
Downloads
Patches
Plain Diff
adding zernike maps
parent
f4cdb2c1
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
pykat/detectors.py
+1
-1
1 addition, 1 deletion
pykat/detectors.py
pykat/finesse.py
+1
-1
1 addition, 1 deletion
pykat/finesse.py
pykat/utilities/maps.py
+35
-4
35 additions, 4 deletions
pykat/utilities/maps.py
with
37 additions
and
6 deletions
pykat/detectors.py
+
1
−
1
View file @
ec16c34e
...
@@ -5,7 +5,7 @@ Created on Fri Feb 01 0split()9:09:10 2013
...
@@ -5,7 +5,7 @@ Created on Fri Feb 01 0split()9:09:10 2013
@author: Daniel
@author: Daniel
"""
"""
import
exceptions
import
exceptions
from
pykat.utils
import
*
import
abc
from
pykat.node_network
import
*
from
pykat.node_network
import
*
from
pykat.param
import
Param
from
pykat.param
import
Param
...
...
This diff is collapsed.
Click to expand it.
pykat/finesse.py
+
1
−
1
View file @
ec16c34e
This diff is collapsed.
Click to expand it.
pykat/utilities/maps.py
+
35
−
4
View file @
ec16c34e
...
@@ -2,7 +2,7 @@ from pykat.utilities.romhom import makeReducedBasis, makeEmpiricalInterpolant, m
...
@@ -2,7 +2,7 @@ from pykat.utilities.romhom import makeReducedBasis, makeEmpiricalInterpolant, m
from
scipy.interpolate
import
interp2d
from
scipy.interpolate
import
interp2d
import
numpy
as
np
import
numpy
as
np
import
math
import
math
from
pykat.utilities.zernike
import
*
class
surfacemap
(
object
):
class
surfacemap
(
object
):
def
__init__
(
self
,
name
,
maptype
,
size
,
center
,
step_size
,
scaling
,
data
=
None
):
def
__init__
(
self
,
name
,
maptype
,
size
,
center
,
step_size
,
scaling
,
data
=
None
):
...
@@ -292,6 +292,37 @@ class tiltmap(surfacemap):
...
@@ -292,6 +292,37 @@ class tiltmap(surfacemap):
self
.
data
=
(
xx
*
self
.
tilt
[
1
]
+
yy
*
self
.
tilt
[
0
])
/
self
.
scaling
self
.
data
=
(
xx
*
self
.
tilt
[
1
]
+
yy
*
self
.
tilt
[
0
])
/
self
.
scaling
class
zernikemap
(
surfacemap
):
def
__init__
(
self
,
name
,
size
,
step_size
,
radius
,
scaling
=
1e-9
):
surfacemap
.
__init__
(
self
,
name
,
"
phase
"
,
size
,
(
np
.
array
(
size
)
+
1
)
/
2.0
,
step_size
,
scaling
)
self
.
__zernikes
=
{}
self
.
radius
=
radius
@property
def
radius
(
self
):
return
self
.
__radius
@radius.setter
def
radius
(
self
,
value
,
update
=
True
):
self
.
__radius
=
float
(
value
)
if
update
:
self
.
update_data
()
def
setZernike
(
self
,
m
,
n
,
amplitude
,
update
=
True
):
self
.
__zernikes
[
"
%i%i
"
%
(
m
,
n
)]
=
(
m
,
n
,
amplitude
)
if
update
:
self
.
update_data
()
def
update_data
(
self
):
X
,
Y
=
np
.
meshgrid
(
self
.
x
,
self
.
y
)
R
=
np
.
sqrt
(
X
**
2
+
Y
**
2
)
PHI
=
np
.
arctan2
(
Y
,
X
)
data
=
np
.
zeros
(
np
.
shape
(
R
))
for
i
in
self
.
__zernikes
.
items
():
data
+=
i
[
1
][
2
]
*
zernike
(
i
[
1
][
0
],
i
[
1
][
1
],
R
/
self
.
radius
,
PHI
)
self
.
data
=
data
def
read_map
(
filename
):
def
read_map
(
filename
):
with
open
(
filename
,
'
r
'
)
as
f
:
with
open
(
filename
,
'
r
'
)
as
f
:
...
...
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