test_aperture.py 709 Bytes
Newer Older
1
from pykat.utilities.optics.gaussian_beams import gauss_param
2
3
4
5
from pykat import finesse
from pykat.commands import xaxis
import pylab as pl
import numpy as np
6
import math
7
8
9
10

code = """
l l1 1 0 0 n1
s s1 10 1 n1 n2
Daniel Brown's avatar
Daniel Brown committed
11
m m1 1 0 0 n2 n3
12
13

pd refl n2
14

15
16
17
xaxis m1 r_ap lin 0.1e-3 2e-3 10
"""

18
19
kat = finesse.kat()
kat.parseCommands(code)
20

21
22
23
maxtem = np.arange(0, 4)

kat.m1.n2.q = gauss_param(w0=1e-3, z=0)
24

25
kat.verbose = False
26
27

for tem in maxtem:
28
    print "Calculating maxtem ", tem, "..."
29
    kat.maxtem = tem
30

31
32
33
34
35
36
37
    r = kat.run()
    pl.plot(r.x/1e-3, r.y, label="maxtem={0}".format(tem))

pl.ylabel("Reflected Power [W]")
pl.xlabel("Mirror aperture [mm]")
pl.legend()
pl.show()
38