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
Snippets
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
Sean Leavey
pykat
Commits
17bcd615
Commit
17bcd615
authored
Jun 27, 2016
by
Andreas Freise
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.aei.uni-hannover.de:finesse/pykat
parents
b4592831
d3cb761a
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
pykat/optics/maps.py
+13
-11
13 additions, 11 deletions
pykat/optics/maps.py
with
13 additions
and
11 deletions
pykat/optics/maps.py
+
13
−
11
View file @
17bcd615
...
@@ -19,8 +19,6 @@ from scipy.optimize import minimize
...
@@ -19,8 +19,6 @@ from scipy.optimize import minimize
from
pykat.math.zernike
import
*
from
pykat.math.zernike
import
*
from
pykat.exceptions
import
BasePyKatException
from
pykat.exceptions
import
BasePyKatException
from
copy
import
deepcopy
from
copy
import
deepcopy
import
matplotlib
import
matplotlib.pyplot
as
plt
import
numpy
as
np
import
numpy
as
np
import
math
import
math
...
@@ -412,6 +410,9 @@ class surfacemap(object):
...
@@ -412,6 +410,9 @@ class surfacemap(object):
# xlim and ylim given in centimeters
# xlim and ylim given in centimeters
def
plot
(
self
,
show
=
True
,
clabel
=
None
,
xlim
=
None
,
ylim
=
None
,
isBlock
=
False
):
def
plot
(
self
,
show
=
True
,
clabel
=
None
,
xlim
=
None
,
ylim
=
None
,
isBlock
=
False
):
import
matplotlib
import
matplotlib.pyplot
as
plt
if
xlim
is
not
None
:
if
xlim
is
not
None
:
# Sorts out the x-values within xlim
# Sorts out the x-values within xlim
_x
=
np
.
logical_and
(
self
.
x
<=
max
(
xlim
)
/
100.0
,
self
.
x
>=
min
(
xlim
)
/
100.0
)
_x
=
np
.
logical_and
(
self
.
x
<=
max
(
xlim
)
/
100.0
,
self
.
x
>=
min
(
xlim
)
/
100.0
)
...
@@ -1603,7 +1604,8 @@ class mergedmap:
...
@@ -1603,7 +1604,8 @@ class mergedmap:
def
plot
(
self
,
mode
=
"
absorption
"
,
show
=
True
,
clabel
=
None
,
xlim
=
None
,
ylim
=
None
,
wavelength
=
1064e-9
,
isBlock
=
False
):
def
plot
(
self
,
mode
=
"
absorption
"
,
show
=
True
,
clabel
=
None
,
xlim
=
None
,
ylim
=
None
,
wavelength
=
1064e-9
,
isBlock
=
False
):
import
pylab
import
matplotlib
import
matplotlib.pyplot
as
plt
if
xlim
is
not
None
:
if
xlim
is
not
None
:
_x
=
np
.
logical_and
(
self
.
x
<=
max
(
xlim
)
/
100.0
,
self
.
x
>=
min
(
xlim
)
/
100.0
)
_x
=
np
.
logical_and
(
self
.
x
<=
max
(
xlim
)
/
100.0
,
self
.
x
>=
min
(
xlim
)
/
100.0
)
...
@@ -1638,15 +1640,15 @@ class mergedmap:
...
@@ -1638,15 +1640,15 @@ class mergedmap:
xrange
=
100
*
self
.
x
xrange
=
100
*
self
.
x
yrange
=
100
*
self
.
y
yrange
=
100
*
self
.
y
fig
=
p
ylab
.
figure
()
fig
=
p
lt
.
figure
()
axes
=
p
ylab
.
pcolormesh
(
xrange
,
yrange
,
data
,
vmin
=
zmin
,
vmax
=
zmax
)
axes
=
p
lt
.
pcolormesh
(
xrange
,
yrange
,
data
,
vmin
=
zmin
,
vmax
=
zmax
)
p
ylab
.
xlabel
(
'
x [cm]
'
)
p
lt
.
xlabel
(
'
x [cm]
'
)
p
ylab
.
ylabel
(
'
y [cm]
'
)
p
lt
.
ylabel
(
'
y [cm]
'
)
if
xlim
is
not
None
:
p
ylab
.
xlim
(
xlim
)
if
xlim
is
not
None
:
p
lt
.
xlim
(
xlim
)
if
ylim
is
not
None
:
p
ylab
.
ylim
(
ylim
)
if
ylim
is
not
None
:
p
lt
.
ylim
(
ylim
)
p
ylab
.
title
(
'
Merged map {0}, mode {1}
'
.
format
(
self
.
name
,
mode
))
p
lt
.
title
(
'
Merged map {0}, mode {1}
'
.
format
(
self
.
name
,
mode
))
cbar
=
fig
.
colorbar
(
axes
)
cbar
=
fig
.
colorbar
(
axes
)
cbar
.
set_clim
(
zmin
,
zmax
)
cbar
.
set_clim
(
zmin
,
zmax
)
...
@@ -1655,7 +1657,7 @@ class mergedmap:
...
@@ -1655,7 +1657,7 @@ class mergedmap:
cbar
.
set_label
(
clabel
)
cbar
.
set_label
(
clabel
)
if
show
:
if
show
:
p
ylab
.
show
(
block
=
isBlock
)
p
lt
.
show
(
block
=
isBlock
)
return
fig
return
fig
...
...
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