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
b1915277
Commit
b1915277
authored
Apr 14, 2016
by
Daniel Toyra
Browse files
Add Python 3 support for zernike.py and minor fixes and comments in maps.py
parent
7ff05a8c
Changes
2
Hide whitespace changes
Inline
Side-by-side
pykat/maths/zernike.py
View file @
b1915277
import
numpy
as
np
from
scipy.misc
import
factorial
as
fac
from
six.moves
import
xrange
import
math
def
zernike_R
(
m
,
n
,
rho
):
...
...
pykat/optics/maps.py
View file @
b1915277
...
...
@@ -801,7 +801,7 @@ class surfacemap(object):
return
A1
,
xbeta
,
ybeta
,
zOff
def
rmSphericalSurf
(
self
,
Rc0
,
w
=
None
,
zOff
=
None
,
isCenter
=
[
False
,
False
]):
def
rmSphericalSurf
(
self
,
Rc0
,
w
=
None
,
zOff
=
None
,
isCenter
=
[
False
,
False
]
,
maxfev
=
2000
):
'''
Fits spherical surface to the mirror map and removes it.
...
...
@@ -885,7 +885,7 @@ class surfacemap(object):
# Using the simplex Nelder-Mead method. This is the same or very
# similar to the method used in 'FT_remove_curvature_from_mirror_map.m',
# but there are probably better methods to use.
opts
=
{
'xtol'
:
1.0e-5
,
'ftol'
:
1.0e-9
,
'maxiter'
:
1000
,
'maxfev'
:
1000
,
'disp'
:
False
}
opts
=
{
'xtol'
:
1.0e-5
,
'ftol'
:
1.0e-9
,
'maxiter'
:
1000
0
,
'maxfev'
:
maxfev
,
'disp'
:
False
}
out
=
minimize
(
costFunc
,
p
,
method
=
'Nelder-Mead'
,
options
=
opts
)
if
not
out
[
'success'
]:
msg
=
' Warning: '
+
out
[
'message'
].
split
(
'.'
)[
0
]
+
' (nfev={:d}).'
.
format
(
out
[
'nfev'
])
...
...
@@ -1725,7 +1725,7 @@ def read_map(filename, mapFormat='finesse', scaling=1.0e-9, mapType='phase', fie
Reads surface map files and returns a surfacemap object.
filename - name of surface map file.
mapFormat - 'finesse', 'ligo', 'zygo'
. Currently only for ascii formats
.
mapFormat - 'finesse', 'ligo', 'zygo'
, 'metroPro' (binary)
.
scaling - scaling of surface height of the mirror map [m].
'''
...
...
@@ -2088,9 +2088,6 @@ def readHeaderMP(f):
return
hData
class
BinaryReaderEOFException
(
Exception
):
def
__init__
(
self
):
pass
...
...
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