From 4abb5fbd449d7eafac71745c80b7eca4d76f474d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elena=20Arensk=C3=B6tter?= Date: Sat, 4 Nov 2023 13:44:26 +0100 Subject: [PATCH] Update ionBeam854nm.py --- ionBeam854nm.py | 152 ++++++++++++++++++++++++------------------------ 1 file changed, 76 insertions(+), 76 deletions(-) diff --git a/ionBeam854nm.py b/ionBeam854nm.py index c5ef511..1c00c99 100644 --- a/ionBeam854nm.py +++ b/ionBeam854nm.py @@ -1,76 +1,76 @@ -# -*- coding: utf-8 -*- -""" -Created on Fri Aug 14 14:17:54 2020 - -@author: Jan -""" - - -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() - - +# -*- 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() + +