gt_etalon.py 783 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/env python3
  2. import matplotlib
  3. import matplotlib.pyplot as plt
  4. import numpy as np
  5. from math import atan, tan, cos, pi, sqrt
  6. matplotlib.rcParams.update({'font.size': 15})
  7. t0 = 4000.
  8. λ = 1064E-9
  9. t0 = λ*(3759398496+0.5)
  10. theta0 = 0.0
  11. n = 1.0
  12. def δ_(λ, n, t, theta):
  13. return 4*pi*n*t*cos(theta)/λ
  14. def theta(r, h):
  15. δ = δ_(λ, n, t0*(1+h), theta0)
  16. return 2*atan(-tan(δ/2)*(1+sqrt(r))/(1-sqrt(r)))
  17. def main():
  18. for r in (0, 0.5, 0.8, 0.986):
  19. hs = np.linspace(-6.63E-11, 6.63E-11, 500)
  20. ys = [theta(r, h) for h in hs]
  21. plt.plot(hs, ys, label=f"R={r}")
  22. plt.legend()
  23. plt.ylabel("$\Phi$")
  24. plt.xlabel("$h$")
  25. plt.tight_layout()
  26. plt.savefig("gt_etalon.png")
  27. # plt.show()
  28. if __name__ == '__main__':
  29. main()