Select Git revision
test_fsig.py
-
Daniel Brown authored
adding in fsig command (not parsing yet). See example test_fsig.py in bin folder. Also made component variable an optional argument for xaxis and x2axis which will break previous scripts. Did this as when setting the parameter to tune, the Param object contains whatever component owns that parameter so no need to pass it twice. Also stops someone passing a parameter not for the component stated.
Daniel Brown authoredadding in fsig command (not parsing yet). See example test_fsig.py in bin folder. Also made component variable an optional argument for xaxis and x2axis which will break previous scripts. Did this as when setting the parameter to tune, the Param object contains whatever component owns that parameter so no need to pass it twice. Also stops someone passing a parameter not for the component stated.
test_beam_trace.py 581 B
import pykat
from pykat.utilities.plotting.beamtrace import plot_beam_trace
import numpy as np
import pylab
import copy
kat = pykat.finesse.kat()
cmds = """
l l1 1 0 n0
s s0 1000 n0 n1
m m1 0.5 0.5 0 n1 n2
s s1 10 n2 n3
m m2 0.5 0.5 0 n3 n4
s s2 20 n4 n5
bs bs1 0.5 0.5 0 0 n5 n6 n7 n8
s s3 20 n6 n9
s s4 20 n7 n10
s s5 20 n8 n11
bs bs2 0.5 0.5 0 0 n9 n12 n13 n14
s s6 3 n12 n15
lens lens1 20 n15 n16
s s7 500 n16 n17
gouy g1 x s0 s1 s2
bp bp1 x w0 n5
gauss g1 l1 n0 8e-3 -1000 4e-3 -1200
noxaxis
maxtem 0
"""
kat.parseCommands(cmds)
plot_beam_trace(kat, 'n0', 'n17')