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
Sebastian Steinlechner
pykat
Commits
445bb049
Commit
445bb049
authored
Dec 18, 2013
by
Andreas Freise
Browse files
Merge branch 'master' of gitmaster.atlas.aei.uni-hannover.de:pykat/pykat
parents
ee9f0a8d
edc41011
Changes
2
Hide whitespace changes
Inline
Side-by-side
bin/test_plot.py
View file @
445bb049
...
...
@@ -24,9 +24,10 @@ kat.parseCommands(code)
kat
.
add
(
cavity
(
'cav1'
,
'm1'
,
'n3'
,
'm2'
,
'n4'
))
kat
.
add
(
photodiode
(
'pd_cav'
,
'n4'
,
num_demods
=
1
,
demods
=
[
1
]))
kat
.
add
(
photodiode
(
'pd_ref'
,
'n2'
))
kat
.
add
(
photodiode
(
'pd_trs'
,
'n5'
))
kat
.
add
(
photodiode
(
'pd_cav'
,
'n4'
,
num_demods
=
1
,
demods
=
[
1
]))
kat
.
add
(
xaxis
(
"lin"
,
[
0
,
360
],
kat
.
m2
,
kat
.
m2
.
phi
,
100
))
...
...
@@ -41,7 +42,6 @@ out = kat.run(printout=0,printerr=0)
pl
.
figure
()
pl
.
plot
(
out
.
x
,
out
[
"pd_cav"
])
pl
.
plot
(
out
.
x
,
out
[
"pd_ref"
])
pl
.
xlabel
(
out
.
xlabel
)
pl
.
ylabel
(
"Intensity [W]"
)
pl
.
legend
(
out
.
ylabels
)
...
...
pykat/finesse.py
View file @
445bb049
...
...
@@ -74,11 +74,13 @@ class katRun(object):
print
idx
if
len
(
idx
)
==
1
and
len
(
self
.
y
.
shape
)
==
1
:
return
self
.
y
.
squeeze
()
return
self
.
y
elif
len
(
idx
)
>
0
and
len
(
self
.
y
.
shape
)
==
1
:
return
self
.
y
[
idx
]
elif
len
(
idx
)
>
0
:
return
self
.
y
[:,
idx
].
squeeze
()
elif
len
(
idx
)
==
1
:
return
self
.
y
[
idx
].
squeeze
()
return
self
.
y
[
:,
idx
].
squeeze
()
else
:
raise
pkex
.
BasePyKatException
(
"No output by the name {0} found"
.
format
(
str
(
value
)))
...
...
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