lkat_trace.py 348 Bytes
Newer Older
Daniel Brown's avatar
Daniel Brown committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import pykat
								 
cmd = """
l l1 1 0 n1
s s1 1 n1 n2
m m1 0.99 0.01 0 n2 n3
s s2 100 n3 n4
m m2 0.99 0.01 0 n4 n5
pd circ n3

noxaxis
maxtem 2

attr m1 Rc -1000
attr m2 Rc 1000 
cav c1 m1 n3 m2 n4
"""

kat = pykat.finesse.kat()

kat.parseCommands(cmd)

info = kat.lkat_trace()

print "n1 qx =",info["n1"].qx

print "Cavity info ", info["c1"]