Skip to content
Snippets Groups Projects
Select Git revision
  • f7752dd93e4485282f32c899a90e02e5a3107aa3
  • master default protected
2 results

test_fsig.py

Blame
    • Daniel Brown's avatar
      4d173029
      adding in fsig command (not parsing yet). See example test_fsig.py in bin... · 4d173029
      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.
      4d173029
      History
      adding in fsig command (not parsing yet). See example test_fsig.py in bin...
      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.
    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')