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

test_fsig.py

Blame
  • test_aperture.py 636 B
    from pykat import finesse
    from pykat.commands import xaxis
    import pylab as pl
    import numpy as np
    
    code = """
    l l1 1 0 0 n1
    s s1 10 1 n1 n2
    m m1 1 0 0 n2 n3
    
    #gauss g1 m1 n2 1e-3 0
    
    pd refl n2
    
    xaxis m1 r_ap lin 0.1e-3 2e-3 10
    """
    
    kat = finesse.kat()
    kat.parseCommands(code)
    
    maxtem = np.arange(0, 2, 2)
    
    kat.nodes.n2.gauss_w0_z(1e-3, 0)
    
    for tem in maxtem:
        print "Calculating maxtem ", tem, "..."
        kat.maxtem = tem
        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()