Skip to content
Snippets Groups Projects
Select Git revision
  • 5837254ca73df2e5de432e7e409ddbbb3edf10da
  • master default protected
  • develop-GA
  • timeFstatmap
  • add-higher-spindown-components
  • develop-DK
  • adds-header-to-grid-search
  • v1.2
  • v1.1.2
  • v1.1.0
  • v1.0.1
11 results

mcmc_based_searches.py

Blame
  • Forked from Gregory Ashton / PyFstat
    Source project has a limited visibility.
    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()