Skip to content
Snippets Groups Projects
Select Git revision
  • 97a1dc47e8e6a127a4c08e9a6cf8923009ca335f
  • master default
  • mingw_gcc44
  • release_ABP1_012
  • release_ABP1_008
  • release_ABP1_006
  • release_ABP1_007
  • release_ABP1_005
  • release_ABP1_004
  • release_ABP1_003
  • pre_release_0.15
  • release_ABP1_001
  • release_ABP1_002
  • pre_release_0.13
  • pre_release_0.14
  • pre_release_0.11
  • pre_release_0.12
  • pre_release_0.10
  • pre_release_0.09
  • pre_release_0.08
20 results

WindowManager.h

Blame
  • Forked from einsteinathome / graphicsframework
    Source project has a limited visibility.
    • Oliver Bock's avatar
      3d9d9818
      Added proper timing · 3d9d9818
      Oliver Bock authored
      * For sphere rotation
      * For observatory positioning
      
      Note: the original code seems to have a bug which explains a slight discrepancy between this new and the original visualisation.
      In the original code gmt_dtime() is used to get the GMT time, but this function is a mere #define of dtime() under unix, hence any
      difference of dtime() and gmt_dtime() will result in 0 instead of the real UTC/GMT offset.
      
      Note: dtime() returns local time...
      3d9d9818
      History
      Added proper timing
      Oliver Bock authored
      * For sphere rotation
      * For observatory positioning
      
      Note: the original code seems to have a bug which explains a slight discrepancy between this new and the original visualisation.
      In the original code gmt_dtime() is used to get the GMT time, but this function is a mere #define of dtime() under unix, hence any
      difference of dtime() and gmt_dtime() will result in 0 instead of the real UTC/GMT offset.
      
      Note: dtime() returns local time...
    test_rad_pressure.py 1.20 KiB
    from pykat import finesse
    from pykat.detectors import *
    from pykat.components import *
    from pykat.commands import *
    from pykat.structs import *
    
    import numpy as np
    import pylab as pl
    
    code = """
    l l1 1 0 n1
    m m1 0.99 0.01 0 n1 n2
    s cav1 1200 n2 n3
    m m2 0.99 0.01 -1 n3 n4
    
    #attr m1 m 1# mech sus1
    attr m2 m 1# mech sus1
    
    fsig sig l1 amp 1 0 4
    
    #ad car_refl 0 n1
    ad up_refl 0 n1
    ad low_refl 0 n1
    
    qd refl_A 0 0 n1
    qd refl_Q 0 90 n1
    qd tran_A 0 0 n4
    qd tran_Q 0 90 n4
    
    put up_refl f $x1
    put low_refl f $mx1
    
    xaxis sig f log 1 10000 1000
    yaxis log re:im
    """
    
    kat = finesse.kat(kat_code=code)
    out = kat.run(printout=0,printerr=0)
    
    # using real and imag part compute the complex value of the upper and lower sidebands
    a_up = out.y[:,0] + out.y[:,1]*1j
    a_lo = out.y[:,2] + out.y[:,3]*-1j
    
    pl.figure(1)
    pl.loglog(out.x, np.abs(a_up + a_lo), out.x, np.abs((a_up - a_lo) / (1j)))
    pl.xlabel(out.xlabel)
    pl.title("Reflection quadratures with no relative carrier phase")
    pl.legend(["Amplitude","Phase"])
    pl.show()
    
    pl.figure(2)
    pl.loglog(out.x, np.abs(a_up), out.x, np.abs(a_lo))
    pl.xlabel(out.xlabel)
    pl.title("Amplitude of reflected sidebands")
    pl.legend(["Upper","Lower"])
    pl.show()