Commit bdddf7f2 authored by Marcelo Luda's avatar Marcelo Luda

lolo full model

parent f0723a27
......@@ -69,6 +69,45 @@ def PerformExperiment_8levels_MM(sg, sp, gPS, gPD, DetDoppler, u, DopplerLaserLi
return ProbeDetuningVectorL, Fluovector
@njit
def PerformExperiment_8levels_MM_lolo( sg, sp, gPS, gPD, DetUV, u,
DopplerLaserLinewidth, ProbeLaserLinewidth,
T, alpha, phidoppler, titadoppler, phiprobe,
titaprobe, beta, drivefreq, DetIR,
circularityprobe=1):
"""
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
sg: saturacion doppler como cociente respecto al ancho de linea ( UV )
sp: "" para repump (IR)
gPS: ancho de linea de la Doppler UV
gPD: ancho de linea IR
DetUV: Detunning Doppler (agregado como ancho efectivo del laser) en MHz (no angular)
u: Larmor frequency ( 4 G ~ 32 MHz)
DopplerLaserLinewidth: Ancho de line a UV ( < 100 kHz)
ProbeLaserLinewidth: ancho IR
T: Temperatura
alpha: angulo relativo entre los k de los laser
phidoppler: |
titadoppler: |--> Polarización de los lasers respecto al campo magnético (pol lineal)
phiprobe: |
titaprobe: |
beta: Modulation depth
drivefreq: de la trampa ~22 MHz *2pi
freqMin, freqMax, freqStep: Detuning del pump -- parametro del eje Z que es la frecuencia del repump
circularityprobe: 1 es lineal , 1j es circular
"""
rta = CPTspectrum8levels_MM_lolo(sg, sp, gPS, gPD, DetUV, u,
DopplerLaserLinewidth, ProbeLaserLinewidth,
T, alpha, phidoppler, titadoppler, phiprobe,
titaprobe, circularityprobe, beta, drivefreq,
DetIR)
return rta
def GenerateNoisyCPT_MM(sg, sp, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, kg, kr, v0, drivefreq, freqMin, freqMax, freqStep, circularityprobe=1, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
"""
Genera un resultado de PerformExperiment_8levels_MM con ruido normal agregado
......@@ -513,6 +552,44 @@ def CPTspectrum8levels_MM(sg, sp, gPS, gPD, Detg, u, lwg, lwp, Temp, alpha, phid
return DetProbeVectorMHz, Fluovector
@njit
def CPTspectrum8levels_MM_lolo(sg, sp, gPS, gPD, Detg, u, lwg, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, Circularityprobe, beta, drivefreq, DetProbeVector):
"""
ESTA ES LA FUNCION QUE ESTAMOS USANDO
Hace un experimento barriendo ángulos de repump con el angulo de doppler fijo.
solvemode=1: resuelve con np.linalg.solve
solvemode=2: resuelve invirtiendo L con la funcion np.linalg.inv
"""
phidoppler, titadoppler = phidoppler*(np.pi/180), titadoppler*(np.pi/180)
phiprobe, titaprobe = phiprobe*(np.pi/180), titaprobe*(np.pi/180)
DetProbeVector = 2*np.pi*DetProbeVector*1e6
Detg = 2*np.pi*Detg*1e6
#lwg, lwr, lwp = 2*np.pi*lwg*1e6, 2*np.pi*lwr*1e6, 2*np.pi*lwp*1e6
lwg, lwp = lwg*1e6, lwp*1e6
rabG = sg*gPS
rabP = sp*gPD
Fluovector = []
for Detp in DetProbeVector:
L = FullL_MM(rabG, rabP, gPS, gPD, Detg, Detp, u, lwg, lwp, phidoppler, titadoppler, phiprobe, titaprobe, beta, drivefreq, Temp, alpha, Circularityprobe)
# if solvemode == 1:
rhovectorized = np.linalg.solve(L, np.array([int(i==0) for i in range(64)],dtype=np.complex_))
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27]))
Fluovector.append(Fluo)
return Fluovector
# @njit
# def lolo():
# L = FullL_MM(100,200,12,123,14)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment