gaussianoptics/ionBeam854nm.py

77 lines
1.5 KiB
Python

# -*- coding: utf-8 -*-
"""
Created on Fri Aug 14 14:17:54 2020
@author: Elena
"""
import numpy as np
import matplotlib.pyplot as plt
import gaussianoptics as go
#Laser wavelength
lam = 854e-9
#Number of points
N =5001
#Focal length and position definition
lens_coupler = 12e-3
f1_tele = 30e-3
pos_f1 = 100e-3
f2_tele = 300e-3
pos_f2 = 330e-3
haloPosDif393_854 = 1.4e-3
f_halo1 = 25e-3
pos_halo1 = 300e-3
f_halo2 = 25e-3
pos_halo2 = 50e-3 - haloPosDif393_854
f1_colTele = 300e-3;
pos_colTele1= 400e-3;
f2_colTele = 25e-3;
pos_colTele2= 497.5e-3;
#Definition of optical arangement
opticalbench = [['path',1,0,'f'],
['thinlens',12e-3,lens_coupler,'r'],
['path',1,0,'f'],
['thinlens',f1_tele,pos_f1,'r'],
['path',1,0,'f'],
['thinlens',f2_tele,pos_f2,'r'],
['path',1,0,'f'],
['thinlens',f_halo1,pos_halo1,'r'],
['path',1,0,'f'],
['thinlens',f_halo2,pos_halo2,'r'],
['path',1,0,'f'],
['thinlens',f1_colTele,pos_colTele1,'r'],
['path',1,0,'f'],
['thinlens',f2_colTele,pos_colTele2,'r'],
['path',1,0.3,'r']
]
#Beamwaist inside fiber 780HP
w0 = 2.5e-6
z0 = np.pi*w0**2/lam
q0 = complex(0,z0)
[x,w,R,OB,M_tot] = go.gaussianoptics(opticalbench,lam,q0,0,N)
fig, ax = plt.subplots()
ax.plot(x*1000, w*1000, color='black')
ax.plot(x*1000, -w*1000, color='black')
plt.grid(True,which="both")
plt.show()