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
36b80188
Commit
36b80188
authored
Sep 12, 2016
by
Daniel Brown
Browse files
updating test files
parent
c8d9f73b
Pipeline
#1581
passed with stage
in 18 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
test/test_scripts/structural/test_lambda0_beam_param.py
0 → 100644
View file @
36b80188
# Submitted by Sebastian.
# Checks that trace data output returns the same beamsize when a different default wavelength is used
from
pykat
import
finesse
kat_code
=
"""
l laser 1 0 0 n1
s s1 10 1 n1 n2
m2 mITM 0.9 0.0 0 n2 n3
attr mITM Rc -2.0
s scav 1 n3 n4
m2 mETM 0.9 0.0 0 n4 n5
attr mETM Rc 2.0
cav myCav mITM n3 mETM n4
s s3 1 n5 n6
pd pd_trans n6
noxaxis
yaxis abs:deg # move detector frequency with xaxis
"""
kat
=
finesse
.
kat
()
kat
.
verbose
=
False
kat
.
lambda0
=
1550e-9
kat
.
parseKatCode
(
kat_code
)
kat
.
maxtem
=
0
kat
.
trace
=
2
out
,
T
=
kat
.
run
(
getTraceData
=
True
)
print
(
out
.
stdout
)
bp
=
T
[
0
][
'n4'
][
0
]
# this is not overwritten to 1550nm as above
print
(
'beam_param.wavelength: {:.0f}nm'
.
format
(
bp
.
wavelength
*
1e9
))
# therefore this is wrong
print
(
'w0 from beam_param.w0: {:.2f}um'
.
format
(
bp
.
w0
*
1e6
))
# and this does not really work as the wavelength cancels out
# for z=0 and therefore the waist does not change
print
(
'w0 from beam_param.beamsize(): {:.2f}um'
.
format
(
bp
.
beamsize
(
z
=
0
,
wavelength
=
1550e-9
)
*
1e6
))
assert
(
bp
.
w0
==
bp
.
beamsize
(
z
=
0
,
wavelength
=
1550e-9
))
\ No newline at end of file
test/test_scripts/structural/test_properties.
py
→
test/test_scripts/structural/test_properties.
tbf
View file @
36b80188
File moved
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