Newer
Older
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 4 12:24:54 2023
@author: nicon
"""
import numpy as np
import matplotlib.pyplot as plt
def RDE(r,l,v):
return 2*l*v/r
def OAM(r,w,amp):
width=2/(amp*np.sqrt(2*np.pi))
return amp*np.exp(-((r-w)**2)/(2*width**2))
r=np.arange(0,3,0.001)
w1 = 1
amp1 = 2*np.pi/w1
w2 = 1.5
amp2=2*np.pi/w2
plt.figure()
plt.plot(r,1*OAM(r,w1,amp1))
plt.plot(r,1*OAM(r,w2,amp2))
plt.plot(r,1*OAM(r,w2*1.5,amp2*1.5))
plt.plot(r,1*OAM(r,w2*1.7,amp2*1.7))
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#%%
plt.figure()
plt.plot(r,OAM(r,w1,amp1)/RDE(r,2,2))
plt.plot(r,OAM(r,w2,amp2)/RDE(r,2,2))
#%%
plt.figure()
plt.plot(r/w1,(OAM(r,w1,amp1)/RDE(r,2,2)))
plt.plot(r/w2,(OAM(r,w2,amp2)/RDE(r,2,2)))
#%%
from math import factorial as fac
def LGbeam(r,l,w,P):
E = np.sqrt(4*P/(w**2))
return E*np.sqrt(2/(np.pi*(fac(np.abs(l)))))*(1/1)*(((np.sqrt(2)*r)/(w))**np.abs(l))*np.exp(-((r**2)/(w**2)))
def RDE(r,l,v,w):
#return 2*l*v*(1/r)
return 2*l*v*(r**2.21) #con una exponencial se chotea
#return 2*l*v
r = np.arange(0.01,200,0.01)
w1 = 40
w2 = 80
P = 1e50
l=2
vel = 1e1
# plt.figure()
# plt.plot(r,(LGbeam(r,l,w1,P))**2)
# plt.plot(r,(LGbeam(r,l,w2,P))**2)
# plt.title('Intensity of two LG beams with different waists')
# plt.figure()
# plt.plot(r,((LGbeam(r,l,w1,P))**2)/RDE(r,l,vel,w1))
# plt.plot(r,((LGbeam(r,l,w2,P))**2)/RDE(r,l,vel,w2))
# plt.title('Ratio between the LG intensity and the RDE term')
LG1 = (((LGbeam(r,l,w1,P))**2)/RDE(r,l,vel,w1))
LG2 = (((LGbeam(r,l,w2,P))**2)/RDE(r,l,vel,w2))
fact = (np.max(LG1)/np.max(LG2))
plt.figure()
plt.plot(r,LG1)
#plt.plot(r/w2,LG2*fact)
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
plt.title('Scaled ratio between LG and RDE, x axis scaled with LG waist')
#%%
def ShiftFull(r,l,vz,vr,vphi,w,wl,z):
k = 2*np.pi/wl
zr = 0.5*k*w*w
deltaz = (k + (k*r*r/(2*(z*z +zr*zr))*((2*z*z)/(z*z + zr*zr) - 1) - (l+1)*zr/(z*z+zr*zr)))*vz
deltar = (k*r*z/(z*z+zr*zr))*vr
deltaphi = (l/r)*vphi
return deltaz+deltar+deltaphi
r = np.arange(0.0001,200,0.01)
w1 = 40
w2 = 60
wl = 0.866
z=1
P = 1e15
l=2
velz = 1e10*0
velr = 1e10*0
velphi = 1e10
# plt.figure()
# plt.plot(r,(LGbeam(r,2,w1,1))**2)
# plt.plot(r,(LGbeam(r,2,w2,1))**2)
# plt.title('Intensity of two LG beams with different waists')
# plt.figure()
# plt.plot(r,((LGbeam(r,2,w1,1))**2)/RDE(r,2,2))
# plt.plot(r,((LGbeam(r,2,w2,1))**2)/RDE(r,2,2))
# plt.title('Ratio between the LG intensity and the RDE term')
LG1 = (((LGbeam(r,l,w1,P))**2)/ShiftFull(r,2,velz,velr,velphi,w1,wl,z))
LG2 = (((LGbeam(r,l,w2,P))**2)/ShiftFull(r,2,velz,velr,velphi,w2,wl,z))
fact = (np.max(LG1)/np.max(LG2))
plt.figure()
plt.plot(r/w1,LG1)
plt.plot(r/w2,LG2*fact)
plt.title('Scaled ratio between LG and RDE, x axis scaled with LG waist')