Blame view

PDH_error_signal/PDH_error_signal.py 1008 Bytes
07295cdf4   bmarechal   add PDH_error_sig...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
  #!/usr/bin/env python
  
  import numpy
  import matplotlib.pyplot as plt
  
  L = 14e-2
  c = 299792458
  R = 0.99991
  
  fsr = c/(2*L)
  print("fsr = %f GHz"%(fsr/1e9))
  
  finesse = numpy.pi*R**0.25/(1-R**0.5)
  print("finesse = %i"%finesse)
  
  print("finesse/fsr = %f s"%(finesse/fsr))
  
  fc = fsr*130000
  df = 20e6
  #print(fc)
  
  f = 2*numpy.pi*numpy.linspace(fc-df, fc+df, 100000) # frequency array
  i = complex(0,1)
  
  fpt = ((1.-R)*numpy.exp(-2.*L*i*f/c))/(1.-R*numpy.exp(-2.*L*i*f/c))
  fpr = R**0.5*(1.-numpy.exp(-2.*L*i*f/c))/(1.-R*numpy.exp(-2.*L*i*f/c))
  
  plt.subplot(2, 1, 1)
  plt.plot(f, abs(fpr))
  plt.title('FP cavity')
  plt.ylabel('Reflective intensity')
  plt.grid()
  
  
  fm = 23e6
  ram = 0
  
  fm1 = R**0.5*(1.-numpy.exp(-2.*L*i*(f+fm)/c))/(1.-R*numpy.exp(-2.*L*i*(f+fm)/c)) + ram*i
  fm2 = R**0.5*(1.-numpy.exp(-2.*L*i*(f-fm)/c))/(1.-R*numpy.exp(-2.*L*i*(f-fm)/c)) + ram*i
  
  ff = fpr*fm1.conjugate()-fpr.conjugate()*fm2
  iff = ff.imag
  
  
  plt.subplot(2, 1, 2)
  plt.plot(f, iff)
  plt.xlabel('Frequency')
  plt.ylabel('PDH')
  plt.grid()
  
  
  plt.show()