test_plot.py 592 Bytes
Newer Older
Daniel Brown's avatar
Daniel Brown committed
1
2
3
4
5
6
7
8
9
10
from pykat import finesse
from pykat.detectors import *
from pykat.components import *
from pykat.commands import *
from pykat.structs import *

import numpy as np
import pylab as pl

code = """
11
l l1 1 0 0 n1 
Daniel Brown's avatar
Daniel Brown committed
12
13
14
15
16
s s1 10 1 n1 n2
m m1 0.5 0.5 0 n2 n3
s s2 10 1 n3 n4
m m2 0.5 0.5 0 n4 n5
s s3 10 1 n5 n6
17
18

yaxis abs:deg
19
20
21
22

pd pd_cav n3

cav c1 m1 n3 m2 n4
Daniel Brown's avatar
Daniel Brown committed
23
24

attr m1 Rc 1
Daniel Brown's avatar
Daniel Brown committed
25
26
27
28
29
"""

kat = finesse.kat()
kat.parseCommands(code)

30
kat.add(xaxis("lin", [0, 360], kat.m2.phi, 100))
Daniel Brown's avatar
Daniel Brown committed
31
32
33
34
35
36
37
38

kat.m1.Rcx = -1000.0
kat.m1.Rcy = -1000.0
kat.m2.Rcx =  1000.0
kat.m2.Rcy =  1000.0

kat.maxtem = 0

39
40
out = kat.run()
out.plot()
Daniel Brown's avatar
Daniel Brown committed
41