Skip to content
teoryanalysis.py 2.68 KiB
Newer Older
Nicolas Nunez Barreto's avatar
Nicolas Nunez Barreto committed
# -*- 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))
Nicolas Nunez Barreto's avatar
Nicolas Nunez Barreto committed
plt.plot(r,1*OAM(r,w2*1.5,amp2*1.5))
plt.plot(r,1*OAM(r,w2*1.7,amp2*1.7))
Nicolas Nunez Barreto's avatar
Nicolas Nunez Barreto committed
#%%
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)
Nicolas Nunez Barreto's avatar
Nicolas Nunez Barreto committed
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')