Commit 19fbd62a authored by Nicolas Nunez Barreto's avatar Nicolas Nunez Barreto

todo dd la compu

parent 03827e15
...@@ -469,6 +469,8 @@ ErrorDetuningfits = [np.sqrt(pcov_12)[3,3], np.sqrt(pcov_13)[3,3],np.sqrt(pcov_1 ...@@ -469,6 +469,8 @@ ErrorDetuningfits = [np.sqrt(pcov_12)[3,3], np.sqrt(pcov_13)[3,3],np.sqrt(pcov_1
ErrorPotIRfits = [np.sqrt(pcov_12)[2,2], np.sqrt(pcov_13)[2,2],np.sqrt(pcov_14)[2,2], np.sqrt(pcov_15)[2,2]] ErrorPotIRfits = [np.sqrt(pcov_12)[2,2], np.sqrt(pcov_13)[2,2],np.sqrt(pcov_14)[2,2], np.sqrt(pcov_15)[2,2]]
ErrorPotUVfits = [np.sqrt(pcov_12)[1,1], np.sqrt(pcov_13)[1,1],np.sqrt(pcov_14)[1,1], np.sqrt(pcov_15)[1,1]] ErrorPotUVfits = [np.sqrt(pcov_12)[1,1], np.sqrt(pcov_13)[1,1],np.sqrt(pcov_14)[1,1], np.sqrt(pcov_15)[1,1]]
ErrorLarmorsvecs = [np.sqrt(pcov_12)[0,0], np.sqrt(pcov_13)[0,0],np.sqrt(pcov_14)[0,0], np.sqrt(pcov_15)[0,0]]
print(Detuningsfits) print(Detuningsfits)
print(PotIRfits) print(PotIRfits)
print(PotUVfits) print(PotUVfits)
...@@ -522,6 +524,17 @@ plt.plot(freqslongpi_15, FittedEITpi_15) ...@@ -522,6 +524,17 @@ plt.plot(freqslongpi_15, FittedEITpi_15)
#%% #%%
#filtro y mejoro el plot #filtro y mejoro el plot
"""
Figura 4 del paper (apendice)
"""
Ufields = [popt_12[0], popt_13[0], popt_14[0], popt_15[0]]
ErrorUfields = [np.sqrt(pcov_12)[0,0], np.sqrt(pcov_13)[0,0],np.sqrt(pcov_14)[0,0], np.sqrt(pcov_15)[0,0]]
Bfields = [u/(2*np.pi)/1398190 for u in Ufields]
ErrorBfields = [eu/(2*np.pi)/1398190 for eu in ErrorUfields]
from scipy.signal import savgol_filter as sf from scipy.signal import savgol_filter as sf
import seaborn as sns import seaborn as sns
...@@ -548,10 +561,9 @@ FiltCounts15 = np.array([(c-offs)*100/scal for c in sf(CountsDRpi_15, winl, po)] ...@@ -548,10 +561,9 @@ FiltCounts15 = np.array([(c-offs)*100/scal for c in sf(CountsDRpi_15, winl, po)]
ErrorCounts15 = np.array([0.5*np.sqrt(c/scal) for c in sf(CountsDRpi_15, winl, po)]) ErrorCounts15 = np.array([0.5*np.sqrt(c/scal) for c in sf(CountsDRpi_15, winl, po)])
#plot con escalas atomicas y lindo #plot con escalas atomicas y lindo
colors=sns.color_palette("rocket", 10) colors=sns.color_palette("mako", 10)
color1=colors[1] color1=colors[1]
color2=colors[2] color2=colors[2]
...@@ -562,10 +574,10 @@ ms = 4 ...@@ -562,10 +574,10 @@ ms = 4
plt.figure(figsize=(3.5, 3)) plt.figure(figsize=(3.5, 3))
plt.plot(FreqsDRpi_12, FiltCounts12, 'o', markersize=ms, color=color1, label=r'$S_{rep}=6.31$', alpha=0.3) plt.plot(FreqsDRpi_12, FiltCounts12, 'o', markersize=ms, color=color1, label=fr'$B=${round(1e3*Bfields[0])}({round(1e3*ErrorBfields[0])}) mG', alpha=0.3)
plt.plot(FreqsDRpi_13, FiltCounts13, 'o', markersize=ms, color=color2, label=r'$S_{rep}=6.31$', alpha=0.3) plt.plot(FreqsDRpi_13, FiltCounts13, 'o', markersize=ms, color=color2, label=fr'$B=${round(1e3*Bfields[1])}({round(1e3*ErrorBfields[1])}) mG', alpha=0.3)
plt.plot(FreqsDRpi_14, FiltCounts14, 'o', markersize=ms, color=color3, label=r'$S_{rep}=6.31$', alpha=0.3) plt.plot(FreqsDRpi_14, FiltCounts14, 'o', markersize=ms, color=color3, label=fr'$B=${round(1e3*Bfields[2])}({round(1e3*ErrorBfields[2])}) mG', alpha=0.3)
plt.plot(FreqsDRpi_15, FiltCounts15, 'o', markersize=ms, color=color4, label=r'$S_{rep}=6.31$', alpha=0.3) plt.plot(FreqsDRpi_15, FiltCounts15, 'o', markersize=ms, color=color4, label=fr'$B=${round(1e3*Bfields[3])}({round(1e3*ErrorBfields[3])}) mG', alpha=0.3)
plt.plot(freqslongpi_12, [(c-offs)*100/scal for c in FittedEITpi_12], color=color1, linewidth=3) plt.plot(freqslongpi_12, [(c-offs)*100/scal for c in FittedEITpi_12], color=color1, linewidth=3)
plt.plot(freqslongpi_13, [(c-offs)*100/scal for c in FittedEITpi_13], color=color2, linewidth=3) plt.plot(freqslongpi_13, [(c-offs)*100/scal for c in FittedEITpi_13], color=color2, linewidth=3)
...@@ -578,12 +590,22 @@ plt.fill_between(FreqsDRpi_14, FiltCounts14+ErrorCounts14, FiltCounts14-ErrorCou ...@@ -578,12 +590,22 @@ plt.fill_between(FreqsDRpi_14, FiltCounts14+ErrorCounts14, FiltCounts14-ErrorCou
plt.fill_between(FreqsDRpi_15, FiltCounts15+ErrorCounts15, FiltCounts15-ErrorCounts15, color=color4, alpha=0.2) plt.fill_between(FreqsDRpi_15, FiltCounts15+ErrorCounts15, FiltCounts15-ErrorCounts15, color=color4, alpha=0.2)
plt.xlim(-40,30) plt.xlim(-40,30)
plt.xlabel('Repump detuning (MHz)', fontsize=11) plt.ylim(-0.1,1.4)
plt.ylabel('Normalized fluorescence', fontsize=11) plt.xlabel('Repump detuning (MHz)', fontsize=12, fontname='STIXgeneral')
plt.ylabel('Normalized fluorescence', fontsize=12, fontname='STIXgeneral')
plt.xticks([-40, -20, 0, 20], fontsize=12, fontname='STIXgeneral')
plt.yticks([0, 0.3, 0.6, 0.9, 1.2], fontsize=12, fontname='STIXgeneral')
visible_ticks = {
"top": False,
"right": False
}
plt.tick_params(axis="x", which="both", **visible_ticks)
plt.tick_params(axis="y", which="both", **visible_ticks)
#plt.legend(loc='upper left', frameon=True, fontsize=7.6, handletextpad=0.1)
plt.grid() plt.grid()
plt.tight_layout() plt.tight_layout()
#plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Work/2022 B vs k race/Figuras/Figuras jpg trabajadas/CPT_exp.png',dpi=500) #plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Work/2022 B vs k race/Figuras/Figuras jpg trabajadas/CPT_exp.png',dpi=500)
#plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig3_final.pdf')
#%% #%%
from scipy.optimize import curve_fit from scipy.optimize import curve_fit
...@@ -611,8 +633,8 @@ IFit = [-1.2, -1.5, -1.75, -2] ...@@ -611,8 +633,8 @@ IFit = [-1.2, -1.5, -1.75, -2]
LarmorFit = [popt_12[0], popt_13[0], popt_14[0], popt_15[0]] LarmorFit = [popt_12[0], popt_13[0], popt_14[0], popt_15[0]]
#LarmorFit = [287282.374931893, 203998.09641511342, 158507.0255951109] por si fallan los ajustes #LarmorFit = [287282.374931893, 203998.09641511342, 158507.0255951109] por si fallan los ajustes
MeanError = np.mean([np.sqrt(pcov_12[0,0]),np.sqrt(pcov_13[0,0]),np.sqrt(pcov_14[0,0]),np.sqrt(pcov_15[0,0])]) ErrorLarmorFit = [np.sqrt(pcov_12[0,0]),np.sqrt(pcov_13[0,0]),np.sqrt(pcov_14[0,0]),np.sqrt(pcov_15[0,0])]
#MeanError = 11139.353180216529 por si fallan los ajustes MeanError = 11139.353180216529 #por si fallan los ajustes
Ilong = np.arange(2, -3, -0.01) Ilong = np.arange(2, -3, -0.01)
popt_larmor, pcov_larmor = curve_fit(LinearLarmortoCurrent, IFit, LarmorFit) popt_larmor, pcov_larmor = curve_fit(LinearLarmortoCurrent, IFit, LarmorFit)
...@@ -625,14 +647,27 @@ plt.plot(IFit, LarmorFit, 'o', markersize=5) ...@@ -625,14 +647,27 @@ plt.plot(IFit, LarmorFit, 'o', markersize=5)
plt.plot(Ilong, LarmorLong) plt.plot(Ilong, LarmorLong)
Bfitted = [ConvertLarmortoBfield(u) for u in LarmorFit] Bfitted = [ConvertLarmortoBfield(u) for u in LarmorFit]
ErrorBfitted = [ConvertLarmortoBfield(u) for u in ErrorLarmorFit]
BLong = [ConvertLarmortoBfield(u) for u in LarmorLong] BLong = [ConvertLarmortoBfield(u) for u in LarmorLong]
#ESTE GRAFICO TIENE QUE IR EN LA TESIS CUANDO PONGA
#COMO CALIBRE EL CAMPO MAGNETICO CON LA CORRIENTE
plt.figure() plt.figure()
plt.plot(Ilong, BLong) plt.plot(Ilong, [b*1e3 for b in BLong])
plt.plot(IFit, Bfitted, 'o', markersize=8) plt.plot(IFit, [b*1e3 for b in Bfitted], 'o', markersize=8)
plt.xlim(-2.2,-1)
plt.ylim(0.012*1e3,0.045*1e3)
plt.xlabel('Corriente (A)') plt.xlabel('Corriente (A)')
plt.ylabel('Campo magnetico (G)') plt.ylabel('Campo magnetico (mG)')
plt.grid() plt.grid()
#%%
plt.figure()
plt.plot(Ilong, [b*1e-6 for b in LarmorLong])
plt.errorbar(IFit, [b*1e-6 for b in LarmorFit], yerr=1e-6*MeanError, fmt='o', capsize=4, markersize=4)
plt.xlim(-2.2,-1)
plt.ylim(0.1,0.43)
plt.xlabel('Coil current (A)')
plt.ylabel('Larmor frequency (MHz)')
plt.grid()
...@@ -163,6 +163,16 @@ def ConvertLarmortoBfield(u): ...@@ -163,6 +163,16 @@ def ConvertLarmortoBfield(u):
c = 1398190.0452488689 c = 1398190.0452488689
return u/(2*np.pi)/c return u/(2*np.pi)/c
def ConvertBfieldtoLarmor(B):
c = 1398190.0452488689
return B*(2*np.pi)*c
def ConvertToRabi(kk,gamma):
return np.sqrt(kk)*gamma
def ConvertToRabiSq(kk,gamma):
return kk*(gamma**2)
c = 1398190 c = 1398190
FluovsB = [] FluovsB = []
...@@ -173,14 +183,14 @@ Bvec = [ConvertLarmortoBfield(u) for u in LinearLarmortoCurrentCalibrated(np.arr ...@@ -173,14 +183,14 @@ Bvec = [ConvertLarmortoBfield(u) for u in LinearLarmortoCurrentCalibrated(np.arr
for j in jselected: for j in jselected:
FluovsB.append(IR_fluorescence_vec[j]) FluovsB.append(IR_fluorescence_vec[j])
"""
plt.figure() # plt.figure()
for j in range(len(jselected)): # for j in range(len(jselected)):
plt.plot(PotenciasIR, sf([f-bkgr for f in FluovsB[j]], 13, 3), 'o') # plt.plot(PotenciasIR, sf([f-bkgr for f in FluovsB[j]], 13, 3), 'o')
plt.xlim(0, 90) # plt.xlim(0, 90)
plt.xlabel('Potencia IR (uW)') # plt.xlabel('Potencia IR (uW)')
plt.ylabel('Cuentas') # plt.ylabel('Cuentas')
"""
MaxsFluosExp = [] MaxsFluosExp = []
MaxsPotsExp = [] MaxsPotsExp = []
...@@ -201,13 +211,13 @@ for k in range(len(jselected)): ...@@ -201,13 +211,13 @@ for k in range(len(jselected)):
MaxsFluosExp.append(0) MaxsFluosExp.append(0)
MaxsPotsExp.append(0) MaxsPotsExp.append(0)
"""
plt.figure() # plt.figure()
plt.plot(Ivec, MaxsPotsExp,'rx') # plt.plot(Ivec, MaxsPotsExp,'rx')
plt.xlabel('Corriente bobina (A)') # plt.xlabel('Corriente bobina (A)')
plt.ylabel('Potencia umbral (mW)') # plt.ylabel('Potencia umbral (mW)')
plt.grid() # plt.grid()
"""
#longBvec = np.arange(np.min(Bvec), np.max(Bvec), 0.1*Bvec[1]-0.1*Bvec[0]) #longBvec = np.arange(np.min(Bvec), np.max(Bvec), 0.1*Bvec[1]-0.1*Bvec[0])
longBvec = np.arange(-0.005, 0.033, 0.01*Bvec[1]-0.01*Bvec[0]) longBvec = np.arange(-0.005, 0.033, 0.01*Bvec[1]-0.01*Bvec[0])
...@@ -226,38 +236,75 @@ print(popt_expvspot) ...@@ -226,38 +236,75 @@ print(popt_expvspot)
#%% #%%
''' '''
Figura paper. Umbral vs campo magnetico con la calibracion y la teoria superpuesta (la teoria sale de threeLevel_2repumps_CPTPlotter.py de Figura CPT Teorica) Figura 2b) del paper. Umbral vs campo magnetico con la calibracion y la teoria superpuesta (la teoria sale de threeLevel_2repumps_CPTPlotter.py de Figura CPT Teorica)
''' '''
propor = LinearFitPotvsB(longBvec, *popt_expvspot)[-1]/RabiVector[0][-1] #esto viene del threeLevel_2repumps_CPTPlotter.py de Figura CPT Teorica de la carpeta Work (no de Papers) def LinearFitPotvsB(b, pendiente):
#ordenada=0
return pendiente*b
#CamposVector2 = np.loadtxt('CamposVector.txt')
#RabiVector2 = np.loadtxt('RabiVector.txt')
propor = LinearFitPotvsB(longBvec, *popt_expvspot)[-1]/RabiVector2[-1] #esto lo cargo con las lineas de antes
#propor = LinearFitPotvsB(longBvec, *popt_expvspot)[-1]/RabiVector[0][-1] #esto viene del threeLevel_2repumps_CPTPlotter.py de Figura CPT Teorica de la carpeta Work (no de Papers)
#colores=sns.color_palette("mako") #
colores=sns.color_palette("rocket") colores=sns.color_palette("rocket")
MeanError = 11139.353180216529
plotFreqFreq = False
plt.figure(figsize=(3.5, 3)) plt.figure(figsize=(3.5, 3))
plt.errorbar([b*1e3 for b in Bvec], MaxsPotsExp/propor, xerr=1e3*MeanError/(2*np.pi)/c, yerr=yerr0/propor, color=colores[0], fmt="o", markersize=4, zorder=3, elinewidth=1)
#plt.plot([0],[0],'o', markersize=5) if plotFreqFreq == True:
#plt.plot([b*1e3 for b in longBvec], LinearFitPotvsB(longBvec, *popt_expvspot), linewidth=1., color=colores[3]) plt.errorbar([f*1e-6 for f in ConvertBfieldtoLarmor(np.array([b*1e3 for b in Bvec]))], [c*1e-6 for c in ConvertToRabi(MaxsPotsExp/propor, 2*np.pi*1.35e6)], xerr=1e-3*MeanError, yerr=1e-6*ConvertToRabi(yerr0, 2*np.pi*1.35e6)/propor, color=colores[0], fmt="o", markersize=4, zorder=3, elinewidth=1)
plt.plot(CamposVector[0], RabiVector[0], linewidth=1., color=colores[3]) #esto viene del threeLevel_2repumps_CPTPlotter.py de Figura CPT Teorica plt.plot([f*1e-6 for f in ConvertBfieldtoLarmor(CamposVector2)], [c*1e-6 for c in ConvertToRabi(RabiVector2,2*np.pi*1.35e6)], linewidth=1., color=colores[3]) #esto viene del threeLevel_2repumps_CPTPlotter.py de Figura CPT Teorica
plt.xlabel('Magnetic field (mG)', fontsize=12, fontname='STIXGeneral') plt.ylabel(r'Rabi Frequency (MHz)', fontsize=12, fontname='STIXGeneral')
#plt.ylabel('Threshold power (mW)', fontsize=11, fontname='STIXGeneral')
plt.ylabel(r'$\left(\Omega_{DP}/\Gamma_{\mathrm{DP}}\right)^2$', fontsize=12, fontname='STIXGeneral') else:
plt.xticks([0,5,10,15,20,25,30], fontsize=12, fontname='STIXGeneral') #plt.errorbar([b*1e3 for b in Bvec], MaxsPotsExp/propor, xerr=1e3*MeanError/(2*np.pi)/c, yerr=yerr0/propor, color=colores[0], fmt="o", markersize=4, zorder=3, elinewidth=1)
plt.yticks([0.,0.5,1.,1.5,2.], fontsize=12, fontname='STIXGeneral') plt.errorbar([f*1e-6 for f in ConvertBfieldtoLarmor(np.array([b*1e0 for b in Bvec]))], [c*1e-12/((2*np.pi)**2) for c in ConvertToRabiSq(np.array(MaxsPotsExp)/propor, 2*np.pi*1.35e6)], xerr=1e-6*MeanError, yerr=(1e-12/((2*np.pi)**2))*ConvertToRabiSq(yerr0, 2*np.pi*1.35e6)/propor, color=colores[0], fmt="o", markersize=4, zorder=3, elinewidth=1)
plt.xlim(0,32) plt.plot([f*1e-9 for f in ConvertBfieldtoLarmor(CamposVector2)], [r*1e-12/((2*np.pi)**2) for r in ConvertToRabiSq(RabiVector2,2*np.pi*1.35e6)], linestyle='dashed', linewidth=1., color='grey') #esto viene del threeLevel_2repumps_CPTPlotter.py de Figura CPT Teorica
#plt.ylim(0,81) #plt.ylabel(r'Rabi Frequency Squared (MHz$^2$)', fontsize=12, fontname='STIXGeneral')
plt.ylabel(r'$\Omega_{\mathrm{DP}}^2$ (MHz$^2$)', fontsize=12, fontname='STIXGeneral')
# plt.plot([f*1e-6 for f in ConvertBfieldtoLarmor(np.array([b*1e3 for b in Bvec]))], MaxsPotsExp,"o", color=colores[0], markersize=4, zorder=3)
# plt.ylim(0,80)
# plt.xlim(0,270)
#plt.plot([f*1e-6 for f in ConvertBfieldtoLarmor(CamposVector2)], [c*1e-6 for c in ConvertToRabi(RabiVector2,2*np.pi*1.35e6)], linewidth=1., color=colores[3]) #esto viene del threeLevel_2repumps_CPTPlotter.py de Figura CPT Teorica
plt.xlabel('Larmor Frequency (MHz)', fontsize=12, fontname='STIXGeneral')
plt.xlim(0,0.27)
plt.xticks([0, 0.05, 0.1, 0.15, 0.2, 0.25], fontsize=12,fontname='STIXGeneral')
plt.yticks([0, 1, 2, 3, 4], fontsize=12,fontname='STIXGeneral')
plt.ylim(0,4.1)
plt.grid() plt.grid()
plt.tight_layout() plt.tight_layout()
#plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Work/2022 B vs k race/Figuras/Figuras jpg trabajadas/umbralvsB_exp.png',dpi=500) #plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Work/2022 B vs k race/Figuras/Figuras jpg trabajadas/umbralvsB_exp.png',dpi=500)
plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/thresholdvsB_exp.pdf') plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig2b_v2.pdf')
#%% #%%
''' '''
Figura paper. Curvas de fluorescencia vs potencia del IR Figura 2a) del paper. Curvas de fluorescencia vs potencia del IR
''' '''
from scipy.signal import savgol_filter as sf
# FluoSel = IR_fluorescence_vec[0][1:]
# PotsSel = PotenciasIR[1:]
# popt, pcov = curve_fit(FuncTest, PotsSel, FluoSel,p0=(1000,500,0,100,0))
def find_nearest(array, value): def find_nearest(array, value):
array = np.asarray(array) array = np.asarray(array)
idx = (np.abs(array - value)).argmin() idx = (np.abs(array - value)).argmin()
...@@ -291,6 +338,11 @@ PotenciasMaximos_parcial = MaxsPotsExp/propor ...@@ -291,6 +338,11 @@ PotenciasMaximos_parcial = MaxsPotsExp/propor
PotenciasMaximos = [PotenciasMaximos_parcial[6],PotenciasMaximos_parcial[2],PotenciasMaximos_parcial[1],PotenciasMaximos_parcial[0]] PotenciasMaximos = [PotenciasMaximos_parcial[6],PotenciasMaximos_parcial[2],PotenciasMaximos_parcial[1],PotenciasMaximos_parcial[0]]
def FuncTest(rsq, A, det, delta, g):
c=1
return A*(((0.25*g*g+det*det+(2/3)*delta*delta)/(c*rsq))+6*c*rsq/(delta*delta))**(-1)
smoothen_order = [3,3,3,1] smoothen_order = [3,3,3,1]
err = [2,1,1,1] err = [2,1,1,1]
orden=5 orden=5
...@@ -302,9 +354,17 @@ for j in range(len(jselected)): ...@@ -302,9 +354,17 @@ for j in range(len(jselected)):
cuentas = np.array(rawcuentas[0:3]+list(sf(rawcuentas[3:],13,smoothen_order[j]))) #este va bien cuentas = np.array(rawcuentas[0:3]+list(sf(rawcuentas[3:],13,smoothen_order[j]))) #este va bien
#maximumfluo_index = np.array(cuentas[1:-1]).argmax() #maximumfluo_index = np.array(cuentas[1:-1]).argmax()
maximumfluo_index = find_nearest(PotenciasIR[1:-1]/propor, PotenciasMaximos[j]) maximumfluo_index = find_nearest(PotenciasIR[1:-1]/propor, PotenciasMaximos[j])
plt.plot(PotenciasIR[1:-1]/propor, cuentas[1:-1]/1000, 'o', color=colorsselected[j], markersize=3.5, label=f"$B={int(round(Bfields[j],0))}({err[j]})$ mG",zorder=orden)
plt.vlines(x=(1/propor)*PotenciasIR[1:-1][maximumfluo_index],ymin=0,ymax=cuentas[1:-1][maximumfluo_index]/1000,color=colorsselected[j],zorder=1,linewidth=2) popt, pcov = curve_fit(FuncTest, PotenciasIR[1:-1]/propor, cuentas[1:-1]/1000, p0=(1e5,1.5,1e-2,3.5e2), bounds=((7e4,1.49,0,3.5e2),(2e5,1.51,1e6,3.501e2)))
plt.fill_between(PotenciasIR[1:-1]/propor, (cuentas[1:-1]-1*np.sqrt(cuentas)[1:-1])/1000, (cuentas[1:-1]+1*np.sqrt(cuentas)[1:-1])/1000, color=colorsselected[j], alpha=0.4, zorder=orden) print(popt)
#[r*1e-12 for r in ConvertToRabiSq( ,2*np.pi*1.35e6)]
#PotsLong = np.arange(0*np.min(PotenciasIR[1:-1]/propor), np.max(PotenciasIR[1:-1]/propor),0.01)
PotsLong = np.arange(0*np.min(PotenciasIR[1:-1]/propor), np.max(PotenciasIR[1:-1]/propor),0.01)
#plt.plot([(r/((2*np.pi)**2))*1e-12 for r in ConvertToRabiSq(PotsLong,2*np.pi*1.35e6)],FuncTest(np.array(PotsLong),*popt),color=colorsselected[j], linewidth=0.9, zorder=5)
plt.plot([(r/((2*np.pi)**2))*1e-12 for r in ConvertToRabiSq(PotsLong,2*np.pi*1.35e6)],FuncTest(np.array(PotsLong),*popt),color=colorsselected[j], linestyle=(0,(5,1)), linewidth=0.9, zorder=5)
plt.plot([(r/((2*np.pi)**2))*1e-12 for r in ConvertToRabiSq(PotenciasIR[1:-1]/propor,2*np.pi*1.35e6)], cuentas[1:-1]/1000, 'o', color=colorsselected[j], markersize=1.5, alpha=0.9, label=fr"$B={int(round(Bfields[j],0))}({err[j]})$"+r" $\mathrm{mG}$",zorder=orden)
plt.vlines(x=((2*np.pi*1.35e6)**2)*(1e-12/(propor*(((2*np.pi)**2))))*PotenciasIR[1:-1][maximumfluo_index],ymin=0.2,ymax=cuentas[1:-1][maximumfluo_index]/1000,color=colorsselected[j],zorder=1,linewidth=1, linestyle='dotted')
plt.fill_between([(r/((2*np.pi)**2))*1e-12 for r in ConvertToRabiSq(PotenciasIR[1:-1]/propor,2*np.pi*1.35e6)], (cuentas[1:-1]-1*np.sqrt(cuentas)[1:-1])/1000, (cuentas[1:-1]+1*np.sqrt(cuentas)[1:-1])/1000, color=colorsselected[j], alpha=0.3, zorder=orden)
orden=orden-1 orden=orden-1
#plt.errorbar(PotenciasIR, cuentas, yerr=1*np.sqrt(cuentas), color='r', fmt='o', capsize=2, markersize=4) #plt.errorbar(PotenciasIR, cuentas, yerr=1*np.sqrt(cuentas), color='r', fmt='o', capsize=2, markersize=4)
...@@ -315,15 +375,16 @@ for j in range(len(jselected)): ...@@ -315,15 +375,16 @@ for j in range(len(jselected)):
# plt.axvline(pot) # plt.axvline(pot)
plt.grid() plt.grid()
plt.xlabel(r'Laser intensity $\left(\Omega_{\mathrm{DP}}/\Gamma_{\mathrm{DP}}\right)^2$', fontsize=12, fontname='STIXGeneral') plt.xlabel(r'$\Omega_{\mathrm{DP}}^2$ (MHz$^2$)', fontsize=12, fontname='STIXGeneral')
#plt.xlabel(r'$\Gamma$', fontsize=12, fontname='STIXGeneral') #plt.xlabel(r'$\Gamma$', fontsize=12, fontname='STIXGeneral')
plt.ylabel('Fluorescence (kcounts/s)', fontsize=12, fontname='STIXGeneral') plt.ylabel('Fluorescence (kcounts/s)', fontsize=12, fontname='STIXGeneral')
plt.xticks([0.,0.5,1.,1.5,2.], fontsize=12, fontname='STIXGeneral') plt.xticks([0, 1, 2, 3, 4], fontsize=12, fontname='STIXGeneral')
plt.yticks([0,1,2,3], fontsize=12, fontname='STIXGeneral') plt.yticks([0,1,2,3], fontsize=12, fontname='STIXGeneral')
plt.ylim(0,3.7) plt.ylim(0,3.7)
#plt.xlim(0,2.3)
plt.tight_layout() plt.tight_layout()
plt.legend(loc='upper left', frameon=True, fontsize=7, handletextpad=0.1) #plt.legend(loc='upper left', frameon=True, fontsize=7.6, handletextpad=0.1)
#plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Measurement_thresholds_v2.pdf') plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig2a_v2.pdf')
......
0.000000000000000000e+00
1.138292635058539559e-01
2.276585270117079118e-01
3.414877905175618955e-01
4.553170540234158237e-01
5.691463175292698073e-01
6.829755810351237910e-01
7.968048445409777747e-01
9.106341080468316473e-01
1.024463371552685631e+00
1.138292635058539615e+00
1.252121898564393598e+00
1.365951162070247582e+00
1.479780425576101566e+00
1.593609689081955549e+00
1.707438952587809311e+00
1.821268216093663295e+00
1.935097479599517500e+00
2.048926743105371262e+00
2.162756006611225246e+00
2.276585270117079229e+00
2.390414533622933213e+00
2.504243797128787197e+00
2.618073060634641180e+00
2.731902324140495164e+00
2.845731587646348704e+00
2.959560851152203131e+00
3.073390114658057115e+00
3.187219378163911099e+00
3.301048641669765082e+00
3.414877905175618622e+00
3.528707168681472606e+00
3.642536432187326589e+00
3.756365695693181017e+00
3.870194959199035001e+00
3.984024222704888540e+00
4.097853486210742524e+00
4.211682749716596952e+00
4.325512013222450491e+00
4.439341276728304919e+00
4.553170540234158459e+00
4.666999803740012887e+00
4.780829067245866426e+00
4.894658330751719966e+00
5.008487594257574393e+00
5.122316857763427933e+00
5.236146121269282361e+00
5.349975384775135900e+00
5.463804648280990328e+00
5.577633911786843868e+00
5.691463175292697407e+00
5.805292438798551835e+00
5.919121702304406263e+00
6.032950965810260691e+00
6.146780229316114230e+00
6.260609492821967770e+00
6.374438756327822198e+00
6.488268019833675737e+00
6.602097283339530165e+00
6.715926546845383704e+00
6.829755810351237244e+00
6.943585073857091672e+00
7.057414337362945211e+00
7.171243600868799639e+00
7.285072864374653179e+00
7.398902127880506718e+00
7.512731391386362034e+00
7.626560654892215574e+00
7.740389918398070002e+00
7.854219181903923541e+00
7.968048445409777081e+00
8.081877708915630620e+00
8.195706972421485048e+00
8.309536235927339476e+00
8.423365499433193904e+00
8.537194762939046555e+00
8.651024026444900983e+00
8.764853289950755411e+00
8.878682553456609838e+00
8.992511816962462490e+00
9.106341080468316918e+00
9.220170343974169569e+00
9.333999607480025773e+00
9.447828870985878424e+00
9.561658134491732852e+00
9.675487397997585504e+00
9.789316661503439931e+00
9.903145925009294359e+00
1.001697518851514879e+01
1.013080445202100321e+01
1.024463371552685587e+01
1.035846297903271029e+01
1.047229224253856472e+01
1.058612150604441915e+01
1.069995076955027180e+01
1.081378003305612623e+01
1.092760929656198066e+01
1.104143856006783508e+01
1.115526782357368774e+01
1.126909708707954216e+01
1.138292635058539481e+01
1.149675561409125102e+01
1.161058487759710367e+01
1.172441414110295810e+01
1.183824340460881253e+01
1.195207266811466518e+01
1.206590193162052138e+01
1.217973119512637403e+01
1.229356045863222846e+01
1.240738972213808111e+01
1.252121898564393554e+01
1.263504824914978997e+01
1.274887751265564440e+01
1.286270677616149705e+01
1.297653603966735147e+01
1.309036530317320413e+01
1.320419456667906033e+01
1.331802383018491476e+01
1.343185309369076741e+01
1.354568235719662184e+01
1.365951162070247449e+01
1.377334088420833069e+01
1.388717014771418334e+01
1.400099941122003777e+01
1.411482867472589042e+01
1.422865793823174485e+01
1.434248720173759928e+01
1.445631646524345371e+01
1.457014572874930636e+01
1.468397499225516079e+01
1.479780425576101344e+01
1.491163351926686964e+01
1.502546278277272407e+01
1.513929204627857672e+01
1.525312130978443115e+01
1.536695057329028380e+01
1.548077983679614000e+01
1.559460910030199265e+01
1.570843836380784708e+01
1.582226762731370151e+01
1.593609689081955416e+01
1.604992615432540859e+01
1.616375541783126124e+01
1.627758468133711744e+01
1.639141394484297010e+01
1.650524320834882275e+01
1.661907247185467895e+01
1.673290173536053160e+01
1.684673099886638781e+01
1.696056026237224046e+01
1.707438952587809311e+01
1.718821878938394931e+01
1.730204805288980197e+01
1.741587731639565462e+01
1.752970657990151082e+01
1.764353584340736347e+01
1.775736510691321968e+01
1.787119437041906878e+01
1.798502363392492498e+01
1.809885289743078118e+01
1.821268216093663384e+01
1.832651142444249004e+01
1.844034068794833914e+01
1.855416995145419534e+01
1.866799921496005155e+01
1.878182847846590420e+01
1.889565774197175685e+01
1.900948700547760950e+01
1.912331626898346570e+01
1.923714553248932191e+01
1.935097479599517101e+01
1.946480405950102721e+01
1.957863332300687986e+01
1.969246258651273607e+01
1.980629185001858872e+01
1.992012111352444137e+01
2.003395037703029757e+01
2.014777964053615023e+01
2.026160890404200643e+01
2.037543816754785908e+01
2.048926743105371173e+01
2.060309669455956794e+01
2.071692595806542059e+01
2.083075522157127324e+01
2.094458448507712944e+01
2.105841374858298209e+01
2.117224301208883830e+01
2.128607227559468740e+01
2.139990153910054360e+01
2.151373080260639981e+01
2.162756006611225246e+01
2.174138932961810866e+01
2.185521859312396131e+01
2.196904785662981396e+01
2.208287712013567017e+01
2.219670638364152282e+01
2.231053564714737547e+01
2.242436491065323168e+01
2.253819417415908433e+01
2.265202343766494053e+01
2.276585270117078963e+01
2.287968196467664583e+01
2.299351122818250204e+01
2.310734049168835469e+01
2.322116975519420734e+01
2.333499901870005999e+01
2.344882828220591620e+01
2.356265754571177240e+01
2.367648680921762505e+01
2.379031607272347770e+01
2.390414533622933035e+01
2.401797459973518656e+01
2.413180386324104276e+01
2.424563312674689186e+01
2.435946239025274807e+01
2.447329165375860072e+01
2.458712091726445692e+01
2.470095018077030957e+01
2.481477944427616222e+01
2.492860870778201843e+01
2.504243797128787108e+01
2.515626723479372728e+01
2.527009649829957993e+01
2.538392576180543259e+01
2.549775502531128879e+01
2.561158428881714144e+01
2.572541355232299409e+01
2.583924281582885030e+01
2.595307207933470295e+01
2.606690134284055915e+01
2.618073060634640825e+01
2.629455986985226446e+01
2.640838913335812066e+01
2.652221839686397331e+01
2.663604766036982952e+01
2.674987692387567861e+01
2.686370618738153482e+01
2.697753545088739102e+01
2.709136471439324367e+01
2.720519397789909632e+01
2.731902324140494898e+01
2.743285250491080518e+01
2.754668176841666138e+01
2.766051103192251048e+01
2.777434029542836669e+01
2.788816955893421934e+01
2.800199882244007554e+01
2.811582808594592819e+01
2.822965734945178085e+01
2.834348661295763705e+01
2.845731587646348970e+01
2.857114513996934591e+01
2.868497440347519856e+01
2.879880366698105121e+01
2.891263293048690741e+01
2.902646219399276006e+01
2.914029145749861271e+01
2.925412072100446892e+01
2.936794998451032157e+01
2.948177924801617777e+01
2.959560851152202687e+01
2.970943777502788308e+01
2.982326703853373928e+01
2.993709630203959193e+01
3.005092556554544814e+01
3.016475482905129724e+01
3.027858409255715344e+01
3.039241335606300964e+01
3.050624261956886230e+01
3.062007188307471495e+01
3.073390114658056760e+01
3.084773041008642380e+01
3.096155967359228001e+01
3.107538893709812911e+01
3.118921820060398531e+01
3.130304746410984151e+01
3.141687672761569416e+01
3.153070599112154682e+01
3.164453525462740302e+01
3.175836451813325567e+01
3.187219378163910832e+01
3.198602304514496808e+01
3.209985230865081718e+01
3.221368157215667338e+01
3.232751083566252248e+01
3.244134009916837869e+01
3.255516936267423489e+01
3.266899862618008399e+01
3.278282788968594019e+01
3.289665715319179640e+01
-9.606361638711223561e-04
6.949744969572168099e-03
1.486012610301545855e-02
2.277050723645875421e-02
3.068088836990203946e-02
3.859126950334533512e-02
4.650165063678862731e-02
5.441203177023191950e-02
6.232241290367519782e-02
7.023279403711850388e-02
7.814317517056178219e-02
8.605355630400507438e-02
9.396393743744838045e-02
1.018743185708916588e-01
1.097846997043349510e-01
1.176950808377782431e-01
1.256054619712215215e-01
1.335158431046648275e-01
1.414262242381081336e-01
1.493366053715513841e-01
1.572469865049946902e-01
1.651573676384379963e-01
1.730677487718812746e-01
1.809781299053245807e-01
1.888885110387678867e-01
1.967988921722111373e-01
2.047092733056544434e-01
2.126196544390977494e-01
2.205300355725410277e-01
2.284404167059843338e-01
2.363507978394276121e-01
2.442611789728708904e-01
2.521715601063141965e-01
2.600819412397575303e-01
2.679923223732008086e-01
2.759027035066440869e-01
2.838130846400874208e-01
2.917234657735306991e-01
2.996338469069739219e-01
3.075442280404172557e-01
3.154546091738605340e-01
3.233649903073038678e-01
3.312753714407471461e-01
3.391857525741904245e-01
3.470961337076337028e-01
3.550065148410769811e-01
3.629168959745203149e-01
3.708272771079635932e-01
3.787376582414069270e-01
3.866480393748502054e-01
3.945584205082934282e-01
4.024688016417367620e-01
4.103791827751800403e-01
4.182895639086233741e-01
4.261999450420666524e-01
4.341103261755099307e-01
4.420207073089532090e-01
4.499310884423964874e-01
4.578414695758398212e-01
4.657518507092830995e-01
4.736622318427263778e-01
4.815726129761697116e-01
4.894829941096129344e-01
4.973933752430562683e-01
5.053037563764994911e-01
5.132141375099428249e-01
5.211245186433861587e-01
5.290348997768293815e-01
5.369452809102727153e-01
5.448556620437160491e-01
5.527660431771592719e-01
5.606764243106024947e-01
5.685868054440459396e-01
5.764971865774891624e-01
5.844075677109324962e-01
5.923179488443757190e-01
6.002283299778189418e-01
6.081387111112623867e-01
6.160490922447056095e-01
6.239594733781489433e-01
6.318698545115921661e-01
6.397802356450353889e-01
6.476906167784788337e-01
6.556009979119220565e-01
6.635113790453653904e-01
6.714217601788086132e-01
6.793321413122519470e-01
6.872425224456952808e-01
6.951529035791385036e-01
7.030632847125818374e-01
7.109736658460250602e-01
7.188840469794683941e-01
7.267944281129117279e-01
7.347048092463550617e-01
7.426151903797982845e-01
7.505255715132415073e-01
7.584359526466849521e-01
7.663463337801281750e-01
7.742567149135715088e-01
7.821670960470147316e-01
7.900774771804579544e-01
7.979878583139013992e-01
8.058982394473446220e-01
8.138086205807879558e-01
8.217190017142311786e-01
8.296293828476744014e-01
8.375397639811178463e-01
8.454501451145610691e-01
8.533605262480044029e-01
8.612709073814476257e-01
8.691812885148909595e-01
8.770916696483342934e-01
8.850020507817775162e-01
8.929124319152208500e-01
9.008228130486640728e-01
9.087331941821074066e-01
9.166435753155507404e-01
9.245539564489939632e-01
9.324643375824372971e-01
9.403747187158805199e-01
9.482850998493238537e-01
9.561954809827671875e-01
9.641058621162105213e-01
9.720162432496537441e-01
9.799266243830969669e-01
9.878370055165403008e-01
9.957473866499836346e-01
1.003657767783426857e+00
1.011568148916869969e+00
1.019478530050313303e+00
1.027388911183756637e+00
1.035299292317199971e+00
1.043209673450643304e+00
1.051120054584086638e+00
1.059030435717529750e+00
1.066940816850973084e+00
1.074851197984416418e+00
1.082761579117859752e+00
1.090671960251303085e+00
1.098582341384746419e+00
1.106492722518189531e+00
1.114403103651632865e+00
1.122313484785075977e+00
1.130223865918519532e+00
1.138134247051962866e+00
1.146044628185405978e+00
1.153955009318849312e+00
1.161865390452292424e+00
1.169775771585735979e+00
1.177686152719179313e+00
1.185596533852622425e+00
1.193506914986065759e+00
1.201417296119508871e+00
1.209327677252952427e+00
1.217238058386395760e+00
1.225148439519838872e+00
1.233058820653282206e+00
1.240969201786725318e+00
1.248879582920168874e+00
1.256789964053612207e+00
1.264700345187055319e+00
1.272610726320498653e+00
1.280521107453941765e+00
1.288431488587385321e+00
1.296341869720828655e+00
1.304252250854271766e+00
1.312162631987715100e+00
1.320073013121158434e+00
1.327983394254601768e+00
1.335893775388045102e+00
1.343804156521488213e+00
1.351714537654931547e+00
1.359624918788374881e+00
1.367535299921818215e+00
1.375445681055261549e+00
1.383356062188704660e+00
1.391266443322147994e+00
1.399176824455591328e+00
1.407087205589034662e+00
1.414997586722477996e+00
1.422907967855921108e+00
1.430818348989364441e+00
1.438728730122807775e+00
1.446639111256251109e+00
1.454549492389694443e+00
1.462459873523137555e+00
1.470370254656581110e+00
1.478280635790024222e+00
1.486191016923467556e+00
1.494101398056910890e+00
1.502011779190354002e+00
1.509922160323797558e+00
1.517832541457240891e+00
1.525742922590684003e+00
1.533653303724127337e+00
1.541563684857570449e+00
1.549474065991014005e+00
1.557384447124457338e+00
1.565294828257900450e+00
1.573205209391343784e+00
1.581115590524786896e+00
1.589025971658230452e+00
1.596936352791673785e+00
1.604846733925116897e+00
1.612757115058560231e+00
1.620667496192003343e+00
1.628577877325446899e+00
1.636488258458890233e+00
1.644398639592333344e+00
1.652309020725776678e+00
1.660219401859219790e+00
1.668129782992663346e+00
1.676040164126106680e+00
1.683950545259549791e+00
1.691860926392993125e+00
1.699771307526436237e+00
1.707681688659879793e+00
1.715592069793323127e+00
1.723502450926766238e+00
1.731412832060209572e+00
1.739323213193652906e+00
1.747233594327096240e+00
1.755143975460539574e+00
1.763054356593982686e+00
1.770964737727426019e+00
1.778875118860869353e+00
1.786785499994312687e+00
1.794695881127756021e+00
1.802606262261199133e+00
1.810516643394642466e+00
1.818427024528085800e+00
1.826337405661529134e+00
1.834247786794972468e+00
1.842158167928415580e+00
1.850068549061858914e+00
1.857978930195302247e+00
1.865889311328745581e+00
1.873799692462188915e+00
1.881710073595632027e+00
1.889620454729075361e+00
1.897530835862518694e+00
1.905441216995962028e+00
1.913351598129405362e+00
1.921261979262848474e+00
1.929172360396292030e+00
1.937082741529735141e+00
1.944993122663178475e+00
1.952903503796621809e+00
1.960813884930064921e+00
1.968724266063508477e+00
1.976634647196951589e+00
1.984545028330394922e+00
1.992455409463838256e+00
2.000365790597281812e+00
2.008276171730725146e+00
2.016186552864168036e+00
2.024096933997611369e+00
2.032007315131055147e+00
2.039917696264498037e+00
2.047828077397941371e+00
2.055738458531384705e+00
2.063648839664828039e+00
2.071559220798271372e+00
2.079469601931714706e+00
2.087379983065158040e+00
2.095290364198600930e+00
2.103200745332044708e+00
2.111111126465488042e+00
2.119021507598930931e+00
2.126931888732374265e+00
2.134842269865817599e+00
2.142752650999260933e+00
2.150663032132704267e+00
2.158573413266147600e+00
2.166483794399590934e+00
2.174394175533034268e+00
2.182304556666477602e+00
2.190214937799920492e+00
2.198125318933364269e+00
2.206035700066807159e+00
2.213946081200250493e+00
2.221856462333694271e+00
2.229766843467137161e+00
2.237677224600580494e+00
2.245587605734023384e+00
2.253497986867467162e+00
2.261408368000910496e+00
2.269318749134353386e+00
2.277229130267797164e+00
2.285139511401240053e+00
...@@ -8,11 +8,12 @@ Created on Thu Aug 31 16:18:18 2023 ...@@ -8,11 +8,12 @@ Created on Thu Aug 31 16:18:18 2023
from scipy.special import jv from scipy.special import jv
import numpy as np import numpy as np
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
import seaborn as sns
def CPTMicromotionSpectra(det, A, beta, x0, x1): def CPTMicromotionSpectra(det, A, beta, x0, x1):
ftrap=22.1 ftrap=22.1
gamma=2 gamma=3
P = -A*(jv(0, beta)**2)/(((det-x0)**2)+(0.5*gamma)**2)+10 -A*(jv(0, beta)**2)/(((det-x1)**2)+(0.5*gamma)**2)+10-0.5*det P = -A*(jv(0, beta)**2)/(((det-x0)**2)+(0.5*gamma)**2)+10 -A*(jv(0, beta)**2)/(((det-x1)**2)+(0.5*gamma)**2)+10-0.007*det
i = 1 i = 1
#print(P) #print(P)
while i <= 10: while i <= 10:
...@@ -25,12 +26,15 @@ def CPTMicromotionSpectra(det, A, beta, x0, x1): ...@@ -25,12 +26,15 @@ def CPTMicromotionSpectra(det, A, beta, x0, x1):
detvec = np.arange(-50,50,0.1) detvec = np.arange(-50,50,0.1)
A=1 A=1
betavec=[0,0.5,1,1.5] betavec=[0,1.2]
x0=0 x0=-5
x1 = 10 x1 = 5
ii=0
plt.figure() plt.figure()
for beta in betavec: for beta in betavec:
plt.plot(detvec,CPTMicromotionSpectra(detvec,A,beta,x0,x1)) plt.plot(detvec,CPTMicromotionSpectra(detvec,A,beta,x0,x1),label=f'beta: {beta}')
ii=ii+1
plt.xlim(-50,50) plt.xlim(-50,50)
plt.ylim(18.5,20.5) plt.ylim(19.25,20.5)
plt.legend()
...@@ -8,7 +8,6 @@ from scipy.optimize import curve_fit ...@@ -8,7 +8,6 @@ from scipy.optimize import curve_fit
import os import os
from scipy import interpolate from scipy import interpolate
#Mediciones de CPT para campo magnetico bajo y terrestre
#/home/nico/Documents/artiq_experiments/analisis/plots/20220615_CPTvariandocompensacion/Data #/home/nico/Documents/artiq_experiments/analisis/plots/20220615_CPTvariandocompensacion/Data
...@@ -144,9 +143,9 @@ DR = [403.5,412.5,418,426.5] ...@@ -144,9 +143,9 @@ DR = [403.5,412.5,418,426.5]
for dr in DR: for dr in DR:
plt.axvline(dr,color='blue',linestyle='--',alpha=0.3) plt.axvline(dr,color='blue',linestyle='--',alpha=0.3)
#plt.axvline(dr+22,color='crimson',linestyle='--',alpha=0.3) plt.axvline(dr+22,color='crimson',linestyle='--',alpha=0.3)
plt.axvline(dr-22,color='red',linestyle='--') plt.axvline(dr-22,color='red',linestyle='--')
#plt.axvline(dr+44,color='red',linestyle='--') plt.axvline(dr+44,color='red',linestyle='--')
#plt.legend() #plt.legend()
...@@ -188,15 +187,24 @@ CountsDR = Counts[10] ...@@ -188,15 +187,24 @@ CountsDR = Counts[10]
freqslong = np.arange(min(FreqsDR), max(FreqsDR)+FreqsDR[1]-FreqsDR[0], 0.1*(FreqsDR[1]-FreqsDR[0])) freqslong = np.arange(min(FreqsDR), max(FreqsDR)+FreqsDR[1]-FreqsDR[0], 0.1*(FreqsDR[1]-FreqsDR[0]))
def FitEIT_MM(freqs, SCALE, OFFSET, SG, SP, BETA, TEMP):
BETA = 1.8
Detunings, Fluorescence = PerformExperiment_8levels(SG, SP, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, TEMP, alpha, phidoppler, titadoppler, phiprobe, titaprobe, BETA, drivefreq, min(freqs), max(freqs)+(freqs[1]-freqs[0]), freqs[1]-freqs[0], circularityprobe=CircPr, plot=False, solvemode=1, detpvec=None)
ScaledFluo = [f*SCALE + OFFSET for f in Fluorescence]
return ScaledFluo
def FitEIT_MM(freqs, SG, SP, SCALE1, SCALE2, OFFSET, BETA1, BETA2):
#BETA = 1.8
# SG = 0.6
# SP = 8.1
TEMP = 1e-3
Detunings, Fluorescence1 = PerformExperiment_8levels(SG, SP, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, TEMP, alpha, phidoppler, titadoppler, phiprobe, titaprobe, BETA1, drivefreq, min(freqs), max(freqs)+(freqs[1]-freqs[0]), freqs[1]-freqs[0], circularityprobe=CircPr, plot=False, solvemode=1, detpvec=None)
Detunings, Fluorescence2 = PerformExperiment_8levels(SG, SP, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, TEMP, alpha, phidoppler, titadoppler, phiprobe, titaprobe, BETA2, drivefreq, min(freqs), max(freqs)+(freqs[1]-freqs[0]), freqs[1]-freqs[0], circularityprobe=CircPr, plot=False, solvemode=1, detpvec=None)
popt, pcov = curve_fit(FitEIT_MM, FreqsDR, CountsDR, p0=[1e3, 1e4, 0.7, 5, 2, 5e-3], bounds=((0, 0, 0, 0, 0, 0), (1e5, 1e5, 1.5, 10, 3, 15e-3))) ScaledFluo1 = np.array([f*SCALE1 + OFFSET for f in Fluorescence1])
ScaledFluo2 = np.array([f*SCALE2 + OFFSET for f in Fluorescence2])
return ScaledFluo1+ScaledFluo2
popt, pcov = curve_fit(FitEIT_MM, FreqsDR, CountsDR, p0=[0.8, 8, 1e3, 1e3, 1e4, 1, 1], bounds=((0, 0, 0, 0, 0, 0, 0), (2, 15, 1e5, 1e5, 1e5, 10, 10)))
#array([7.12876797e-01, 7.92474752e+00, 4.29735308e+04, 1.74240582e+04,
#1.53401696e+03, 1.17073206e-06, 2.53804151e+00])
FittedEITpi = FitEIT_MM(freqslong, *popt) FittedEITpi = FitEIT_MM(freqslong, *popt)
plt.figure() plt.figure()
......
0.000000000000000000e+00
1.138292635058539559e-01
2.276585270117079118e-01
3.414877905175618955e-01
4.553170540234158237e-01
5.691463175292698073e-01
6.829755810351237910e-01
7.968048445409777747e-01
9.106341080468316473e-01
1.024463371552685631e+00
1.138292635058539615e+00
1.252121898564393598e+00
1.365951162070247582e+00
1.479780425576101566e+00
1.593609689081955549e+00
1.707438952587809311e+00
1.821268216093663295e+00
1.935097479599517500e+00
2.048926743105371262e+00
2.162756006611225246e+00
2.276585270117079229e+00
2.390414533622933213e+00
2.504243797128787197e+00
2.618073060634641180e+00
2.731902324140495164e+00
2.845731587646348704e+00
2.959560851152203131e+00
3.073390114658057115e+00
3.187219378163911099e+00
3.301048641669765082e+00
3.414877905175618622e+00
3.528707168681472606e+00
3.642536432187326589e+00
3.756365695693181017e+00
3.870194959199035001e+00
3.984024222704888540e+00
4.097853486210742524e+00
4.211682749716596952e+00
4.325512013222450491e+00
4.439341276728304919e+00
4.553170540234158459e+00
4.666999803740012887e+00
4.780829067245866426e+00
4.894658330751719966e+00
5.008487594257574393e+00
5.122316857763427933e+00
5.236146121269282361e+00
5.349975384775135900e+00
5.463804648280990328e+00
5.577633911786843868e+00
5.691463175292697407e+00
5.805292438798551835e+00
5.919121702304406263e+00
6.032950965810260691e+00
6.146780229316114230e+00
6.260609492821967770e+00
6.374438756327822198e+00
6.488268019833675737e+00
6.602097283339530165e+00
6.715926546845383704e+00
6.829755810351237244e+00
6.943585073857091672e+00
7.057414337362945211e+00
7.171243600868799639e+00
7.285072864374653179e+00
7.398902127880506718e+00
7.512731391386362034e+00
7.626560654892215574e+00
7.740389918398070002e+00
7.854219181903923541e+00
7.968048445409777081e+00
8.081877708915630620e+00
8.195706972421485048e+00
8.309536235927339476e+00
8.423365499433193904e+00
8.537194762939046555e+00
8.651024026444900983e+00
8.764853289950755411e+00
8.878682553456609838e+00
8.992511816962462490e+00
9.106341080468316918e+00
9.220170343974169569e+00
9.333999607480025773e+00
9.447828870985878424e+00
9.561658134491732852e+00
9.675487397997585504e+00
9.789316661503439931e+00
9.903145925009294359e+00
1.001697518851514879e+01
1.013080445202100321e+01
1.024463371552685587e+01
1.035846297903271029e+01
1.047229224253856472e+01
1.058612150604441915e+01
1.069995076955027180e+01
1.081378003305612623e+01
1.092760929656198066e+01
1.104143856006783508e+01
1.115526782357368774e+01
1.126909708707954216e+01
1.138292635058539481e+01
1.149675561409125102e+01
1.161058487759710367e+01
1.172441414110295810e+01
1.183824340460881253e+01
1.195207266811466518e+01
1.206590193162052138e+01
1.217973119512637403e+01
1.229356045863222846e+01
1.240738972213808111e+01
1.252121898564393554e+01
1.263504824914978997e+01
1.274887751265564440e+01
1.286270677616149705e+01
1.297653603966735147e+01
1.309036530317320413e+01
1.320419456667906033e+01
1.331802383018491476e+01
1.343185309369076741e+01
1.354568235719662184e+01
1.365951162070247449e+01
1.377334088420833069e+01
1.388717014771418334e+01
1.400099941122003777e+01
1.411482867472589042e+01
1.422865793823174485e+01
1.434248720173759928e+01
1.445631646524345371e+01
1.457014572874930636e+01
1.468397499225516079e+01
1.479780425576101344e+01
1.491163351926686964e+01
1.502546278277272407e+01
1.513929204627857672e+01
1.525312130978443115e+01
1.536695057329028380e+01
1.548077983679614000e+01
1.559460910030199265e+01
1.570843836380784708e+01
1.582226762731370151e+01
1.593609689081955416e+01
1.604992615432540859e+01
1.616375541783126124e+01
1.627758468133711744e+01
1.639141394484297010e+01
1.650524320834882275e+01
1.661907247185467895e+01
1.673290173536053160e+01
1.684673099886638781e+01
1.696056026237224046e+01
1.707438952587809311e+01
1.718821878938394931e+01
1.730204805288980197e+01
1.741587731639565462e+01
1.752970657990151082e+01
1.764353584340736347e+01
1.775736510691321968e+01
1.787119437041906878e+01
1.798502363392492498e+01
1.809885289743078118e+01
1.821268216093663384e+01
1.832651142444249004e+01
1.844034068794833914e+01
1.855416995145419534e+01
1.866799921496005155e+01
1.878182847846590420e+01
1.889565774197175685e+01
1.900948700547760950e+01
1.912331626898346570e+01
1.923714553248932191e+01
1.935097479599517101e+01
1.946480405950102721e+01
1.957863332300687986e+01
1.969246258651273607e+01
1.980629185001858872e+01
1.992012111352444137e+01
2.003395037703029757e+01
2.014777964053615023e+01
2.026160890404200643e+01
2.037543816754785908e+01
2.048926743105371173e+01
2.060309669455956794e+01
2.071692595806542059e+01
2.083075522157127324e+01
2.094458448507712944e+01
2.105841374858298209e+01
2.117224301208883830e+01
2.128607227559468740e+01
2.139990153910054360e+01
2.151373080260639981e+01
2.162756006611225246e+01
2.174138932961810866e+01
2.185521859312396131e+01
2.196904785662981396e+01
2.208287712013567017e+01
2.219670638364152282e+01
2.231053564714737547e+01
2.242436491065323168e+01
2.253819417415908433e+01
2.265202343766494053e+01
2.276585270117078963e+01
2.287968196467664583e+01
2.299351122818250204e+01
2.310734049168835469e+01
2.322116975519420734e+01
2.333499901870005999e+01
2.344882828220591620e+01
2.356265754571177240e+01
2.367648680921762505e+01
2.379031607272347770e+01
2.390414533622933035e+01
2.401797459973518656e+01
2.413180386324104276e+01
2.424563312674689186e+01
2.435946239025274807e+01
2.447329165375860072e+01
2.458712091726445692e+01
2.470095018077030957e+01
2.481477944427616222e+01
2.492860870778201843e+01
2.504243797128787108e+01
2.515626723479372728e+01
2.527009649829957993e+01
2.538392576180543259e+01
2.549775502531128879e+01
2.561158428881714144e+01
2.572541355232299409e+01
2.583924281582885030e+01
2.595307207933470295e+01
2.606690134284055915e+01
2.618073060634640825e+01
2.629455986985226446e+01
2.640838913335812066e+01
2.652221839686397331e+01
2.663604766036982952e+01
2.674987692387567861e+01
2.686370618738153482e+01
2.697753545088739102e+01
2.709136471439324367e+01
2.720519397789909632e+01
2.731902324140494898e+01
2.743285250491080518e+01
2.754668176841666138e+01
2.766051103192251048e+01
2.777434029542836669e+01
2.788816955893421934e+01
2.800199882244007554e+01
2.811582808594592819e+01
2.822965734945178085e+01
2.834348661295763705e+01
2.845731587646348970e+01
2.857114513996934591e+01
2.868497440347519856e+01
2.879880366698105121e+01
2.891263293048690741e+01
2.902646219399276006e+01
2.914029145749861271e+01
2.925412072100446892e+01
2.936794998451032157e+01
2.948177924801617777e+01
2.959560851152202687e+01
2.970943777502788308e+01
2.982326703853373928e+01
2.993709630203959193e+01
3.005092556554544814e+01
3.016475482905129724e+01
3.027858409255715344e+01
3.039241335606300964e+01
3.050624261956886230e+01
3.062007188307471495e+01
3.073390114658056760e+01
3.084773041008642380e+01
3.096155967359228001e+01
3.107538893709812911e+01
3.118921820060398531e+01
3.130304746410984151e+01
3.141687672761569416e+01
3.153070599112154682e+01
3.164453525462740302e+01
3.175836451813325567e+01
3.187219378163910832e+01
3.198602304514496808e+01
3.209985230865081718e+01
3.221368157215667338e+01
3.232751083566252248e+01
3.244134009916837869e+01
3.255516936267423489e+01
3.266899862618008399e+01
3.278282788968594019e+01
3.289665715319179640e+01
...@@ -88,8 +88,8 @@ def LtempCalculus(beta, drivefreq, forma=1): ...@@ -88,8 +88,8 @@ def LtempCalculus(beta, drivefreq, forma=1):
Hint = np.zeros((8, 8), dtype=np.complex_) Hint = np.zeros((8, 8), dtype=np.complex_)
ampg=beta*drivefreq ampg=beta*drivefreq
ampr=beta*drivefreq ampr=beta*drivefreq*(397/866)
#print('fixed')
Hint[0,0] = ampg Hint[0,0] = ampg
Hint[1,1] = ampg Hint[1,1] = ampg
Hint[4,4] = ampr Hint[4,4] = ampr
...@@ -282,7 +282,7 @@ def FullL(rabG, rabP, gPS = 0, gPD = 0, Detg = 0, Detp = 0, u = 0, lwg = 0, lwp ...@@ -282,7 +282,7 @@ def FullL(rabG, rabP, gPS = 0, gPD = 0, Detg = 0, Detp = 0, u = 0, lwg = 0, lwp
L0 = np.array(np.matrix(Lfullpartial) + M) L0 = np.array(np.matrix(Lfullpartial) + M)
#ESTA PARTE ES CUANDO AGREGAS MICROMOCION #ESTA PARTE ES CUANDO AGREGAS MICROMOCION
nmax = 7 nmax = 3
#print(nmax) #print(nmax)
Ltemp, Omega = LtempCalculus(beta, drivefreq) Ltemp, Omega = LtempCalculus(beta, drivefreq)
#print(factor) #print(factor)
......
-9.606361638711223561e-04
6.949744969572168099e-03
1.486012610301545855e-02
2.277050723645875421e-02
3.068088836990203946e-02
3.859126950334533512e-02
4.650165063678862731e-02
5.441203177023191950e-02
6.232241290367519782e-02
7.023279403711850388e-02
7.814317517056178219e-02
8.605355630400507438e-02
9.396393743744838045e-02
1.018743185708916588e-01
1.097846997043349510e-01
1.176950808377782431e-01
1.256054619712215215e-01
1.335158431046648275e-01
1.414262242381081336e-01
1.493366053715513841e-01
1.572469865049946902e-01
1.651573676384379963e-01
1.730677487718812746e-01
1.809781299053245807e-01
1.888885110387678867e-01
1.967988921722111373e-01
2.047092733056544434e-01
2.126196544390977494e-01
2.205300355725410277e-01
2.284404167059843338e-01
2.363507978394276121e-01
2.442611789728708904e-01
2.521715601063141965e-01
2.600819412397575303e-01
2.679923223732008086e-01
2.759027035066440869e-01
2.838130846400874208e-01
2.917234657735306991e-01
2.996338469069739219e-01
3.075442280404172557e-01
3.154546091738605340e-01
3.233649903073038678e-01
3.312753714407471461e-01
3.391857525741904245e-01
3.470961337076337028e-01
3.550065148410769811e-01
3.629168959745203149e-01
3.708272771079635932e-01
3.787376582414069270e-01
3.866480393748502054e-01
3.945584205082934282e-01
4.024688016417367620e-01
4.103791827751800403e-01
4.182895639086233741e-01
4.261999450420666524e-01
4.341103261755099307e-01
4.420207073089532090e-01
4.499310884423964874e-01
4.578414695758398212e-01
4.657518507092830995e-01
4.736622318427263778e-01
4.815726129761697116e-01
4.894829941096129344e-01
4.973933752430562683e-01
5.053037563764994911e-01
5.132141375099428249e-01
5.211245186433861587e-01
5.290348997768293815e-01
5.369452809102727153e-01
5.448556620437160491e-01
5.527660431771592719e-01
5.606764243106024947e-01
5.685868054440459396e-01
5.764971865774891624e-01
5.844075677109324962e-01
5.923179488443757190e-01
6.002283299778189418e-01
6.081387111112623867e-01
6.160490922447056095e-01
6.239594733781489433e-01
6.318698545115921661e-01
6.397802356450353889e-01
6.476906167784788337e-01
6.556009979119220565e-01
6.635113790453653904e-01
6.714217601788086132e-01
6.793321413122519470e-01
6.872425224456952808e-01
6.951529035791385036e-01
7.030632847125818374e-01
7.109736658460250602e-01
7.188840469794683941e-01
7.267944281129117279e-01
7.347048092463550617e-01
7.426151903797982845e-01
7.505255715132415073e-01
7.584359526466849521e-01
7.663463337801281750e-01
7.742567149135715088e-01
7.821670960470147316e-01
7.900774771804579544e-01
7.979878583139013992e-01
8.058982394473446220e-01
8.138086205807879558e-01
8.217190017142311786e-01
8.296293828476744014e-01
8.375397639811178463e-01
8.454501451145610691e-01
8.533605262480044029e-01
8.612709073814476257e-01
8.691812885148909595e-01
8.770916696483342934e-01
8.850020507817775162e-01
8.929124319152208500e-01
9.008228130486640728e-01
9.087331941821074066e-01
9.166435753155507404e-01
9.245539564489939632e-01
9.324643375824372971e-01
9.403747187158805199e-01
9.482850998493238537e-01
9.561954809827671875e-01
9.641058621162105213e-01
9.720162432496537441e-01
9.799266243830969669e-01
9.878370055165403008e-01
9.957473866499836346e-01
1.003657767783426857e+00
1.011568148916869969e+00
1.019478530050313303e+00
1.027388911183756637e+00
1.035299292317199971e+00
1.043209673450643304e+00
1.051120054584086638e+00
1.059030435717529750e+00
1.066940816850973084e+00
1.074851197984416418e+00
1.082761579117859752e+00
1.090671960251303085e+00
1.098582341384746419e+00
1.106492722518189531e+00
1.114403103651632865e+00
1.122313484785075977e+00
1.130223865918519532e+00
1.138134247051962866e+00
1.146044628185405978e+00
1.153955009318849312e+00
1.161865390452292424e+00
1.169775771585735979e+00
1.177686152719179313e+00
1.185596533852622425e+00
1.193506914986065759e+00
1.201417296119508871e+00
1.209327677252952427e+00
1.217238058386395760e+00
1.225148439519838872e+00
1.233058820653282206e+00
1.240969201786725318e+00
1.248879582920168874e+00
1.256789964053612207e+00
1.264700345187055319e+00
1.272610726320498653e+00
1.280521107453941765e+00
1.288431488587385321e+00
1.296341869720828655e+00
1.304252250854271766e+00
1.312162631987715100e+00
1.320073013121158434e+00
1.327983394254601768e+00
1.335893775388045102e+00
1.343804156521488213e+00
1.351714537654931547e+00
1.359624918788374881e+00
1.367535299921818215e+00
1.375445681055261549e+00
1.383356062188704660e+00
1.391266443322147994e+00
1.399176824455591328e+00
1.407087205589034662e+00
1.414997586722477996e+00
1.422907967855921108e+00
1.430818348989364441e+00
1.438728730122807775e+00
1.446639111256251109e+00
1.454549492389694443e+00
1.462459873523137555e+00
1.470370254656581110e+00
1.478280635790024222e+00
1.486191016923467556e+00
1.494101398056910890e+00
1.502011779190354002e+00
1.509922160323797558e+00
1.517832541457240891e+00
1.525742922590684003e+00
1.533653303724127337e+00
1.541563684857570449e+00
1.549474065991014005e+00
1.557384447124457338e+00
1.565294828257900450e+00
1.573205209391343784e+00
1.581115590524786896e+00
1.589025971658230452e+00
1.596936352791673785e+00
1.604846733925116897e+00
1.612757115058560231e+00
1.620667496192003343e+00
1.628577877325446899e+00
1.636488258458890233e+00
1.644398639592333344e+00
1.652309020725776678e+00
1.660219401859219790e+00
1.668129782992663346e+00
1.676040164126106680e+00
1.683950545259549791e+00
1.691860926392993125e+00
1.699771307526436237e+00
1.707681688659879793e+00
1.715592069793323127e+00
1.723502450926766238e+00
1.731412832060209572e+00
1.739323213193652906e+00
1.747233594327096240e+00
1.755143975460539574e+00
1.763054356593982686e+00
1.770964737727426019e+00
1.778875118860869353e+00
1.786785499994312687e+00
1.794695881127756021e+00
1.802606262261199133e+00
1.810516643394642466e+00
1.818427024528085800e+00
1.826337405661529134e+00
1.834247786794972468e+00
1.842158167928415580e+00
1.850068549061858914e+00
1.857978930195302247e+00
1.865889311328745581e+00
1.873799692462188915e+00
1.881710073595632027e+00
1.889620454729075361e+00
1.897530835862518694e+00
1.905441216995962028e+00
1.913351598129405362e+00
1.921261979262848474e+00
1.929172360396292030e+00
1.937082741529735141e+00
1.944993122663178475e+00
1.952903503796621809e+00
1.960813884930064921e+00
1.968724266063508477e+00
1.976634647196951589e+00
1.984545028330394922e+00
1.992455409463838256e+00
2.000365790597281812e+00
2.008276171730725146e+00
2.016186552864168036e+00
2.024096933997611369e+00
2.032007315131055147e+00
2.039917696264498037e+00
2.047828077397941371e+00
2.055738458531384705e+00
2.063648839664828039e+00
2.071559220798271372e+00
2.079469601931714706e+00
2.087379983065158040e+00
2.095290364198600930e+00
2.103200745332044708e+00
2.111111126465488042e+00
2.119021507598930931e+00
2.126931888732374265e+00
2.134842269865817599e+00
2.142752650999260933e+00
2.150663032132704267e+00
2.158573413266147600e+00
2.166483794399590934e+00
2.174394175533034268e+00
2.182304556666477602e+00
2.190214937799920492e+00
2.198125318933364269e+00
2.206035700066807159e+00
2.213946081200250493e+00
2.221856462333694271e+00
2.229766843467137161e+00
2.237677224600580494e+00
2.245587605734023384e+00
2.253497986867467162e+00
2.261408368000910496e+00
2.269318749134353386e+00
2.277229130267797164e+00
2.285139511401240053e+00
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