test_properties.tbf 555 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
import pykat
from copy import deepcopy

kat = pykat.finesse.kat()

code_det = """
m m1 1 0 0 n0 n1
pd1 pdr 9M 90 n1
"""

kat.parseCommands(code_det)

kat.pdr.f1 = "0.1k"
assert(kat.pdr.f1 == 100)
assert(type(kat.pdr.f1) is pykat.param.Param)

Daniel Brown's avatar
Daniel Brown committed
17
kat.pdr.phase1 = "10u" 
18
19
assert(kat.pdr.phase1 == 1e-5)
assert(type(kat.pdr.phase1) is pykat.param.Param)
Daniel Brown's avatar
Daniel Brown committed
20
21
22
23
24
25
26
27
28
29

kat.m1.R = "10000u"
assert(kat.m1.R == 0.01)

#################################
kat = deepcopy(kat)

kat.m1.R = 0.9
assert(kat.m1.R == 0.9)

30
31
kat.pdr.phase1 = 20
assert(kat.pdr.phase1 == 20)
Daniel Brown's avatar
Daniel Brown committed
32

33
print("PASSED")