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
8a55e2af
Commit
8a55e2af
authored
9 years ago
by
Daniel Brown
Browse files
Options
Downloads
Patches
Plain Diff
updates
parent
2928044a
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
examples/beam_trace.py
+5
-5
5 additions, 5 deletions
examples/beam_trace.py
pykat/finesse.py
+13
-4
13 additions, 4 deletions
pykat/finesse.py
pykat/optics/maps.py
+3
-3
3 additions, 3 deletions
pykat/optics/maps.py
pykat/tools/plotting/beamtrace.py
+1
-1
1 addition, 1 deletion
pykat/tools/plotting/beamtrace.py
with
22 additions
and
13 deletions
examples/beam_trace.py
+
5
−
5
View file @
8a55e2af
...
...
@@ -8,9 +8,9 @@ kat = pykat.finesse.kat()
cmds
=
"""
l l1 1 0 n0
s s0 100
0
n0 n1
s s0 100 n0 n1
m m1 0.5 0.5 0 n1 n2
s s1 10 n2 n3
s s1 10
0
n2 n3
m m2 0.5 0.5 0 n3 n4
s s2 20 n4 n5
bs bs1 0.5 0.5 0 0 n5 n6 n7 n8
...
...
@@ -25,13 +25,13 @@ bs bs2 0.5 0.5 0 0 n9 n12 n13 n14
s s6 3 n12 n15
lens lens1 20 n15 n16
lens lens1 20
0
n15 n16
s s7 500 n16 n17
gouy g1 x s0 s1 s2
#
gouy g1 x s0 s1 s2
bp bp1 x w0 n5
#
bp bp1 x w0 n5
gauss g1 l1 n0 8e-3 -1000 4e-3 -1200
noxaxis
maxtem 0
...
...
This diff is collapsed.
Click to expand it.
pykat/finesse.py
+
13
−
4
View file @
8a55e2af
...
...
@@ -527,6 +527,9 @@ class kat(object):
if
kat_file
!=
None
:
self
.
loadKatFile
(
kat_file
)
def
deepcopy
(
self
):
return
copy
.
deepcopy
(
self
)
def
getAll
(
self
,
type
):
"""
Returns a collection of all objects of the type argument that are
...
...
@@ -725,11 +728,17 @@ class kat(object):
pkex
.
PrintError
(
"
Error processing constants:
"
,
ex
)
sys
.
exit
(
1
)
def
removeBlock
(
self
,
name
):
def
getBlocks
(
self
):
return
self
.
__blocks
.
keys
()
def
removeBlock
(
self
,
name
,
failOnBlockNotFound
=
True
):
if
name
not
in
self
.
__blocks
:
if
failOnBlockNotFound
:
pkex
.
PrintError
(
"
Error removing block:
"
,
pkex
.
BasePyKatException
(
'
Block
"
{0}
"
was not found
'
.
format
(
name
)))
sys
.
exit
(
1
)
else
:
return
for
o
in
self
.
__blocks
[
name
].
contents
:
self
.
remove
(
o
)
...
...
This diff is collapsed.
Click to expand it.
pykat/optics/maps.py
+
3
−
3
View file @
8a55e2af
...
...
@@ -347,7 +347,7 @@ class surfacemap(object):
fig
=
pylab
.
figure
()
pcm
=
pylab
.
pcolormesh
(
xRange
,
yRange
,
self
.
data
,
vmin
=
zmin
,
vmax
=
zmax
)
pcm
=
pylab
.
pcolormesh
(
xRange
,
yRange
,
self
.
data
)
pcm
.
set_rasterized
(
True
)
pylab
.
xlabel
(
'
x [cm]
'
)
...
...
@@ -358,8 +358,8 @@ class surfacemap(object):
pylab
.
title
(
'
Surface map {0}, type {1}
'
.
format
(
self
.
name
,
self
.
type
))
cbar
=
fig
.
colorbar
(
axes
)
cbar
.
set_clim
(
zmin
,
zmax
)
cbar
=
pylab
.
colorbar
()
#
cbar.set_clim(zmin, zmax)
if
clabel
is
not
None
:
cbar
.
set_label
(
clabel
)
...
...
This diff is collapsed.
Click to expand it.
pykat/tools/plotting/beamtrace.py
+
1
−
1
View file @
8a55e2af
...
...
@@ -64,7 +64,7 @@ def plot_beam_trace(_kat, from_node, to_node):
for
n
in
range
(
len
(
spaces
)):
s
=
spaces
[
n
]
Lmax
=
s
.
L
N
=
100
N
=
100
0
node
=
None
cmds
=
"""
...
...
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