Commit c8105d3f authored by Nicolas Nunez Barreto's avatar Nicolas Nunez Barreto

a ver

parent 3028f2d5
......@@ -12,7 +12,10 @@ from scipy import interpolate
#/home/nico/Documents/artiq_experiments/analisis/plots/20220526_CPTvariandoB_v2/Data
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20220526_CPTvariandoB_v2/Data')
# os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20220526_CPTvariandoB_v2/Data')
os.chdir("C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20220526_CPTvariandoB_v2//Data")
ALL_FILES = """000007697-IR_Scan_withcal_optimized
000007696-IR_Scan_withcal_optimized
......@@ -273,7 +276,6 @@ plt.plot(freqslongpi_12, FittedEITpi_12)
#plt.title(f'Sdop: {round(popt[0], 2)}, Spr: {round(popt[1], 2)}, T: {round(popt[2]*1e3, 2)} mK, detDop: {DetDoppler} MHz')
#%%
#ESTE CODIGO AJUSTA UNA DE LAS CURVAS, LA 13!!! pero ahora ajustando demas parametros
......@@ -333,7 +335,8 @@ plt.figure()
plt.errorbar(FreqsDRpi_13, CountsDRpi_13, yerr=2*np.sqrt(CountsDRpi_13), fmt='o', capsize=2, markersize=2)
plt.plot(freqslongpi_13, FittedEITpi_13)
#%%
#ESTE CODIGO AJUSTA UNA DE LAS CURVAS, LA 14!!!
phidoppler, titadoppler = 0, 90
......@@ -395,7 +398,7 @@ plt.errorbar(FreqsDRpi_14, CountsDRpi_14, yerr=2*np.sqrt(CountsDRpi_14), fmt='o'
plt.plot(freqslongpi_14, FittedEITpi_14)
#plt.title(f'Sdop: {round(popt[0], 2)}, Spr: {round(popt[1], 2)}, T: {round(popt[2]*1e3, 2)} mK, detDop: {DetDoppler} MHz')
#%%
#ESTE CODIGO AJUSTA UNA DE LAS CURVAS, LA 15!!!
phidoppler, titadoppler = 0, 90
......@@ -605,7 +608,7 @@ plt.tick_params(axis="y", which="both", **visible_ticks)
plt.grid()
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/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig4_final.pdf')
# plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig4_final.pdf')
#%%
from scipy.optimize import curve_fit
......@@ -671,3 +674,166 @@ plt.ylim(0.1,0.43)
plt.xlabel('Coil current (A)')
plt.ylabel('Larmor frequency (MHz)')
plt.grid()
#%%
#filtro y mejoro el plot
"""
PLOTS TESIS (LOS DEL PAPER SON LOS DE ANTES)
"""
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
import seaborn as sns
offs = 7.53e2
scal = 2.0917e5
winl = 11
po = 3
FiltCounts12 = np.array([(c-offs)*100/scal for c in sf(CountsDRpi_12, winl, po)])
#ErrorCounts12 = np.array([0.5*np.sqrt(c/scal) for c in CountsDRpi_12])
ErrorCounts12 = np.array([0.5*np.sqrt(c/scal) for c in sf(CountsDRpi_12, winl, po)])
FiltCounts13 = np.array([(c-offs)*100/scal for c in sf(CountsDRpi_13, winl, po)])
#ErrorCounts13 = np.array([0.5*np.sqrt(c/scal) for c in CountsDRpi_13])
ErrorCounts13 = np.array([0.5*np.sqrt(c/scal) for c in sf(CountsDRpi_13, winl, po)])
FiltCounts14 = np.array([(c-offs)*100/scal for c in sf(CountsDRpi_14, winl, po)])
#ErrorCounts14 = np.array([0.5*np.sqrt(c/scal) for c in CountsDRpi_14])
ErrorCounts14 = np.array([0.5*np.sqrt(c/scal) for c in sf(CountsDRpi_14, winl, po)])
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 CountsDRpi_15])
ErrorCounts15 = np.array([0.5*np.sqrt(c/scal) for c in sf(CountsDRpi_15, winl, po)])
#plot con escalas atomicas y lindo
colors=sns.color_palette("mako", 10)
color1=colors[1]
color2=colors[2]
color3=colors[4]
color4=colors[7]
ms = 4
plt.figure(figsize=(3.6, 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=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=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=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_13, [(c-offs)*100/scal for c in FittedEITpi_13], color=color2, linewidth=3)
# plt.plot(freqslongpi_14, [(c-offs)*100/scal for c in FittedEITpi_14], color=color3, linewidth=3)
# plt.plot(freqslongpi_15, [(c-offs)*100/scal for c in FittedEITpi_15], color=color4, linewidth=3)
plt.plot(freqslongpi_12, [c for c in FittedEITpi_12], color=color1, linewidth=3)
plt.plot(freqslongpi_13, [c for c in FittedEITpi_13], color=color2, linewidth=3)
plt.plot(freqslongpi_14, [c for c in FittedEITpi_14], color=color3, linewidth=3)
plt.plot(freqslongpi_15, [c for c in FittedEITpi_15], color=color4, linewidth=3)
plt.errorbar(FreqsDRpi_12, [c*scal/100+offs for c in FiltCounts12], yerr=np.sqrt(np.array([c*scal/100+offs for c in FiltCounts12])), capsize=2,fmt='o', markersize=2, color=color1, label=fr'$B=${round(1e3*Bfields[0])}({round(1e3*ErrorBfields[0])}) mG', alpha=0.7)
plt.errorbar(FreqsDRpi_13, [c*scal/100+offs for c in FiltCounts13], yerr=np.sqrt(np.array([c*scal/100+offs for c in FiltCounts13])), capsize=2,fmt='o', markersize=2, color=color2, label=fr'$B=${round(1e3*Bfields[1])}({round(1e3*ErrorBfields[1])}) mG', alpha=0.7)
plt.errorbar(FreqsDRpi_14, [c*scal/100+offs for c in FiltCounts14], yerr=np.sqrt(np.array([c*scal/100+offs for c in FiltCounts14])), capsize=2,fmt='o', markersize=2, color=color3, label=fr'$B=${round(1e3*Bfields[2])}({round(1e3*ErrorBfields[2])}) mG', alpha=0.7)
plt.errorbar(FreqsDRpi_15, [c*scal/100+offs for c in FiltCounts15], yerr=np.sqrt(np.array([c*scal/100+offs for c in FiltCounts15])), capsize=2,fmt='o', markersize=2, color=color4, label=fr'$B=${round(1e3*Bfields[3])}({round(1e3*ErrorBfields[3])}) mG', alpha=0.7)
# plt.plot(FreqsDRpi_13, [c*scal/100+offs for c in 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, [c*scal/100+offs for c in 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, [c*scal/100+offs for c in FiltCounts15], 'o', markersize=ms, color=color4, label=fr'$B=${round(1e3*Bfields[3])}({round(1e3*ErrorBfields[3])}) mG', alpha=0.3)
# plt.fill_between(FreqsDRpi_12, FiltCounts12+ErrorCounts12, FiltCounts12-ErrorCounts12, color=color1, alpha=0.2)
# plt.fill_between(FreqsDRpi_13, FiltCounts13+ErrorCounts13, FiltCounts13-ErrorCounts13, color=color2, alpha=0.2)
# plt.fill_between(FreqsDRpi_14, FiltCounts14+ErrorCounts14, FiltCounts14-ErrorCounts14, color=color3, alpha=0.2)
# plt.fill_between(FreqsDRpi_15, FiltCounts15+ErrorCounts15, FiltCounts15-ErrorCounts15, color=color4, alpha=0.2)
plt.xlim(-40,30)
# plt.ylim(-0.1,1.4)
plt.xlabel('Desintonía IR (MHz)', fontsize=10)
plt.ylabel('Cuentas', fontsize=10)
plt.xticks([-40, -20, 0, 20], fontsize=10)
# plt.yticks([0, 0.3, 0.6, 0.9, 1.2], fontsize=10)
# 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(alpha=0.5)
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/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig4_final.pdf')
plt.savefig('C://Users//nicon//Nextcloud//Nico//Doctorado//Tesis//Tesis_doctorado//Chapters//figures//Cap6//fig2test.pdf')
#%%
from scipy.optimize import curve_fit
def LinearLarmortoCurrent(I, a, b):
Larmor = a*I+b
return Larmor
def ConvertLarmortoBfield(u):
c = 1398190.0452488689
return u/(2*np.pi)/c
"""
mediciones = [10, 9, 11, 12, 13, 14, 15, 16]
corrientes = [2, 0, -1, -1.2, -1.5, -1.75, -2, -2.2]
"""
"""
#Esto anda:
IFit = [-1, -1.5, -1.75]
LarmorFit = [popt_13[0], popt_14[0], popt_15[0]]
"""
IFit = [-1.2, -1.5, -1.75, -2]
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
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
Ilong = np.arange(2, -3, -0.01)
popt_larmor, pcov_larmor = curve_fit(LinearLarmortoCurrent, IFit, LarmorFit)
LarmorLong = LinearLarmortoCurrent(Ilong, *popt_larmor)
print(popt_larmor)
plt.figure()
plt.plot(IFit, LarmorFit, 'o', markersize=5)
plt.plot(Ilong, LarmorLong)
Bfitted = [ConvertLarmortoBfield(u) for u in LarmorFit]
ErrorBfitted = [ConvertLarmortoBfield(u) for u in ErrorLarmorFit]
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(figsize=(3.6,3))
plt.plot(Ilong, [b*1e3 for b in BLong])
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 bobina superior (A)')
plt.ylabel('Campo magnetico (mG)')
plt.grid()
......@@ -8,6 +8,8 @@ from scipy.optimize import curve_fit
import os
from scipy import interpolate
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20220527_CPTvariandoB_barriendopotenciaIR//Data')
# Solo levanto algunos experimentos
Calib_Files_IR = """000007808-IR_Saturation
000007809-IR_Saturation
......@@ -82,7 +84,7 @@ plt.ylabel('Cuentas')
from scipy.signal import savgol_filter as sf
import seaborn as sns
plt.style.use('seaborn-ticks')
# plt.style.use('seaborn-ticks')
colors=sns.color_palette("rocket", 10)
......@@ -243,8 +245,8 @@ def LinearFitPotvsB(b, pendiente):
#ordenada=0
return pendiente*b
#CamposVector2 = np.loadtxt('CamposVector.txt')
#RabiVector2 = np.loadtxt('RabiVector.txt')
# 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)
......@@ -297,12 +299,76 @@ plt.ylim(0,4.1)
plt.grid()
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)
<<<<<<< HEAD
plt.savefig('C:/Users/nicon/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig2b_v3.pdf')
=======
# plt.savefig('C:/Users/nicon/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig2b_v3.pdf')
#plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig2b_v2.pdf')
>>>>>>> 9bb069aa4136dbc31f68a3cd69a81195df2f5649
# >>>>>>> 9bb069aa4136dbc31f68a3cd69a81195df2f5649
#%%
'''
FIGURA PARA LA TESIS. PARA EL PAPER ES LA ANTERIOR. JUSTO LA ANTERIOR
'''
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("rocket")
MeanError = 11139.353180216529
plotFreqFreq = False
plt.figure(figsize=(3.6, 3))
if plotFreqFreq == True:
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([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.ylabel(r'Rabi Frequency (MHz)', fontsize=10)
else:
#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.errorbar([(4/5)*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=(4/5)*1e-6*MeanError, yerr=(1e-12/((2*np.pi)**2))*ConvertToRabiSq(yerr0, 2*np.pi*1.35e6)/propor, color='grey', fmt="o", markersize=4, zorder=3, elinewidth=1)
plt.plot([(4/5)*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.ylabel(r'Rabi Frequency Squared (MHz$^2$)', fontsize=12, fontname='STIXGeneral')
#plt.plot([f*1e-9 for f in ConvertBfieldtoLarmor(CamposVector2)], [15*(r*1e-12/((2*np.pi)**2))/popt 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 #esto seria con pendiente 15 que seria lo que da la teoria con el factor de lande correspondiente
plt.ylabel(r'$\Omega_{\mathrm{IR}}^2$ (MHz$^2$)', fontsize=10)
popt, pcov = curve_fit(LinearFitPotvsB, [(4/5)*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)])
poptexp,pcovexp = curve_fit(LinearFitPotvsB, [(4/5)*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)])
print(popt)
print(poptexp)
# 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(r'$\delta/2\pi $ (MHz)', fontsize=10)
plt.xlim(0,(4/5)*0.27)
plt.xticks([0, 0.05, 0.1, 0.15, 0.2], fontsize=10)
plt.yticks([0, 1, 2, 3, 4], fontsize=10)
plt.ylim(0,4.1)
plt.grid(alpha=0.5)
plt.tight_layout()
plt.savefig('C://Users//nicon//Nextcloud//Nico//Doctorado//Tesis//Tesis_doctorado//Chapters//figures//Cap6//fig3b.pdf')
#%%
......@@ -329,7 +395,7 @@ def find_nearest(array, value):
from scipy.signal import savgol_filter as sf
import seaborn as sns
plt.style.use('seaborn-ticks')
# plt.style.use('seaborn-ticks')
colors=sns.color_palette("rocket", 10)
......@@ -399,7 +465,7 @@ plt.yticks([0,1,2,3], fontsize=12, fontname='STIXGeneral')
plt.ylim(0,3.7)
#plt.xlim(0,2.3)
plt.tight_layout()
<<<<<<< HEAD
# <<<<<<< HEAD
#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/Finalesfinales/Fig2a_v2.pdf')
......@@ -427,7 +493,7 @@ def find_nearest(array, value):
from scipy.signal import savgol_filter as sf
import seaborn as sns
plt.style.use('seaborn-ticks')
# plt.style.use('seaborn-ticks')
colors=sns.color_palette("rocket", 10)
......@@ -458,7 +524,6 @@ def FuncTest(rsq, A, det, delta, gs, gd):
return A*((gd/gt)*((gt*gt+4*det*det+(8/3)*delta*delta)/(c*rsq))+1.5*c*rsq/(delta*delta) + 4*gs/gt)**(-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/Finalesfinales/Fig2a_v2.pdf')
......@@ -485,7 +550,7 @@ def find_nearest(array, value):
from scipy.signal import savgol_filter as sf
import seaborn as sns
plt.style.use('seaborn-ticks')
# plt.style.use('seaborn-ticks')
colors=sns.color_palette("rocket", 10)
......@@ -510,12 +575,11 @@ PotenciasMaximos_parcial = MaxsPotsExp/propor
PotenciasMaximos = [PotenciasMaximos_parcial[4],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)
# 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)
>>>>>>> 9bb069aa4136dbc31f68a3cd69a81195df2f5649
smoothen_order = [3,3,3,1]
err = [2,1,1,1]
orden=5
......@@ -523,18 +587,16 @@ plt.figure(figsize=(3.5, 3))
for j in range(len(jselected)):
print(j)
rawcuentas = [f-bkgr for f in FluovsBshort[j]]
<<<<<<< HEAD
#cuentas = np.array(rawcuentas[0:3]+list(sf(rawcuentas[3:],7,3))) #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 = find_nearest(PotenciasIR[1:-1]/propor, PotenciasMaximos[j])
popt, pcov = curve_fit(FuncTest, PotenciasIR[1:-1]/propor, cuentas[1:-1]/1000, p0=(1e5,1.5,1e-2,2*np.pi*21,2*np.pi*1), bounds=((2e2,0,0,2*np.pi*20.5,2*np.pi*1),(2e7,10,1e8,2*np.pi*21.5,2*np.pi*1.1)))
# popt, pcov = curve_fit(FuncTest, PotenciasIR[1:-1]/propor, cuentas[1:-1]/1000, p0=(1e5,1.5,1e-2,2*np.pi*21,2*np.pi*1), bounds=((2e2,0,0,2*np.pi*20.5,2*np.pi*1),(2e7,10,1e8,2*np.pi*21.5,2*np.pi*1.1)))
#print(popt)
print(popt[1])
print(popt[2]/(2*np.pi))
=======
if j==0:
print('tukson')
......@@ -551,7 +613,7 @@ for j in range(len(jselected)):
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)))
print(popt)
>>>>>>> 9bb069aa4136dbc31f68a3cd69a81195df2f5649
# >>>>>>> 9bb069aa4136dbc31f68a3cd69a81195df2f5649
#[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)
......@@ -561,12 +623,12 @@ for j in range(len(jselected)):
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
<<<<<<< HEAD
# <<<<<<< HEAD
#plt.errorbar(PotenciasIR, cuentas, yerr=1*np.sqrt(cuentas), color='r', fmt='o', capsize=2, markersize=4)
#plt.xlim(0, 90)
#plt.ylim(-100,3500)
=======
# =======
#plt.xlim(0,2)
#plt.errorbar(PotenciasIR, cuentas, yerr=1*np.sqrt(cuentas), color='r', fmt='o', capsize=2, markersize=4)
#plt.xlim(0, 90)
......@@ -585,7 +647,139 @@ plt.ylim(0,3.2)
#plt.xlim(0,2.3)
plt.tight_layout()
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/Finalesfinales/Fig2a_paralegend.pdf')
# plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig2a_paralegend.pdf')
plt.savefig('C://Users//nicon//Nextcloud//Nico//Doctorado//Tesis//Tesis_doctorado//Chapters//figures//Cap9//fig2b.pdf')
#%%
'''
Figura (a) para LA TESIS. PARA EL PAPER ES LO ANTERIOR
'''
plt.rc('text', usetex=True)
plt.rc('font', family='serif')
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):
array = np.asarray(array)
idx = (np.abs(array - value)).argmin()
return idx
from scipy.signal import savgol_filter as sf
import seaborn as sns
# plt.style.use('seaborn-ticks')
colors=sns.color_palette("rocket", 10)
colorsselected=[colors[0],colors[3],colors[5],colors[8]]
FluovsBshort = []
#jselected = [0, 1, 4, 8]
jselected = [6, 2, 1, 0]
Bcampos = [b*1e3 for b in Bvec]
Bfields = [Bcampos[4], Bcampos[2], Bcampos[1], Bcampos[0]]
for j in jselected:
FluovsBshort.append(IR_fluorescence_vec[j])
#bkgr2 = np.min([FluovsBshort[0][1],FluovsBshort[1][1],FluovsBshort[2][1],FluovsBshort[3][1]])
#bkgrposta = np.min()
PotenciasMaximos_parcial = MaxsPotsExp/propor
PotenciasMaximos = [PotenciasMaximos_parcial[4],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]
err = [2,1,1,1]
orden=5
plt.figure(figsize=(3.6, 3))
for j in range(len(jselected)):
print(j)
rawcuentas = [f-bkgr for f in FluovsBshort[j]]
#cuentas = np.array(rawcuentas[0:3]+list(sf(rawcuentas[3:],7,3))) #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 = find_nearest(PotenciasIR[1:-1]/propor, PotenciasMaximos[j])
# popt, pcov = curve_fit(FuncTest, PotenciasIR[1:-1]/propor, cuentas[1:-1]/1000, p0=(1e5,1.5,1e-2,2*np.pi*21,2*np.pi*1), bounds=((2e2,0,0,2*np.pi*20.5,2*np.pi*1),(2e7,10,1e8,2*np.pi*21.5,2*np.pi*1.1)))
#print(popt)
print(popt[1])
print(popt[2]/(2*np.pi))
if j==0:
print('tukson')
print(rawcuentas)
rawcuentas[34]=0.5*(rawcuentas[33]+rawcuentas[35])
rawcuentas[37]=0.5*(rawcuentas[36]+rawcuentas[38])
cuentas = np.array(rawcuentas[0:3]+list(sf(rawcuentas[3:],13,smoothen_order[j]))) #este va bien
#cuentas = np.array(rawcuentas[0:]) #pruebo sin smooth
#maximumfluo_index = np.array(cuentas[1:-1]).argmax()
maximumfluo_index = find_nearest(PotenciasIR[1:-1]/propor, PotenciasMaximos[j])
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)))
print(popt)
# >>>>>>> 9bb069aa4136dbc31f68a3cd69a81195df2f5649
#[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
# <<<<<<< HEAD
#plt.errorbar(PotenciasIR, cuentas, yerr=1*np.sqrt(cuentas), color='r', fmt='o', capsize=2, markersize=4)
#plt.xlim(0, 90)
#plt.ylim(-100,3500)
# =======
#plt.xlim(0,2)
#plt.errorbar(PotenciasIR, cuentas, yerr=1*np.sqrt(cuentas), color='r', fmt='o', capsize=2, markersize=4)
#plt.xlim(0, 90)
#plt.ylim(-100,3500)
#for pot in MaxsPotsExp/propor:
# plt.axvline(pot)
plt.grid()
plt.xlabel(r'$\Omega_{\mathrm{DP}}^2$ (MHz$^2$)', fontsize=10)
#plt.xlabel(r'$\Gamma$', fontsize=12, fontname='STIXGeneral')
plt.ylabel('Fluorescencia (kcuentas/s)', fontsize=10)
plt.xticks([0, 1, 2, 3, 4], fontsize=10)
plt.yticks([0,1,2,3], fontsize=10)
plt.ylim(0,3.7)
#plt.xlim(0,2.3)
plt.tight_layout()
plt.legend(loc='upper left', frameon=True, fontsize=7.6, handletextpad=0.1, borderpad=0.2)
# plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig2a_paralegend.pdf')
# plt.savefig('C://Users//nicon//Nextcloud//Nico//Doctorado//Tesis//Tesis_doctorado//Chapters//figures//Cap6//fig3a.pdf')
#%%
......@@ -613,7 +807,7 @@ def find_nearest(array, value):
from scipy.signal import savgol_filter as sf
import seaborn as sns
plt.style.use('seaborn-ticks')
# plt.style.use('seaborn-ticks')
colors=sns.color_palette("rocket", 10)
......@@ -707,8 +901,8 @@ plt.yticks([0,1,2,3], fontsize=12, fontname='STIXGeneral')
plt.tight_layout()
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/Finalesfinales/allcurves.pdf')
>>>>>>> 9bb069aa4136dbc31f68a3cd69a81195df2f5649
# plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/allcurves.pdf')
# >>>>>>> 9bb069aa4136dbc31f68a3cd69a81195df2f5649
#for pot in MaxsPotsExp/propor:
# plt.axvline(pot)
......@@ -726,7 +920,7 @@ plt.tight_layout()
#plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig2a_v3.pdf')
plt.savefig('C:/Users/nicon/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig2a_v3.pdf')
# plt.savefig('C:/Users/nicon/Nextcloud/G_liaf/Publicaciones/Papers/2022 B vs K eigenbasis/Figuras_finales/Finalesfinales/Fig2a_v3.pdf')
......
......@@ -34,6 +34,8 @@ ALL_FILES_SP = """000008358-SingleLine
000008382-SingleLine
"""
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20221004_transitorios//Data')
#000001504-SingleLine.h5
def expo(T, tau, N0, C):
......@@ -160,5 +162,5 @@ plt.grid(alpha=0.3)
plt.xlabel("Potencia [uW]")
plt.ylabel("Alturas/Tau")
plt.show()
# plt.show()
#input()
......@@ -8,6 +8,9 @@ from scipy.optimize import curve_fit
import os
#os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20221006_transitoriosv2')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20221006_transitoriosv2')
# Solo levanto algunos experimentos
SP_files = [8445, 8457, 8458, 8459, 8460, 8461, 8462, 8463, 8464, 8465, 8466, 8467, 8468, 8469, 84840, 88040]
SP_files_v2 = [8763, 8764, 8765, 8766, 8767, 8768, 8769, 8770, 8771, 8772, 8773, 8774, 8775, 8776]
......@@ -267,12 +270,6 @@ FIGURA PAPER SP CON AJUSTES
import matplotlib
import seaborn as sns
matplotlib.rcParams['mathtext.fontset'] = 'stix'
matplotlib.rcParams['font.family'] = 'STIXGeneral'
plt.style.use('seaborn-bright')
plt.rcParams.update({
"text.usetex": False,
})
plt.figure()
plt.plot(Stat_Bins[0][:-1], Stat_Heigths[0])
......@@ -377,12 +374,6 @@ FIGURA PAPER
import matplotlib
import seaborn as sns
matplotlib.rcParams['mathtext.fontset'] = 'stix'
matplotlib.rcParams['font.family'] = 'STIXGeneral'
plt.style.use('seaborn-bright')
plt.rcParams.update({
"text.usetex": False,
})
jselected = [1, 5, 12]
......@@ -415,9 +406,14 @@ plt.ylabel('Counts', fontname='STIXGeneral', fontsize=14)
plt.xticks([0, 0.5, 1, 1.5, 2], fontsize=12)
plt.yticks([0, 1000, 2000, 3000, 4000], fontsize=12)
plt.grid()
plt.savefig('fig3_01.pdf')
plt.savefig('fig3_01.svg')
# plt.savefig('fig3_01.pdf')
# plt.savefig('fig3_01.svg')
"""
Hasta aca. lo de abajo fueron intentos fallidos....
"""
#%%
......
......@@ -6,7 +6,7 @@
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<cc:Work>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
<dc:date>2023-10-03T15:31:08.257400</dc:date>
<dc:date>2024-05-11T10:13:50.844295</dc:date>
<dc:format>image/svg+xml</dc:format>
<dc:creator>
<cc:Agent>
......@@ -42,63 +42,54 @@ z
<g id="line2d_1">
<path d="M 56.973913 189
L 56.973913 25.92
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_2">
<defs>
<path id="mdfec4f4c2e" d="M 0 0
<path id="mc3fc3eb791" d="M 0 0
L 0 3.5
" style="stroke: #000000; stroke-width: 0.8"/>
</defs>
<g>
<use xlink:href="#mdfec4f4c2e" x="56.973913" y="189" style="stroke: #000000; stroke-width: 0.8"/>
<use xlink:href="#mc3fc3eb791" x="56.973913" y="189" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_1">
<!-- 0.0 -->
<g transform="translate(49.473913 204.195625) scale(0.12 -0.12)">
<!-- $\mathdefault{0.0}$ -->
<g transform="translate(49.495092 204.30218) scale(0.12 -0.12)">
<defs>
<path id="STIXGeneral-Regular-30" d="M 3046 2112
Q 3046 1683 2963 1302
Q 2880 922 2717 602
Q 2554 282 2266 96
Q 1978 -90 1600 -90
Q 1210 -90 915 108
Q 621 307 461 640
Q 301 973 227 1350
Q 154 1728 154 2150
Q 154 2746 301 3222
Q 448 3699 790 4012
Q 1133 4326 1626 4326
Q 2253 4326 2649 3712
Q 3046 3098 3046 2112
<path id="CMR17-30" d="M 2688 2038
C 2688 2430 2682 3099 2413 3613
C 2176 4063 1798 4224 1466 4224
C 1158 4224 768 4082 525 3620
C 269 3137 243 2539 243 2038
C 243 1671 250 1112 448 623
C 723 -39 1216 -128 1466 -128
C 1760 -128 2208 -7 2470 604
C 2662 1048 2688 1568 2688 2038
z
M 2432 2080
Q 2432 3091 2217 3625
Q 2003 4160 1587 4160
Q 1190 4160 979 3622
Q 768 3085 768 2106
Q 768 1120 979 598
Q 1190 77 1600 77
Q 2003 77 2217 598
Q 2432 1120 2432 2080
M 1466 -26
C 1056 -26 813 328 723 816
C 653 1196 653 1749 653 2109
C 653 2604 653 3015 736 3407
C 858 3954 1216 4121 1466 4121
C 1728 4121 2067 3947 2189 3420
C 2272 3054 2278 2623 2278 2109
C 2278 1691 2278 1176 2202 797
C 2067 96 1690 -26 1466 -26
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-2e" d="M 1158 275
Q 1158 134 1052 32
Q 947 -70 800 -70
Q 653 -70 550 32
Q 448 134 448 281
Q 448 429 553 534
Q 659 640 806 640
Q 947 640 1052 531
Q 1158 422 1158 275
<path id="CMMI12-3a" d="M 1178 307
C 1178 492 1024 620 870 620
C 685 620 557 467 557 313
C 557 128 710 0 864 0
C 1050 0 1178 153 1178 307
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-30"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="74.999969"/>
<use xlink:href="#CMR17-30" transform="scale(0.996264)"/>
<use xlink:href="#CMMI12-3a" transform="translate(45.690477 0) scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(72.787654 0) scale(0.996264)"/>
</g>
</g>
</g>
......@@ -106,50 +97,49 @@ z
<g id="line2d_3">
<path d="M 99.430435 189
L 99.430435 25.92
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_4">
<g>
<use xlink:href="#mdfec4f4c2e" x="99.430435" y="189" style="stroke: #000000; stroke-width: 0.8"/>
<use xlink:href="#mc3fc3eb791" x="99.430435" y="189" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_2">
<!-- 0.5 -->
<g transform="translate(91.930435 204.195625) scale(0.12 -0.12)">
<!-- $\mathdefault{0.5}$ -->
<g transform="translate(91.951614 204.30218) scale(0.12 -0.12)">
<defs>
<path id="STIXGeneral-Regular-35" d="M 2803 4358
L 2573 3814
Q 2534 3731 2400 3731
L 1158 3731
L 902 3187
Q 1606 3053 1920 2896
Q 2234 2739 2502 2368
Q 2726 2061 2726 1555
Q 2726 1094 2576 780
Q 2426 467 2099 224
Q 1664 -90 1011 -90
Q 646 -90 422 19
Q 198 128 198 307
Q 198 550 486 550
Q 717 550 960 352
Q 1210 147 1414 147
Q 1747 147 2012 480
Q 2278 813 2278 1229
Q 2278 1843 1850 2189
Q 1293 2637 486 2637
Q 410 2637 410 2688
L 416 2720
L 1114 4237
L 2438 4237
Q 2547 4237 2608 4269
Q 2669 4301 2746 4403
L 2803 4358
<path id="CMR17-35" d="M 730 3750
C 794 3724 1056 3641 1325 3641
C 1920 3641 2246 3961 2432 4140
C 2432 4191 2432 4224 2394 4224
C 2387 4224 2374 4224 2323 4198
C 2099 4102 1837 4032 1517 4032
C 1325 4032 1037 4055 723 4191
C 653 4224 640 4224 634 4224
C 602 4224 595 4217 595 4090
L 595 2231
C 595 2113 595 2080 659 2080
C 691 2080 704 2093 736 2139
C 941 2435 1222 2560 1542 2560
C 1766 2560 2246 2415 2246 1293
C 2246 1087 2246 716 2054 422
C 1894 159 1645 25 1370 25
C 947 25 518 319 403 812
C 429 806 480 793 506 793
C 589 793 749 838 749 1036
C 749 1209 627 1280 506 1280
C 358 1280 262 1190 262 1011
C 262 454 704 -128 1382 -128
C 2042 -128 2669 441 2669 1267
C 2669 2054 2170 2662 1549 2662
C 1222 2662 947 2540 730 2304
L 730 3750
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-30"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-35" x="74.999969"/>
<use xlink:href="#CMR17-30" transform="scale(0.996264)"/>
<use xlink:href="#CMMI12-3a" transform="translate(45.690477 0) scale(0.996264)"/>
<use xlink:href="#CMR17-35" transform="translate(72.787654 0) scale(0.996264)"/>
</g>
</g>
</g>
......@@ -157,39 +147,39 @@ z
<g id="line2d_5">
<path d="M 141.886957 189
L 141.886957 25.92
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_6">
<g>
<use xlink:href="#mdfec4f4c2e" x="141.886957" y="189" style="stroke: #000000; stroke-width: 0.8"/>
<use xlink:href="#mc3fc3eb791" x="141.886957" y="189" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_3">
<!-- 1.0 -->
<g transform="translate(134.386957 204.195625) scale(0.12 -0.12)">
<!-- $\mathdefault{1.0}$ -->
<g transform="translate(134.408136 204.30218) scale(0.12 -0.12)">
<defs>
<path id="STIXGeneral-Regular-31" d="M 2522 0
L 755 0
L 755 96
Q 1107 115 1235 227
Q 1363 339 1363 608
L 1363 3482
Q 1363 3795 1171 3795
Q 1082 3795 883 3718
L 710 3654
L 710 3744
L 1856 4326
L 1914 4307
L 1914 486
Q 1914 275 2042 185
Q 2170 96 2522 96
L 2522 0
<path id="CMR17-31" d="M 1702 4083
C 1702 4217 1696 4224 1606 4224
C 1357 3927 979 3833 621 3820
C 602 3820 570 3820 563 3808
C 557 3795 557 3782 557 3648
C 755 3648 1088 3686 1344 3839
L 1344 467
C 1344 243 1331 166 781 166
L 589 166
L 589 0
C 896 6 1216 12 1523 12
C 1830 12 2150 6 2458 0
L 2458 166
L 2266 166
C 1715 166 1702 236 1702 467
L 1702 4083
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-31"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="74.999969"/>
<use xlink:href="#CMR17-31" transform="scale(0.996264)"/>
<use xlink:href="#CMMI12-3a" transform="translate(45.690477 0) scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(72.787654 0) scale(0.996264)"/>
</g>
</g>
</g>
......@@ -197,19 +187,19 @@ z
<g id="line2d_7">
<path d="M 184.343478 189
L 184.343478 25.92
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_8">
<g>
<use xlink:href="#mdfec4f4c2e" x="184.343478" y="189" style="stroke: #000000; stroke-width: 0.8"/>
<use xlink:href="#mc3fc3eb791" x="184.343478" y="189" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_4">
<!-- 1.5 -->
<g transform="translate(176.843478 204.195625) scale(0.12 -0.12)">
<use xlink:href="#STIXGeneral-Regular-31"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-35" x="74.999969"/>
<!-- $\mathdefault{1.5}$ -->
<g transform="translate(176.864657 204.30218) scale(0.12 -0.12)">
<use xlink:href="#CMR17-31" transform="scale(0.996264)"/>
<use xlink:href="#CMMI12-3a" transform="translate(45.690477 0) scale(0.996264)"/>
<use xlink:href="#CMR17-35" transform="translate(72.787654 0) scale(0.996264)"/>
</g>
</g>
</g>
......@@ -217,280 +207,241 @@ L 184.343478 25.92
<g id="line2d_9">
<path d="M 226.8 189
L 226.8 25.92
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_10">
<g>
<use xlink:href="#mdfec4f4c2e" x="226.8" y="189" style="stroke: #000000; stroke-width: 0.8"/>
<use xlink:href="#mc3fc3eb791" x="226.8" y="189" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_5">
<!-- 2.0 -->
<g transform="translate(219.3 204.195625) scale(0.12 -0.12)">
<!-- $\mathdefault{2.0}$ -->
<g transform="translate(219.321179 204.30218) scale(0.12 -0.12)">
<defs>
<path id="STIXGeneral-Regular-32" d="M 3034 877
L 2688 0
L 186 0
L 186 77
L 1325 1286
Q 1773 1754 1965 2144
Q 2157 2534 2157 2950
Q 2157 3379 1920 3616
Q 1683 3853 1267 3853
Q 922 3853 720 3673
Q 518 3494 326 3021
L 192 3053
Q 301 3648 630 3987
Q 960 4326 1523 4326
Q 2054 4326 2380 4006
Q 2707 3686 2707 3200
Q 2707 2477 1888 1613
L 832 486
L 2330 486
Q 2541 486 2665 569
Q 2790 653 2944 915
L 3034 877
<path id="CMR17-32" d="M 2669 990
L 2554 990
C 2490 537 2438 460 2413 422
C 2381 371 1920 371 1830 371
L 602 371
C 832 620 1280 1073 1824 1596
C 2214 1966 2669 2400 2669 3033
C 2669 3788 2067 4224 1395 4224
C 691 4224 262 3603 262 3027
C 262 2777 448 2745 525 2745
C 589 2745 781 2783 781 3007
C 781 3206 614 3264 525 3264
C 486 3264 448 3257 422 3244
C 544 3788 915 4057 1306 4057
C 1862 4057 2227 3616 2227 3033
C 2227 2477 1901 1998 1536 1583
L 262 147
L 262 0
L 2515 0
L 2669 990
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-32"/>
<use xlink:href="#STIXGeneral-Regular-2e" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="74.999969"/>
<use xlink:href="#CMR17-32" transform="scale(0.996264)"/>
<use xlink:href="#CMMI12-3a" transform="translate(45.690477 0) scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(72.787654 0) scale(0.996264)"/>
</g>
</g>
</g>
<g id="text_6">
<!-- Time (us) -->
<g transform="translate(101.738438 220.361562) scale(0.14 -0.14)">
<g transform="translate(99.521947 221.087548) scale(0.14 -0.14)">
<defs>
<path id="STIXGeneral-Regular-54" d="M 3795 3149
L 3642 3149
Q 3539 3674 3353 3821
Q 3168 3968 2656 3968
L 2278 3968
L 2278 710
Q 2278 346 2387 243
Q 2496 141 2893 122
L 2893 0
L 1024 0
L 1024 122
Q 1427 147 1526 256
Q 1626 365 1626 787
L 1626 3968
L 1242 3968
Q 723 3968 540 3817
Q 358 3667 262 3149
L 109 3149
L 154 4237
L 3750 4237
L 3795 3149
<path id="CMR17-54" d="M 3981 4332
L 288 4332
L 179 2924
L 294 2924
C 378 3981 467 4166 1453 4166
C 1568 4166 1754 4166 1805 4159
C 1926 4140 1926 4064 1926 3917
L 1926 465
C 1926 236 1907 166 1376 166
L 1197 166
L 1197 0
C 1504 6 1824 12 2138 12
C 2451 12 2771 6 3078 0
L 3078 166
L 2899 166
C 2368 166 2349 236 2349 465
L 2349 3917
C 2349 4057 2349 4134 2464 4159
C 2515 4166 2701 4166 2816 4166
C 3795 4166 3891 3981 3974 2924
L 4090 2924
L 3981 4332
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-69" d="M 1152 4045
Q 1152 3904 1056 3811
Q 960 3718 819 3718
Q 685 3718 592 3811
Q 499 3904 499 4045
Q 499 4179 595 4275
Q 691 4371 826 4371
Q 966 4371 1059 4275
Q 1152 4179 1152 4045
<path id="CMR17-69" d="M 992 3961
C 992 4102 877 4224 730 4224
C 589 4224 467 4108 467 3961
C 467 3820 582 3699 730 3699
C 870 3699 992 3814 992 3961
z
M 1619 0
L 102 0
L 102 96
Q 435 115 521 211
Q 608 307 608 666
L 608 2118
Q 608 2342 563 2432
Q 518 2522 397 2522
Q 243 2522 128 2490
L 128 2592
L 1120 2944
L 1146 2918
L 1146 672
Q 1146 314 1226 218
Q 1306 122 1619 96
L 1619 0
M 243 2745
L 243 2579
C 602 2579 653 2540 653 2231
L 653 443
C 653 198 627 166 218 166
L 218 0
C 371 12 646 12 806 12
C 960 12 1222 12 1370 0
L 1370 166
C 992 166 979 205 979 436
L 979 2816
L 243 2745
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-6d" d="M 4960 0
L 3565 0
L 3565 96
Q 3834 122 3907 208
Q 3981 294 3981 576
L 3981 1894
Q 3981 2278 3869 2444
Q 3757 2611 3488 2611
Q 3264 2611 3107 2521
Q 2950 2432 2803 2221
L 2803 608
Q 2803 301 2896 201
Q 2989 102 3264 96
L 3264 0
L 1830 0
L 1830 96
Q 2112 115 2189 188
Q 2266 262 2266 550
L 2266 1901
Q 2266 2611 1850 2611
Q 1670 2611 1468 2531
Q 1267 2451 1171 2336
Q 1088 2240 1088 2227
L 1088 448
Q 1088 243 1177 176
Q 1267 109 1523 96
L 1523 0
L 102 0
L 102 96
Q 371 102 460 195
Q 550 288 550 563
L 550 2150
Q 550 2387 499 2480
Q 448 2573 326 2573
Q 230 2573 122 2547
L 122 2656
Q 557 2778 1011 2944
L 1062 2925
L 1062 2451
L 1075 2451
Q 1363 2752 1584 2848
Q 1805 2944 2054 2944
Q 2560 2944 2733 2406
Q 3232 2944 3776 2944
Q 4518 2944 4518 1792
L 4518 493
Q 4518 282 4582 202
Q 4646 122 4794 109
L 4960 96
L 4960 0
<path id="CMR17-6d" d="M 4326 1954
C 4326 2276 4269 2816 3507 2816
C 3072 2816 2771 2520 2656 2173
L 2650 2173
C 2573 2700 2195 2816 1837 2816
C 1331 2816 1069 2424 973 2166
L 966 2166
L 966 2816
L 211 2745
L 211 2578
C 589 2578 646 2540 646 2231
L 646 443
C 646 198 621 166 211 166
L 211 0
C 365 12 646 12 813 12
C 979 12 1267 12 1421 0
L 1421 166
C 1011 166 986 192 986 443
L 986 1678
C 986 2269 1344 2713 1792 2713
C 2266 2713 2317 2289 2317 1980
L 2317 443
C 2317 198 2291 166 1882 166
L 1882 0
C 2035 12 2317 12 2483 12
C 2650 12 2938 12 3091 0
L 3091 166
C 2682 166 2656 192 2656 443
L 2656 1678
C 2656 2269 3014 2713 3462 2713
C 3936 2713 3987 2289 3987 1980
L 3987 443
C 3987 198 3962 166 3552 166
L 3552 0
C 3706 12 3987 12 4154 12
C 4320 12 4608 12 4762 0
L 4762 166
C 4352 166 4326 192 4326 443
L 4326 1954
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-65" d="M 2611 1050
L 2714 1005
Q 2330 -64 1376 -64
Q 813 -64 486 329
Q 160 723 160 1389
Q 160 2074 525 2509
Q 890 2944 1485 2944
Q 2061 2944 2374 2502
Q 2560 2246 2592 1773
L 621 1773
Q 646 1370 700 1158
Q 755 947 915 730
Q 1184 378 1626 378
Q 1939 378 2153 531
Q 2368 685 2611 1050
<path id="CMR17-65" d="M 2438 1503
C 2464 1529 2464 1542 2464 1606
C 2464 2251 2118 2816 1389 2816
C 710 2816 173 2175 173 1394
C 173 554 781 -64 1459 -64
C 2176 -64 2458 619 2458 755
C 2458 800 2419 800 2406 800
C 2362 800 2355 787 2330 709
C 2189 270 1837 51 1504 51
C 1229 51 954 206 781 490
C 582 819 582 1200 582 1503
L 2438 1503
z
M 634 1978
L 1939 1978
Q 1882 2381 1750 2547
Q 1619 2714 1312 2714
Q 1043 2714 864 2525
Q 685 2336 634 1978
M 589 1600
C 634 2511 1126 2713 1382 2713
C 1818 2713 2112 2308 2118 1600
L 589 1600
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-20" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-28" d="M 1946 -1030
L 1869 -1133
Q 1126 -710 716 32
Q 307 774 307 1613
Q 307 3386 1888 4326
L 1946 4224
Q 1293 3667 1075 3126
Q 858 2586 858 1632
Q 858 685 1082 96
Q 1306 -493 1946 -1030
<path id="CMR17-28" d="M 1958 -1562
C 1958 -1556 1958 -1543 1939 -1524
C 1645 -1223 858 -403 858 1596
C 858 3595 1632 4408 1946 4729
C 1946 4735 1958 4748 1958 4767
C 1958 4787 1939 4800 1914 4800
C 1843 4800 1299 4325 986 3620
C 666 2909 576 2218 576 1603
C 576 1141 621 360 1005 -467
C 1312 -1133 1837 -1600 1914 -1600
C 1946 -1600 1958 -1588 1958 -1562
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-75" d="M 3072 320
L 3072 230
Q 2573 96 2195 -58
L 2163 -38
L 2163 486
L 2150 486
Q 1747 -64 1235 -64
Q 870 -64 662 160
Q 454 384 454 755
L 454 2362
Q 454 2598 371 2688
Q 288 2778 58 2790
L 58 2880
L 992 2880
L 992 813
Q 992 595 1123 451
Q 1254 307 1446 307
Q 1760 307 1984 506
Q 2067 582 2099 649
Q 2131 717 2131 877
L 2131 2355
Q 2131 2605 2041 2678
Q 1952 2752 1658 2771
L 1658 2880
L 2669 2880
L 2669 685
Q 2669 461 2742 390
Q 2816 320 3034 320
L 3072 320
<path id="CMR17-75" d="M 1882 2745
L 1882 2579
C 2259 2579 2317 2540 2317 2229
L 2317 1053
C 2317 510 2029 38 1555 38
C 1030 38 986 355 986 691
L 986 2816
L 211 2745
L 211 2579
C 467 2579 640 2579 646 2320
L 646 1079
C 646 646 646 368 813 187
C 896 103 1056 -64 1517 -64
C 2061 -64 2272 400 2323 536
L 2330 536
L 2330 -64
L 3091 -13
L 3091 154
C 2714 154 2656 193 2656 503
L 2656 2816
L 1882 2745
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-73" d="M 998 1926
L 1664 1523
Q 1984 1331 2105 1164
Q 2227 998 2227 736
Q 2227 416 1961 176
Q 1696 -64 1331 -64
Q 1030 -64 864 -6
Q 691 51 570 51
Q 461 51 416 -26
L 333 -26
L 333 979
L 435 979
Q 538 512 730 294
Q 922 77 1248 77
Q 1485 77 1632 211
Q 1779 346 1779 550
Q 1779 845 1440 1030
L 1094 1222
Q 326 1651 326 2150
Q 326 2522 566 2730
Q 806 2938 1210 2938
Q 1491 2938 1638 2867
Q 1754 2816 1818 2816
Q 1862 2816 1920 2880
L 1990 2880
L 2022 2010
L 1926 2010
Q 1818 2445 1654 2621
Q 1491 2797 1203 2797
Q 986 2797 854 2688
Q 723 2579 723 2362
Q 723 2253 796 2128
Q 870 2003 998 1926
<path id="CMR17-73" d="M 1978 2688
C 1978 2803 1971 2809 1933 2809
C 1907 2809 1901 2803 1824 2707
C 1805 2681 1747 2617 1728 2592
C 1523 2809 1235 2816 1126 2816
C 416 2816 160 2444 160 2073
C 160 1497 813 1363 998 1324
C 1402 1241 1542 1216 1677 1100
C 1760 1024 1901 883 1901 652
C 1901 384 1747 38 1158 38
C 602 38 403 460 288 1024
C 269 1113 269 1120 218 1120
C 166 1120 160 1113 160 985
L 160 64
C 160 -52 166 -58 205 -58
C 237 -58 243 -52 275 0
C 314 57 410 211 448 275
C 576 102 800 -64 1158 -64
C 1792 -64 2131 281 2131 780
C 2131 1107 1958 1280 1875 1356
C 1683 1555 1459 1600 1190 1651
C 838 1728 390 1817 390 2208
C 390 2374 480 2726 1126 2726
C 1811 2726 1850 2086 1862 1881
C 1869 1849 1901 1843 1920 1843
C 1978 1843 1978 1862 1978 1971
L 1978 2688
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-29" d="M 186 4224
L 262 4326
Q 992 3891 1408 3148
Q 1824 2406 1824 1581
Q 1824 -166 243 -1133
L 186 -1030
Q 845 -486 1059 54
Q 1274 595 1274 1562
Q 1274 2534 1059 3120
Q 845 3706 186 4224
<path id="CMR17-29" d="M 1683 1596
C 1683 2057 1638 2839 1254 3665
C 947 4332 422 4800 346 4800
C 326 4800 301 4793 301 4761
C 301 4748 307 4742 314 4729
C 621 4408 1402 3595 1402 1603
C 1402 -396 627 -1210 314 -1530
C 307 -1543 301 -1549 301 -1562
C 301 -1594 326 -1600 346 -1600
C 416 -1600 960 -1127 1274 -422
C 1594 289 1683 981 1683 1596
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-54"/>
<use xlink:href="#STIXGeneral-Regular-69" x="61.099991"/>
<use xlink:href="#STIXGeneral-Regular-6d" x="88.899979"/>
<use xlink:href="#STIXGeneral-Regular-65" x="166.699966"/>
<use xlink:href="#STIXGeneral-Regular-20" x="211.09996"/>
<use xlink:href="#STIXGeneral-Regular-28" x="236.099945"/>
<use xlink:href="#STIXGeneral-Regular-75" x="269.399933"/>
<use xlink:href="#STIXGeneral-Regular-73" x="319.399918"/>
<use xlink:href="#STIXGeneral-Regular-29" x="358.299911"/>
<use xlink:href="#CMR17-54" transform="scale(0.996264)"/>
<use xlink:href="#CMR17-69" transform="translate(66.509881 0) scale(0.996264)"/>
<use xlink:href="#CMR17-6d" transform="translate(91.380939 0) scale(0.996264)"/>
<use xlink:href="#CMR17-65" transform="translate(168.300529 0) scale(0.996264)"/>
<use xlink:href="#CMR17-28" transform="translate(238.862156 0) scale(0.996264)"/>
<use xlink:href="#CMR17-75" transform="translate(274.142924 0) scale(0.996264)"/>
<use xlink:href="#CMR17-73" transform="translate(325.038293 0) scale(0.996264)"/>
<use xlink:href="#CMR17-29" transform="translate(360.839631 0) scale(0.996264)"/>
</g>
</g>
</g>
......@@ -499,22 +450,22 @@ z
<g id="line2d_11">
<path d="M 31.5 184.358386
L 226.8 184.358386
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_12">
<defs>
<path id="ma7230096af" d="M 0 0
<path id="m8d2d366f1c" d="M 0 0
L -3.5 0
" style="stroke: #000000; stroke-width: 0.8"/>
</defs>
<g>
<use xlink:href="#ma7230096af" x="31.5" y="184.358386" style="stroke: #000000; stroke-width: 0.8"/>
<use xlink:href="#m8d2d366f1c" x="31.5" y="184.358386" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_7">
<!-- 0 -->
<g transform="translate(18.5 188.456198) scale(0.12 -0.12)">
<use xlink:href="#STIXGeneral-Regular-30"/>
<!-- $\mathdefault{0}$ -->
<g transform="translate(18.64701 188.509476) scale(0.12 -0.12)">
<use xlink:href="#CMR17-30" transform="scale(0.996264)"/>
</g>
</g>
</g>
......@@ -522,20 +473,20 @@ L -3.5 0
<g id="line2d_13">
<path d="M 31.5 149.719473
L 226.8 149.719473
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_14">
<g>
<use xlink:href="#ma7230096af" x="31.5" y="149.719473" style="stroke: #000000; stroke-width: 0.8"/>
<use xlink:href="#m8d2d366f1c" x="31.5" y="149.719473" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_8">
<!-- 1000 -->
<g transform="translate(0.5 153.817286) scale(0.12 -0.12)">
<use xlink:href="#STIXGeneral-Regular-31"/>
<use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/>
<use xlink:href="#STIXGeneral-Regular-30" x="149.999954"/>
<!-- $\mathdefault{1000}$ -->
<g transform="translate(1.088039 153.870563) scale(0.12 -0.12)">
<use xlink:href="#CMR17-31" transform="scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(45.690477 0) scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(91.380954 0) scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(137.071431 0) scale(0.996264)"/>
</g>
</g>
</g>
......@@ -543,20 +494,20 @@ L 226.8 149.719473
<g id="line2d_15">
<path d="M 31.5 115.080561
L 226.8 115.080561
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_16">
<g>
<use xlink:href="#ma7230096af" x="31.5" y="115.080561" style="stroke: #000000; stroke-width: 0.8"/>
<use xlink:href="#m8d2d366f1c" x="31.5" y="115.080561" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_9">
<!-- 2000 -->
<g transform="translate(0.5 119.178373) scale(0.12 -0.12)">
<use xlink:href="#STIXGeneral-Regular-32"/>
<use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/>
<use xlink:href="#STIXGeneral-Regular-30" x="149.999954"/>
<!-- $\mathdefault{2000}$ -->
<g transform="translate(1.088039 119.231651) scale(0.12 -0.12)">
<use xlink:href="#CMR17-32" transform="scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(45.690477 0) scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(91.380954 0) scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(137.071431 0) scale(0.996264)"/>
</g>
</g>
</g>
......@@ -564,51 +515,50 @@ L 226.8 115.080561
<g id="line2d_17">
<path d="M 31.5 80.441648
L 226.8 80.441648
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_18">
<g>
<use xlink:href="#ma7230096af" x="31.5" y="80.441648" style="stroke: #000000; stroke-width: 0.8"/>
<use xlink:href="#m8d2d366f1c" x="31.5" y="80.441648" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_10">
<!-- 3000 -->
<g transform="translate(0.5 84.539461) scale(0.12 -0.12)">
<!-- $\mathdefault{3000}$ -->
<g transform="translate(1.088039 84.592738) scale(0.12 -0.12)">
<defs>
<path id="STIXGeneral-Regular-33" d="M 390 3264
L 288 3290
Q 435 3770 748 4048
Q 1062 4326 1542 4326
Q 1990 4326 2265 4083
Q 2541 3840 2541 3450
Q 2541 2925 1946 2566
Q 2298 2413 2477 2227
Q 2758 1914 2758 1402
Q 2758 890 2464 506
Q 2246 211 1840 60
Q 1434 -90 979 -90
Q 262 -90 262 275
Q 262 378 339 442
Q 416 506 525 506
Q 685 506 915 339
Q 1197 141 1466 141
Q 1818 141 2058 425
Q 2298 710 2298 1120
Q 2298 1856 1632 2048
Q 1434 2112 979 2112
L 979 2202
Q 1338 2323 1517 2432
Q 2035 2726 2035 3290
Q 2035 3610 1852 3776
Q 1670 3942 1344 3942
Q 768 3942 390 3264
<path id="CMR17-33" d="M 1414 2176
C 1984 2176 2234 1673 2234 1094
C 2234 322 1824 25 1453 25
C 1114 25 563 193 390 691
C 422 678 454 678 486 678
C 640 678 755 780 755 947
C 755 1132 614 1216 486 1216
C 378 1216 211 1164 211 927
C 211 335 787 -128 1466 -128
C 2176 -128 2720 432 2720 1087
C 2720 1718 2208 2176 1600 2246
C 2086 2347 2554 2776 2554 3353
C 2554 3856 2048 4224 1472 4224
C 890 4224 378 3862 378 3347
C 378 3123 544 3084 627 3084
C 762 3084 877 3167 877 3334
C 877 3500 762 3584 627 3584
C 602 3584 570 3584 544 3571
C 730 3999 1235 4076 1459 4076
C 1683 4076 2106 3966 2106 3347
C 2106 3167 2080 2851 1862 2574
C 1670 2329 1453 2316 1242 2297
C 1210 2297 1062 2284 1037 2284
C 992 2278 966 2272 966 2227
C 966 2182 973 2176 1101 2176
L 1414 2176
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-33"/>
<use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/>
<use xlink:href="#STIXGeneral-Regular-30" x="149.999954"/>
<use xlink:href="#CMR17-33" transform="scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(45.690477 0) scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(91.380954 0) scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(137.071431 0) scale(0.996264)"/>
</g>
</g>
</g>
......@@ -616,156 +566,146 @@ z
<g id="line2d_19">
<path d="M 31.5 45.802736
L 226.8 45.802736
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #b0b0b0; stroke-width: 0.8; stroke-linecap: square"/>
</g>
<g id="line2d_20">
<g>
<use xlink:href="#ma7230096af" x="31.5" y="45.802736" style="stroke: #000000; stroke-width: 0.8"/>
<use xlink:href="#m8d2d366f1c" x="31.5" y="45.802736" style="stroke: #000000; stroke-width: 0.8"/>
</g>
</g>
<g id="text_11">
<!-- 4000 -->
<g transform="translate(0.5 49.900548) scale(0.12 -0.12)">
<!-- $\mathdefault{4000}$ -->
<g transform="translate(1.088039 49.953826) scale(0.12 -0.12)">
<defs>
<path id="STIXGeneral-Regular-34" d="M 3027 1069
L 2368 1069
L 2368 0
L 1869 0
L 1869 1069
L 77 1069
L 77 1478
L 2086 4326
L 2368 4326
L 2368 1478
L 3027 1478
L 3027 1069
<path id="CMR17-34" d="M 2150 4147
C 2150 4281 2144 4288 2029 4288
L 128 1254
L 128 1088
L 1779 1088
L 1779 460
C 1779 230 1766 166 1318 166
L 1197 166
L 1197 0
C 1402 12 1747 12 1965 12
C 2182 12 2528 12 2733 0
L 2733 166
L 2611 166
C 2163 166 2150 230 2150 460
L 2150 1088
L 2803 1088
L 2803 1254
L 2150 1254
L 2150 4147
z
M 1869 1478
L 1869 3674
L 333 1478
L 1869 1478
M 1798 3723
L 1798 1254
L 256 1254
L 1798 3723
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-34"/>
<use xlink:href="#STIXGeneral-Regular-30" x="49.999985"/>
<use xlink:href="#STIXGeneral-Regular-30" x="99.999969"/>
<use xlink:href="#STIXGeneral-Regular-30" x="149.999954"/>
<use xlink:href="#CMR17-34" transform="scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(45.690477 0) scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(91.380954 0) scale(0.996264)"/>
<use xlink:href="#CMR17-30" transform="translate(137.071431 0) scale(0.996264)"/>
</g>
</g>
</g>
<g id="text_12">
<!-- Counts -->
<g transform="translate(-6.538438 127.298437) rotate(-90) scale(0.14 -0.14)">
<g transform="translate(-5.623989 128.552443) rotate(-90) scale(0.14 -0.14)">
<defs>
<path id="STIXGeneral-Regular-43" d="M 3930 838
L 4051 723
Q 3482 -90 2304 -90
Q 1376 -90 794 480
Q 179 1082 179 2080
Q 179 3014 755 3661
Q 1357 4326 2310 4326
Q 2720 4326 3072 4230
Q 3475 4115 3514 4115
Q 3725 4115 3782 4326
L 3910 4326
L 3968 2874
L 3821 2874
Q 3718 3334 3488 3584
Q 3034 4070 2458 4070
Q 1747 4070 1334 3548
Q 922 3027 922 2182
Q 922 1152 1382 653
Q 1811 192 2522 192
Q 2944 192 3251 339
Q 3558 486 3930 838
<path id="CMR17-43" d="M 3974 4351
C 3974 4467 3968 4473 3930 4473
C 3904 4473 3898 4467 3853 4390
L 3571 3849
C 3258 4249 2874 4480 2381 4480
C 1286 4480 294 3507 294 2179
C 294 837 1286 -128 2387 -128
C 3366 -128 3974 741 3974 1482
C 3974 1547 3974 1573 3917 1573
C 3866 1573 3866 1553 3859 1495
C 3808 592 3168 38 2477 38
C 1824 38 781 502 781 2179
C 781 3862 1843 4313 2464 4313
C 3187 4313 3712 3681 3834 2785
C 3846 2707 3846 2695 3904 2695
C 3974 2695 3974 2707 3974 2824
L 3974 4351
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-6f" d="M 3008 1478
Q 3008 806 2608 371
Q 2208 -64 1568 -64
Q 979 -64 582 368
Q 186 800 186 1459
Q 186 2125 582 2534
Q 979 2944 1626 2944
Q 2221 2944 2614 2537
Q 3008 2131 3008 1478
<path id="CMR17-6f" d="M 2758 1356
C 2758 2176 2163 2816 1466 2816
C 768 2816 173 2176 173 1356
C 173 550 768 -64 1466 -64
C 2163 -64 2758 550 2758 1356
z
M 2432 1306
Q 2432 2035 2112 2445
Q 1856 2765 1504 2765
Q 1171 2765 966 2493
Q 762 2221 762 1747
Q 762 928 1101 435
Q 1318 115 1677 115
Q 2029 115 2230 432
Q 2432 749 2432 1306
M 1466 51
C 1165 51 909 230 762 480
C 602 768 582 1126 582 1408
C 582 1676 595 2009 762 2297
C 890 2508 1139 2713 1466 2713
C 1754 2713 1997 2553 2150 2329
C 2349 2028 2349 1606 2349 1408
C 2349 1158 2336 774 2163 467
C 1984 172 1709 51 1466 51
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-6e" d="M 3104 0
L 1773 0
L 1779 96
Q 2016 115 2096 233
Q 2176 352 2176 672
L 2176 1946
Q 2176 2592 1709 2592
Q 1549 2592 1408 2515
Q 1267 2438 1050 2227
L 1050 461
Q 1050 269 1136 192
Q 1222 115 1466 96
L 1466 0
L 115 0
L 115 96
Q 358 115 435 214
Q 512 314 512 602
L 512 2157
Q 512 2394 467 2483
Q 422 2573 288 2573
Q 160 2573 102 2547
L 102 2656
Q 550 2784 979 2944
L 1030 2925
L 1030 2426
L 1037 2426
Q 1491 2944 1958 2944
Q 2323 2944 2518 2688
Q 2714 2432 2714 1958
L 2714 544
Q 2714 288 2790 205
Q 2867 122 3104 96
L 3104 0
<path id="CMR17-6e" d="M 2656 1954
C 2656 2282 2592 2816 1837 2816
C 1331 2816 1069 2424 973 2166
L 966 2166
L 966 2816
L 211 2745
L 211 2578
C 589 2578 646 2540 646 2231
L 646 443
C 646 198 621 166 211 166
L 211 0
C 365 12 646 12 813 12
C 979 12 1267 12 1421 0
L 1421 166
C 1011 166 986 192 986 443
L 986 1678
C 986 2269 1344 2713 1792 2713
C 2266 2713 2317 2289 2317 1980
L 2317 443
C 2317 198 2291 166 1882 166
L 1882 0
C 2035 12 2317 12 2483 12
C 2650 12 2938 12 3091 0
L 3091 166
C 2682 166 2656 192 2656 443
L 2656 1954
z
" transform="scale(0.015625)"/>
<path id="STIXGeneral-Regular-74" d="M 1702 493
L 1786 422
Q 1478 -64 1011 -64
Q 448 -64 448 749
L 448 2675
L 109 2675
Q 83 2694 83 2720
Q 83 2771 192 2842
Q 435 2982 813 3526
Q 826 3546 874 3606
Q 922 3667 941 3706
Q 986 3706 986 3622
L 986 2880
L 1632 2880
L 1632 2675
L 986 2675
L 986 845
Q 986 538 1062 403
Q 1139 269 1318 269
Q 1510 269 1702 493
<path id="CMR17-74" d="M 966 2585
L 1862 2585
L 1862 2752
L 966 2752
L 966 3968
L 851 3968
C 838 3292 614 2700 70 2687
L 70 2585
L 627 2585
L 627 778
C 627 655 627 -64 1370 -64
C 1747 -64 1965 308 1965 784
L 1965 1151
L 1850 1151
L 1850 790
C 1850 347 1677 51 1408 51
C 1222 51 966 179 966 765
L 966 2585
z
" transform="scale(0.015625)"/>
</defs>
<use xlink:href="#STIXGeneral-Regular-43"/>
<use xlink:href="#STIXGeneral-Regular-6f" x="66.699997"/>
<use xlink:href="#STIXGeneral-Regular-75" x="116.699982"/>
<use xlink:href="#STIXGeneral-Regular-6e" x="166.699966"/>
<use xlink:href="#STIXGeneral-Regular-74" x="216.699951"/>
<use xlink:href="#STIXGeneral-Regular-73" x="244.499939"/>
<use xlink:href="#CMR17-43" transform="scale(0.996264)"/>
<use xlink:href="#CMR17-6f" transform="translate(66.509881 0) scale(0.996264)"/>
<use xlink:href="#CMR17-75" transform="translate(112.200358 0) scale(0.996264)"/>
<use xlink:href="#CMR17-6e" transform="translate(163.095727 0) scale(0.996264)"/>
<use xlink:href="#CMR17-74" transform="translate(211.388643 0) scale(0.996264)"/>
<use xlink:href="#CMR17-73" transform="translate(246.669411 0) scale(0.996264)"/>
</g>
</g>
</g>
......@@ -1042,7 +982,7 @@ L 251.849348 175.248352
L 252.698478 176.148963
L 253 176.259664
L 253 176.259664
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #f6a47c; stroke-opacity: 0.7; stroke-width: 1.5; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #f6a47c; stroke-opacity: 0.7; stroke-width: 1.5; stroke-linecap: square"/>
</g>
<g id="line2d_22">
<path d="M 71.918609 162.714169
......@@ -1055,7 +995,7 @@ L 184.852957 172.649954
L 208.628609 173.902326
L 232.404261 174.959443
L 232.404261 174.959443
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #f6a47c; stroke-width: 1.5; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #f6a47c; stroke-width: 1.5; stroke-linecap: square"/>
</g>
<g id="line2d_23">
<path d="M 8.148913 155.746644
......@@ -1323,7 +1263,7 @@ L 251.000217 154.60356
L 251.849348 155.365616
L 253 154.888449
L 253 154.888449
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #921c5b; stroke-opacity: 0.7; stroke-width: 1.5; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #921c5b; stroke-opacity: 0.7; stroke-width: 1.5; stroke-linecap: square"/>
</g>
<g id="line2d_24">
<path d="M 71.918609 109.245793
......@@ -1352,7 +1292,7 @@ L 213.723391 154.014441
L 229.85687 154.602705
L 232.404261 154.67762
L 232.404261 154.67762
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #921c5b; stroke-width: 1.5; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #921c5b; stroke-width: 1.5; stroke-linecap: square"/>
</g>
<g id="line2d_25">
<path d="M 8.148913 132.365378
......@@ -1628,7 +1568,7 @@ L 251.849348 128.000875
L 252.698478 129.10932
L 253 128.998619
L 253 128.998619
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #221331; stroke-opacity: 0.7; stroke-width: 1.5; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #221331; stroke-opacity: 0.7; stroke-width: 1.5; stroke-linecap: square"/>
</g>
<g id="line2d_26">
<path d="M 71.918609 64.400286
......@@ -1662,7 +1602,7 @@ L 200.137304 128.309615
L 223.912957 128.514556
L 232.404261 128.550962
L 232.404261 128.550962
" clip-path="url(#pe1701b7467)" style="fill: none; stroke: #221331; stroke-width: 1.5; stroke-linecap: square"/>
" clip-path="url(#p46248dcc69)" style="fill: none; stroke: #221331; stroke-width: 1.5; stroke-linecap: square"/>
</g>
<g id="patch_3">
<path d="M 31.5 189
......@@ -1687,7 +1627,7 @@ L 226.8 25.92
</g>
</g>
<defs>
<clipPath id="pe1701b7467">
<clipPath id="p46248dcc69">
<rect x="31.5" y="25.92" width="195.3" height="163.08"/>
</clipPath>
</defs>
......
......@@ -11,13 +11,6 @@ import seaborn as sns
#os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20221017_IonStatistics')
plt.rcParams.update({
"font.family": "STIXGeneral"
})
plt.rcParams.update({
"font.size": 14
})
# Solo levanto algunos experimentos
Stat_files = [8731, 8738, 8745, 8819, 8820, 8822]
......@@ -88,12 +81,6 @@ import seaborn as sns
matplotlib.rcParams['mathtext.fontset'] = 'stix'
matplotlib.rcParams['font.family'] = 'STIXGeneral'
plt.style.use('seaborn-bright')
plt.rcParams.update({
"text.usetex": False,
})
#plt.figure()
#plt.plot(Stat_Bins[0][:-1], Stat_Heigths[0])
......@@ -135,11 +122,11 @@ ax[1].plot(bins1+0.5,poisson1,color = color1,label = 'Ion',linewidth=1.5)
ax[1].legend(loc='upper right', prop={'size': 10})
ax[1].grid()
ax[1].set_xticks([0, 100, 200, 300])
ax[1].set_xticklabels([0, 100, 200, 300], fontsize=10,fontname='STIXGeneral')
ax[1].set_xticklabels([0, 100, 200, 300], fontsize=10)
ax[1].set_yticks([0,0.02, 0.04, 0.06, 0.08])
ax[1].set_yticklabels([0,0.02, 0.04, 0.06, 0.08], fontsize=10,fontname='STIXGeneral')
ax[1].set_xlabel('Cuentas', fontsize=10, fontname='STIXGeneral')
ax[1].set_ylabel('Frecuencia de eventos', fontsize=10, fontname='STIXGeneral')
ax[1].set_yticklabels([0,0.02, 0.04, 0.06, 0.08], fontsize=10)
ax[1].set_xlabel('Cuentas', fontsize=10)
ax[1].set_ylabel('Frecuencia de eventos', fontsize=10)
#plt.savefig('C:/Users/nicon/Nextcloud/Nico/Doctorado/Tesis/Tesis_doctorado/Chapters/figures/Cap5_poisson.pdf')
......@@ -160,18 +147,22 @@ ax[0].plot([s*1e6 for s in OnOff_Bins[0][:-1]],[(OnOff_Heights[0][j]-OnOff_Heigh
ax[0].plot([s*1e6 for s in OnOff_Bins[2][:-1]],OnOff_Heights[2], color=color1,linewidth=3)
ax[0].set_xlim(0,1)
ax[0].grid()
ax[0].set_xlabel(r'Tiempo ($\mu$s)', fontname='STIXGeneral', fontsize=10)
ax[0].set_ylabel(r'Cuentas /10$~\mu$s', fontname='STIXGeneral', fontsize=10)
ax[0].set_xlabel(r'Tiempo ($\mu$s)', fontsize=10)
ax[0].set_ylabel(r'Cuentas /10$~\mu$s',fontsize=10)
ax[0].set_xticks([0,0.2, 0.4, 0.6, 0.8, 1])
ax[0].set_yticks([0,5000, 10000])
ax[0].set_xticklabels([0,0.2, 0.4, 0.6, 0.8, 1], fontname='STIXGeneral', fontsize=10)
ax[0].set_yticklabels([0,5000, 10000], fontname='STIXGeneral', fontsize=10)
ax[0].set_xticklabels([0,0.2, 0.4, 0.6, 0.8, 1], fontsize=10)
ax[0].set_yticklabels([0,5000, 10000], fontsize=10)
plt.tight_layout()
name='fig01b'
plt.savefig('C:/Users/nicon/Nextcloud/Nico/Doctorado/Tesis/Tesis_doctorado/Chapters/figures/Cap5_statistics.pdf')
# plt.savefig('C:/Users/nicon/Nextcloud/Nico/Doctorado/Tesis/Tesis_doctorado/Chapters/figures/Cap5_statistics.pdf')
# plt.savefig('C:/Users/nicon/Nextcloud/Nico/Doctorado/Tesis/Tesis_doctorado/Chapters/figures/Cap5_statistics.pdf')
plt.savefig('C://Users//nicon//Nextcloud//Nico//Doctorado//Tesis//Tesis_doctorado//Chapters//figures//Cap4//Cap4_statistics.pdf')
#plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Papers/2022 Transient Phenomena JOSA B/Figures/'+name+'.pdf')
#plt.savefig('/home/nico/Nextcloud/G_liaf/Publicaciones/Papers/2022 Transient Phenomena JOSA B/Figures/'+name+'_dump.svg')
......
......@@ -8,11 +8,11 @@ from scipy.optimize import curve_fit
import os
from scipy import interpolate
#Mediciones barriendo angulo del TISA y viendo kicking de resonancias oscuras
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230510_MotionalSpectrum/Data/')
# os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230510_MotionalSpectrum/Data/')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230510_MotionalSpectrum//Data')
MOTIONAL_FILES = """000011490-AD9910RAM
......@@ -83,6 +83,39 @@ for i, fname in enumerate(MOTIONAL_FILES.split()):
#%%
"""
Ploteo las curvas de referencia
"""
"""
Valen la pena:
16,19-20-21-22-23: supongo axial. se ven dos piquitos
25, 28: radial 1
26, 29: radial 2
31: se ven bien los dos picos enigmaticos
41: radial 1 fuerte
"""
jvec = [41]
plt.figure()
i = 0
for j in jvec:
plt.errorbar([1*f*1e-3 for f in RealFreqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='-o', capsize=2, markersize=2)
i = i + 1
plt.xlabel('Frecuencia (kHz)')
plt.ylabel('counts')
# plt.xlim(851,856)
# plt.ylim(600,1700)
plt.grid()
# plt.legend()
#%%
"""
......@@ -108,4 +141,3 @@ plt.grid()
plt.legend()
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 23 09:38:53 2024
@author: nicon
"""
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
from matplotlib.colors import Normalize
from scipy.ndimage import map_coordinates
import os
imagenes = []
names = []
for file in os.listdir()[:-1]:
names.append(file)
pic = np.load(str(file))
imagenes.append(pic)
#%%
j=1
print(names[j])
plt.figure()
plt.imshow(imagenes[j][580:630,940:990],vmin=105,vmax=130)
#%%
j=0
print(names[j])
plt.figure()
plt.imshow(imagenes[j][580:630,940:990],vmin=110,vmax=125)
#%%
j=2
print(names[j])
plt.figure()
plt.imshow(imagenes[j][580:630,940:990],vmin=105,vmax=110)
#%%
j=3
print(names[j])
plt.figure()
plt.imshow(imagenes[j][580:630,940:990],vmin=105,vmax=110)
#%%
j=2
print(names[j])
plt.figure()
plt.imshow(imagenes[j][580:630,940:990],vmin=100,vmax=115)
import h5py
import matplotlib.pyplot as plt
import numpy as np
import sys
import re
import ast
from scipy.optimize import curve_fit
import os
from scipy import interpolate
#Mediciones barriendo angulo del TISA y viendo kicking de resonancias oscuras
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
# os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230510_MotionalSpectrum/DataOpticTransitory/')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230510_MotionalSpectrum//Data')
MOTIONAL_FILES = """
000011490-AD9910RAM
000011491-AD9910RAM
000011492-AD9910RAM
000011493-AD9910RAM
000011496-AD9910RAM
000011499-AD9910RAM
000011500-AD9910RAM
000011501-AD9910RAM
000011502-AD9910RAM
000011503-AD9910RAM
000011504-AD9910RAM
000011505-AD9910RAM
000011506-AD9910RAM
000011507-AD9910RAM
000011511-AD9910RAM
000011512-AD9910RAM
000011513-AD9910RAM
000011514-AD9910RAM
000011515-AD9910RAM
000011516-AD9910RAM
000011517-AD9910RAM
000011518-AD9910RAM
000011519-AD9910RAM
000011521-AD9910RAM
000011522-AD9910RAM
000011560-AD9910RAM
000011561-AD9910RAM
000011562-AD9910RAM
000011563-AD9910RAM
000011564-AD9910RAM
000011566-AD9910RAM
000011567-AD9910RAM
000011569-AD9910RAM
000011571-AD9910RAM
000011572-AD9910RAM
000011574-AD9910RAM
000011575-AD9910RAM
000011576-AD9910RAM
000011577-AD9910RAM
000011580-AD9910RAM
000011581-AD9910RAM
000011582-AD9910RAM
"""
def SeeKeys(files):
for i, fname in enumerate(files.split()):
data = h5py.File(fname+'.h5', 'r') # Leo el h5: Recordar que nuestros datos estan en 'datasets'
print(fname)
print(list(data['datasets'].keys()))
print(SeeKeys(MOTIONAL_FILES))
#%%
#carpeta pc nico labo escritorio:
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20211101_CPT_DosLaseres_v03\Data
Counts = []
RealFreqs = []
ErrorFreqs = []
SetFreqs = []
for i, fname in enumerate(MOTIONAL_FILES.split()):
print(str(i) + ' - ' + fname)
data = h5py.File(fname+'.h5', 'r')
RealFreqs.append(np.array(data['datasets']['real_freq']))
Counts.append(np.array(data['datasets']['counts']))
ErrorFreqs.append(np.array(data['datasets']['error_freq']))
SetFreqs.append(np.array(data['datasets']['set_freq']))
# Potencias = [7.4, 11.4, 16.8, 23.2, 31.1, 40.7, 51.5, 64, 78.2, 92.7, 108, 124, 134, 154, 167]
# PotenciasUsadas = [7.4, 11.4, 16.8, 23.2, 31.1, 40.7, 51.5, 64, 78.2]
#%%
"""
Ploteo una curva para buscar su minimo
17,18,19,20,21,22,23: axial. doble pico. distintas pots uv. 11514, 11515, 11516, 11517, 11518, 11519, 11521
25, 28: radial1 con mucha estadistica. 11560, 11563.
29: radial2 con mucha estad. 11564
30: radial2. clarisimo el doble pico. 11566
31: radial2. mas claro todavia el doble pico. 11567
37: me animaria a decir que lo anterior fue modulando el uv y este es modulando el IR. 11576
40: tmb. pico chico. 11581
41: radial1. no se modulando qué pero se ve bien. 11582
"""
jvec = [42]
plt.figure()
i = 0
kmin = 106
for j in jvec:
plt.errorbar([1*f*1e-3 for f in RealFreqs[j]], Counts[j], yerr=np.sqrt(Counts[j]), fmt='-o', capsize=2, markersize=2)
i = i + 1
plt.xlabel('Frecuencia (kHz)')
plt.ylabel('counts')
#plt.xlim(782,787)
#plt.ylim(2000,5000)
plt.grid()
# plt.legend(loc='upper left')
......@@ -7,12 +7,14 @@ from scipy.optimize import curve_fit
import os
from scipy import interpolate
#Mediciones barriendo angulo del TISA y viendo kicking de resonancias oscuras
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
#os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230510_MotionalSpectrum/Data/')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230510_MotionalSpectrum//DataElectricNew')
Data = []
for ii in range(1,10):
Data.append(f"ss0{ii}.dat")
......@@ -33,6 +35,16 @@ for dd in Data:
FrequencyVec.append([data[i][1] for i in range(len(data))])
FluoVec.append([data[i][2] for i in range(len(data))])
#%%
#visualizo data
ivec = [8]
plt.figure()
for i in ivec:
plt.plot([f*1e-6 for f in FrequencyVec[i]], FluoVec[i],'o')
# plt.xlim(0.78,0.8)
#%%
#los voltajes son 2, 2.5, 3, 5, 7 y 9
......@@ -98,7 +110,10 @@ Nuevas mediciones: dan mejor
"""
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230510_MotionalSpectrum/DataRawElectric/')
# os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230510_MotionalSpectrum/DataRawElectric/')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230510_MotionalSpectrum//DataRawElectric')
Data = []
for ii in range(1,10):
......@@ -108,7 +123,11 @@ for ii in range(10,14):
#for ii in range(40,49):
# Data.append(f"ss{ii}.dat")
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230510_MotionalSpectrum/DataRawElectric2/')
#os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230510_MotionalSpectrum/DataRawElectric2/')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230510_MotionalSpectrum//DataRawElectric2')
for ii in range(1,10):
Data.append(f"s0{ii}.dat")
......@@ -117,8 +136,8 @@ for ii in range(10,24):
#for ii in range(40,49):
# Data.append(f"ss{ii}.dat")
FrequencyVec = []
FluoVec = []
FrequencyVec2 = []
FluoVec2 = []
for dd in Data:
data = np.genfromtxt(dd,
......@@ -127,8 +146,18 @@ for dd in Data:
dtype=None,
delimiter=' ')
FrequencyVec.append([data[i][1] for i in range(len(data))])
FluoVec.append([data[i][2] for i in range(len(data))])
FrequencyVec2.append([data[i][1] for i in range(len(data))])
FluoVec2.append([data[i][2] for i in range(len(data))])
#%%
#visualizo data
ivec = [3]
plt.figure()
for i in ivec:
plt.plot([f*1e-6 for f in FrequencyVec2[i]], FluoVec2[i],'o')
# plt.xlim(0.78,0.8)
#%%
"""
......@@ -138,7 +167,7 @@ ivec = [33]
plt.figure()
for i in ivec:
plt.plot([f*1e-6 for f in FrequencyVec[i]], FluoVec[i],'-o')
plt.plot([f*1e-6 for f in FrequencyVec2[i]], FluoVec2[i],'-o')
#plt.xlim(0.3,0.6)
......@@ -150,7 +179,7 @@ ivec = [23]
plt.figure()
for i in ivec:
plt.plot([f*1e-6 for f in FrequencyVec[i]], FluoVec[i],'o')
plt.plot([f*1e-6 for f in FrequencyVec2[i]], FluoVec2[i],'o')
#plt.xlim(0.3,0.6)
#%%
......@@ -163,15 +192,17 @@ ki=3500
kf=-1500
plt.figure()
plt.plot([f*1e-6 for f in FrequencyVec[23]], FluoVec[23],'ro')
plt.plot([f*1e-6 for f in FrequencyVec[33]][ki:kf], FluoVec[33][ki:kf],'ro')
plt.plot([f*1e-6 for f in FrequencyVec2[27]], FluoVec2[27],'-o')
#plt.plot([f*1e-6 for f in FrequencyVec2[33]][ki:kf], FluoVec2[33][ki:kf],'-o')
plt.xlabel('Frecuencia (MHz)')
plt.ylabel('Cuentas')
plt.xlim(1.5,1.6)
#plt.xlim(1.5,1.6)
#%%
"""
Miro modo radial con roi chiquita, una en el medio del ion y otra en donde el ion se estira en el costadito
"""
......
import matplotlib.pyplot as plt
import numpy as np
import sys
import re
import ast
from scipy.optimize import curve_fit
import os
from scipy import interpolate
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
#os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230510_MotionalSpectrum/Data/')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230510_MotionalSpectrum//DataElectric')
Data1 = []
for ii in range(1,10):
Data1.append(f"ss0{ii}.dat")
for ii in range(10,20):
Data1.append(f"ss{ii}.dat")
for ii in range(20,40):
Data1.append(f"ss{ii}.dat")
for ii in range(40,49):
Data1.append(f"ss{ii}.dat")
FrequencyVec1 = []
FluoVec1 = []
for dd in Data1:
data = np.genfromtxt(dd,
skip_header=1,
names=True,
dtype=None,
delimiter=' ')
FrequencyVec1.append([data[i][1] for i in range(len(data))])
FluoVec1.append([data[i][2] for i in range(len(data))])
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230510_MotionalSpectrum//DataElectricNew')
Data2 = []
for ii in range(1,10):
Data2.append(f"ss0{ii}.dat")
FrequencyVec2 = []
FluoVec2 = []
for dd in Data2:
data = np.genfromtxt(dd,
skip_header=1,
names=True,
dtype=None,
delimiter=' ')
FrequencyVec2.append([data[i][1] for i in range(len(data))])
FluoVec2.append([data[i][2] for i in range(len(data))])
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230510_MotionalSpectrum//DataElectricNew//Ion centro costado')
Data2b = ['sscostado.dat']
FrequencyVec2b = []
FluoVec2b = []
for dd in Data2b:
data = np.genfromtxt(dd,
skip_header=1,
names=True,
dtype=None,
delimiter=' ')
FrequencyVec2b.append([data[i][1] for i in range(len(data))])
FluoVec2b.append([data[i][2] for i in range(len(data))])
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230510_MotionalSpectrum//DataRawElectric')
Data3 = []
for ii in range(1,10):
Data3.append(f"s0{ii}.dat")
for ii in range(10,14):
Data3.append(f"s{ii}.dat")
FrequencyVec3 = []
FluoVec3 = []
for dd in Data3:
data = np.genfromtxt(dd,
skip_header=1,
names=True,
dtype=None,
delimiter=' ')
FrequencyVec3.append([data[i][1] for i in range(len(data))])
FluoVec3.append([data[i][2] for i in range(len(data))])
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230510_MotionalSpectrum//DataRawElectric2')
Data4 = []
for ii in range(1,10):
Data4.append(f"s0{ii}.dat")
for ii in range(10,24):
Data4.append(f"s{ii}.dat")
FrequencyVec4 = []
FluoVec4 = []
for dd in Data4:
data = np.genfromtxt(dd,
skip_header=1,
names=True,
dtype=None,
delimiter=' ')
FrequencyVec4.append([data[i][1] for i in range(len(data))])
FluoVec4.append([data[i][2] for i in range(len(data))])
#%%
#del 1 al 49
ivec = [47]
plt.figure()
for i in ivec:
plt.plot([f*1e-6 for f in FrequencyVec1[i]], FluoVec1[i],'o')
# plt.xlim(0.78,0.8)
#%%
#del 0 al 8
ivec = [8]
plt.figure()
for i in ivec:
plt.plot([f*1e-6 for f in FrequencyVec2[i]], FluoVec2[i],'o')
# plt.xlim(0.78,0.8)
#%%
#solo el 0
ivec = [0]
plt.figure()
for i in ivec:
plt.plot([f*1e-6 for f in FrequencyVec2b[i]], FluoVec2b[i],'o')
# plt.xlim(0.78,0.8)
#%%
#desde el 0 hasta el 12
"""
0, 1: agarrarr el ion en el centro o el costado
7: modo relativo!!!!! 10, 11 y 12 tmb pero no se ve tan bien anyways
"""
ivec = [9]
plt.figure()
for i in ivec:
plt.plot([f*1e-6 for f in FrequencyVec3[i]], FluoVec3[i],'o')
# plt.xlim(0.78,0.8)
#%%
#desde 0 hasta 22
ivec = [19]
plt.figure()
for i in ivec:
plt.plot([f*1e-6 for f in FrequencyVec4[i]], FluoVec4[i],'o')
# plt.xlim(0.78,0.8)
#%%
"""
Primero un grafico de los tres modos
"""
import seaborn as sns
i1 = 14
i2 = 20
Freqs1 = [f*1e-6 for f in FrequencyVec4[i1]]
Counts1 = [c for c in FluoVec4[i1]]
Freqs2 = [f*1e-6 for f in FrequencyVec4[i2]]
Counts2 = [c for c in FluoVec4[i2]]
for jj in range(1000,3500):
if Counts2[jj]<101.7:
Counts2[jj]=102.2
for jj in range(4500,6000):
if Counts2[jj]<101.75:
Counts2[jj]=102.2
k1 = 900
k2 = 6000
for kk in range(800,1500):
if Counts1[kk]<101.65:
Counts1[kk]=102.2
Counts1[1722]=100.7
Counts1[1723]=101
lwidth = 3
fs = 10
bkg = 100
pale = sns.color_palette("colorblind")
col=3
plt.figure(figsize=(5.5,4))
plt.plot(Freqs1, [c-bkg for c in Counts1], linewidth=lwidth,color=pale[col])
plt.plot(Freqs2[k1:k2], [c+0.06-bkg for c in Counts2[k1:k2]], linewidth=lwidth,color=pale[col])
plt.ylim(-0.1,4)
plt.xlim(0.7,1.75)
plt.yticks([0,1,2,3])
plt.ylabel('Cuentas por píxel')
plt.xlabel('Frecuencia de excitación (MHz)')
plt.grid(alpha=0.5)
# plt.xlim(0.78,0.8)
#freq radial 1
plt.figure(figsize=(3.5,3))
plt.plot(Freqs1, [c-bkg for c in Counts1], linewidth=lwidth,color=pale[col])
#plt.plot(Freqs2[k1:k2], [c+0.06-bkg for c in Counts2[k1:k2]], linewidth=lwidth,color=pale[col])
plt.ylim(-0.1,3.2)
plt.xlim(0.787,0.795)
plt.yticks([0,1,2,3])
plt.ylabel('Cuentas por píxel')
plt.xlabel('Frecuencia de excitación (MHz)')
plt.grid(alpha=0.5)
plt.xticks([0.788, 0.791, 0.794])
# plt.xlim(0.78,0.8)
#freq radial 1
plt.figure(figsize=(3.5,3))
plt.plot(Freqs1, [c-bkg for c in Counts1], linewidth=lwidth,color=pale[col])
#plt.plot(Freqs2[k1:k2], [c+0.06-bkg for c in Counts2[k1:k2]], linewidth=lwidth,color=pale[col])
plt.ylim(-0.1,3.2)
plt.xlim(0.8745,0.8825)
plt.yticks([0,1,2,3])
plt.ylabel('Cuentas por píxel')
plt.xlabel('Frecuencia de excitación (MHz)')
plt.grid(alpha=0.5)
plt.xticks([0.875, 0.878, 0.881])
# plt.xlim(0.78,0.8)
......@@ -13,6 +13,9 @@ from scipy import interpolate
#os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230510_MotionalSpectrum/Data/')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230707_MotionalSpectrum_v2//Data')
Data = []
for ii in range(1,10):
Data.append(f"ss0{ii}.dat")
......
......@@ -12,8 +12,9 @@ from scipy import interpolate
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230510_MotionalSpectrum/DataOpticTransitory/')
# os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230510_MotionalSpectrum/DataOpticTransitory/')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230510_MotionalSpectrum//DataOpticTransitory')
MOTIONAL_FILES = """
000012033-AD9910RAM
......@@ -56,13 +57,15 @@ for i, fname in enumerate(MOTIONAL_FILES.split()):
Potencias = [7.4, 11.4, 16.8, 23.2, 31.1, 40.7, 51.5, 64, 78.2, 92.7, 108, 124, 134, 154, 167]
PotenciasUsadas = [7.4, 11.4, 16.8, 23.2, 31.1, 40.7, 51.5, 64, 78.2]
#%%
"""
Ploteo una curva para buscar su minimo
"""
jvec = [0,1,2]
jvec = [9]
plt.figure()
i = 0
......@@ -90,7 +93,7 @@ plt.legend(loc='upper left')
Ploteo las curvas de referencia
"""
jvec = [0, 1, 2, 3, 8]
jvec = [9]
......@@ -136,9 +139,146 @@ plt.axhline(1)
plt.xlabel('Potencia IR (uW)')
#%%
"""
Ahora hago lo de antes pero bien, con ajustes, como debe ser
"""
def Lorentzian( x, A, B, x0, gam ):
return A * gam**2 / ( gam**2 + ( x - x0 )**2) + B
def ErrorDRdepth(p, f, b):
ep = np.sqrt(p)
ef = np.sqrt(f)
eb = np.sqrt(b)
derivadap = 1/((f-b)**2)
derivadaf = ((p-b)/((f-b)**2))**2
derivadab = ((p-f)/((f-b)**2))**2
return 1*np.sqrt(derivadap*ep*ep + derivadaf*ef*ef + derivadab*eb*eb)
def SaturationCurve_detzero(p, F0, a,b):
return b*(1-0.5*F0*a*p*(1/(1+a*p)))
bkg = np.min(Counts[2])
depths = []
errordepths = []
js = [0,1,2,3,4,5,6,7,8,9]
#js=[9]
poptsvec = []
for k in js:
Freqs = [1*f*1e-3 for f in RealFreqs[k]]
Coun = [c for c in Counts[k]]
if k==4:
Coun[97]=3800
elif k==2:
Coun[129]=3400
elif k==5:
Coun[115]=3750
Coun[116]=3850
elif k==8:
Coun[98]=4200
elif k==9:
Coun[52]=4400
Coun[77]=4400
Coun[100]=4000
Coun[104]=3700
Coun[129]=4300
Coun[130]=4300
#popt, pcov = curve_fit(Gaussian, Freqs, Counts, p0=(-200,2100,444.2,0.05))
popt, pcov = curve_fit(Lorentzian, Freqs, Coun, p0=(-2000,3000,784.2,0.05), bounds=((-10000,0,0,0),(0,1e4, 1e4, 1)))
poptsvec.append(popt)
if k==0:
depths.append(0)
errordepths.append(0.03)
else:
depths.append(1-(np.min(Lorentzian(Freqs,*popt))-bkg)/(popt[1]-bkg))
errordepths.append(ErrorDRdepth(np.min(Lorentzian(Freqs,*popt)),popt[1], bkg))
if len(js)==1:
plt.figure()
plt.plot(Freqs,Coun,'-o')
plt.plot(Freqs,Lorentzian(Freqs,*popt))
# plt.xlim(782.5,788)
if not len(js)==1:
plt.figure()
#plt.errorbar(PotenciasUsadas+[92.7],depths,yerr=errordepths,fmt='o',capsize=3)
plt.errorbar(PotenciasUsadas,depths[:-1],yerr=errordepths[:-1],fmt='o',capsize=3)
#%%
# poptcurv, pcovcurv = curve_fit(SaturationCurve_detzero,PotenciasUsadas,depths[:-1],p0=(10,1e-3, -2))
plong = np.arange(0,90,0.1)
ms = 7
cs = 3
fs = 10
plt.figure(figsize=(3.,3))
plt.errorbar(PotenciasUsadas,depths[:-1],yerr=errordepths[:-1],fmt='o',color='black',capsize=cs,markersize=ms)
plt.xlabel(r'Potencia UV ($\mu$W)',fontsize=fs)
plt.ylabel('Profundidad',fontsize=fs)
plt.grid(alpha=0.5)
plt.ylim(0, 0.28)
plt.xlim(0,82)
plt.tight_layout()
# plt.savefig('C://Users//nicon//Nextcloud//Nico//Doctorado//Tesis//Tesis_doctorado//Chapters//figures//Cap9//fig2b.pdf')
#%%
import seaborn as sns
paleta = sns.color_palette("flare", 5)
k0, k1, k2, k3, k4 = 0, 1, 2, 3, 8
c0, c1, c2, c3, c4 = 0, 1, 2, 3, 4
Coun0 = [c for c in Counts[k0]]
Coun1 = [c for c in Counts[k1]]
Coun2 = [c for c in Counts[k2]]
Coun3 = [c for c in Counts[k3]]
Coun4 = [c for c in Counts[k4]]
Coun4[98]=4200
lwidth = 4
ms = 4
fs = 10
plt.figure(figsize=(3.,3))
plt.plot(Freqs,Coun0,'o', color=paleta[c0], alpha=0.5, markersize = ms)
plt.plot(Freqs,Lorentzian(Freqs,*poptsvec[k0]), color=paleta[c1], linewidth=lwidth)
plt.plot([f+0.6 for f in Freqs],Coun1,'o', color=paleta[c1], alpha=0.5, markersize = ms)
plt.plot([f+0.6 for f in Freqs],Lorentzian(Freqs,*poptsvec[k1]), color=paleta[c1], linewidth=lwidth)
plt.plot([f-0.1 for f in Freqs],Coun2,'o', color=paleta[c2], alpha=0.5, markersize = ms)
plt.plot([f-0.1 for f in Freqs],Lorentzian(Freqs,*poptsvec[k2]), color=paleta[c2], linewidth=lwidth)
plt.plot(Freqs,Coun3,'o', color=paleta[c3], alpha=0.5, markersize = ms)
plt.plot(Freqs,Lorentzian(Freqs,*poptsvec[k3]), color=paleta[c3], linewidth=lwidth)
plt.plot([f-0.3 for f in Freqs],Coun4,'o', color=paleta[c4], alpha=0.5, markersize = ms)
plt.plot([f-0.3 for f in Freqs],Lorentzian(Freqs,*poptsvec[k4]), color=paleta[c4], linewidth=lwidth)
plt.ylim(1800,4700)
plt.xlim(779,789)
plt.xlabel('Frecuencia mod IR1 (kHz)', fontsize=fs)
plt.ylabel('Cuentas', fontsize=fs)
plt.tight_layout()
plt.grid(alpha=0.5)
# plt.savefig('C://Users//nicon//Nextcloud//Nico//Doctorado//Tesis//Tesis_doctorado//Chapters//figures//Cap9//fig2c.pdf')
......@@ -9,12 +9,14 @@ import os
#os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230523_transitorioshighpower/')
# Solo levanto algunos experimentos
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230523_transitorioshighpower')
SP_files = [12221, 12222, 12223, 12224]
Random_files = [8749]
def expo(T, tau, N0, C):
global T0
def expo(T, tau, N0, C, T0):
return N0*np.exp(-(T-T0)/tau) + C
def pow_from_amp(amp):
......@@ -91,7 +93,7 @@ for Height in [SP_Heigths[3]]:
print(Height)
plt.plot(RefBins, Height,'o')
plt.xlim(0.15, 0.5)
# plt.xlim(0.15, 0.5)
#%%
......@@ -116,7 +118,7 @@ popt_vec = []
pcov_vec = []
plt.figure()
for j in range(len(SP_Heigths)):
for j in [3]:
#for j in [12]:
print(j)
#BackgroundVector = SP_Bkgr_builder(np.mean(SP_Heigths[j][0:50]),np.mean(SP_Heigths[j][-50:]),59,67,965)
......@@ -125,17 +127,16 @@ for j in range(len(SP_Heigths)):
CorrectedSP_Height = SP_Heigths[j]
if j==3:
popt, pcov = curve_fit(expo, RefBins[90:], CorrectedSP_Height[90:], p0=(5, 1000, 100))
popt_vec.append(popt)
pcov_vec.append(pcov)
plt.plot(RefBins, CorrectedSP_Height)
plt.plot(RefBins[90:], [expo(r, *popt) for r in RefBins][90:])
Taus.append(popt[0])
Amps.append(popt[1])
Offsets.append(popt[2])
ErrorTaus.append(np.sqrt(pcov)[0][0])
print(Taus)
popt, pcov = curve_fit(expo, RefBins[700:], CorrectedSP_Height[700:], p0=(1e-2, 10000, 1, 1))
popt_vec.append(popt)
pcov_vec.append(pcov)
plt.plot(RefBins, CorrectedSP_Height)
plt.plot(RefBins[700:], [expo(r, *popt) for r in RefBins][700:])
Taus.append(popt[0])
Amps.append(popt[1])
Offsets.append(popt[2])
ErrorTaus.append(np.sqrt(pcov[0,0]))
print(Taus)
#%%
plt.figure()
plt.plot(UVpotVec[:-5], Taus[:-6],'o', markersize=10, color='purple')
......@@ -164,13 +165,6 @@ FIGURA PAPER SP CON AJUSTES
import matplotlib
import seaborn as sns
matplotlib.rcParams['mathtext.fontset'] = 'stix'
matplotlib.rcParams['font.family'] = 'STIXGeneral'
plt.style.use('seaborn-bright')
plt.rcParams.update({
"text.usetex": False,
})
plt.figure()
plt.plot(Stat_Bins[0][:-1], Stat_Heigths[0])
......@@ -270,12 +264,7 @@ FIGURA PAPER
import matplotlib
import seaborn as sns
matplotlib.rcParams['mathtext.fontset'] = 'stix'
matplotlib.rcParams['font.family'] = 'STIXGeneral'
plt.style.use('seaborn-bright')
plt.rcParams.update({
"text.usetex": False,
})
jselected = [1, 5, 12]
......
......@@ -12,8 +12,9 @@ from scipy import interpolate
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230609_LocalizedSaturationInCrystal/Data/')
#os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230609_LocalizedSaturationInCrystal/Data/')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230609_LocalizedSaturationInCrystal//Data')
MOTIONAL_FILES = """000012579-MeltingExperiment
000012580-MeltingExperiment
......
......@@ -19,7 +19,7 @@ Calib_Files = """000012744-UV_Scan_withcalib_Haeffner
000012754-UV_Scan_withcalib_Haeffner
000012755-UV_Scan_withcalib_Haeffner"""
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230616_newUVspectra//Data')
#carpeta pc nico labo escritorio:
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220503_EspectrosUVnuevos\Data
......
......@@ -12,8 +12,8 @@ from scipy import interpolate
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230707_MotionalSpectrum_v2/Data/')
# os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230707_MotionalSpectrum_v2/Data/')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230707_MotionalSpectrum_v2//Data')
MOTIONAL_FILES = """
000013002-AD9910RAM_andor
......@@ -49,7 +49,7 @@ for i, fname in enumerate(MOTIONAL_FILES.split()):
Potencias_IR = [0,20,50]
#%%
#%%
"""
Ploteo una curva para buscar su minimo
......
......@@ -12,8 +12,9 @@ from scipy import interpolate
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230714_EspectrosCristal4iones/Data/')
#os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230714_EspectrosCristal4iones/Data/')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230714_EspectrosCristal4iones//Data')
MOTIONAL_FILES = """000013292-UV_Scan_withcal_optimized_andor
000013293-UV_Scan_withcal_optimized_andor
......
......@@ -12,8 +12,9 @@ from scipy import interpolate
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230720_EspectrosCristal2iones/Data/')
#os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230720_EspectrosCristal2iones/Data/')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230720_EspectrosCristal2iones//Data')
MOTIONAL_FILES = """000013489-IR_Scan_withcal_optimized_andor
000013490-IR_Scan_withcal_optimized_andor
......@@ -132,7 +133,7 @@ plt.legend()
#%%
#from EITfit.MM_eightLevel_2repumps_AnalysisFunctions import PerformExperiment_8levels_MM, GenerateNoisyCPT_MM_fit
# from EITfit.MM_eightLevel_2repumps_AnalysisFunctions import PerformExperiment_8levels_MM, GenerateNoisyCPT_MM_fit
from scipy.optimize import curve_fit
from time import time as titi
......
......@@ -16,7 +16,6 @@ from glob import glob
#%% Carga de datos experimentales
#Mediciones barriendo angulo del TISA y viendo kicking de resonancias oscuras
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
......@@ -24,7 +23,7 @@ from glob import glob
os.chdir('Data')
#%%
"""
......
......@@ -14,6 +14,7 @@ from scipy import interpolate
#os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230804_RotationalDopplerShift_v2/Data')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230804_RotationalDopplerShift_v2//Data')
"""
......
......@@ -12,8 +12,9 @@ from scipy import interpolate
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230804_RotationalDopplerShift_v2/Data')
#os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230804_RotationalDopplerShift_v2/Data')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20230804_RotationalDopplerShift_v2//Data')
"""
......
......@@ -325,12 +325,14 @@ fig.suptitle("Configuracion +2/-2 colineales, ion al costado del haz dcA")
# for kk,vv in data['datasets'].items():
# print(f'{kk}:\t',vv)
"""
FIGURA TESIS PARTE 1
"""
from scipy.signal import savgol_filter as savgol
# Grafico con subplots
fig,axx = plt.subplots(1,2,figsize=(12,8), constrained_layout=True , sharey=True )
fig,axx = plt.subplots(1,2,figsize=(6.5,3.2), constrained_layout=True , sharey=True )
fig.set_constrained_layout_pads(w_pad=1/72, h_pad=0, hspace=0, wspace=0)
......@@ -379,8 +381,8 @@ for data in sorted([ h5py.File(DataFile, 'r') for DataFile in DATAFILES_costado_
CURVA = (cuentas/base-1)/5 + compOven
CURVA_SUAVE = (cuentas_suave/base-1)/5+ compOven
ax.plot(frecuencia,CURVA , '.', alpha=0.1)
ax.plot(frecuencia,CURVA_SUAVE, '-', alpha=0.9, color=ax.get_lines()[-1].get_color())
ax.plot([f-440 for f in frecuencia],CURVA , '.', alpha=0.1)
ax.plot([f-440 for f in frecuencia],CURVA_SUAVE, '-', alpha=0.9, color=ax.get_lines()[-1].get_color())
......@@ -389,7 +391,7 @@ for data in sorted([ h5py.File(DataFile, 'r') for DataFile in DATAFILES_costado_
I = np.arange(len(frecuencia))[(frecuencia>rango.min())&(frecuencia<rango.max())]
idx = cuentas_suave[I].argmin() + I[0]
ax.plot(frecuencia[idx],(cuentas_suave[idx]/base[idx]-1)/5+compOven, 'o', ms=6, color=ax.get_lines()[-1].get_color(),zorder=10)
ax.plot([frecuencia[idx]-440],(cuentas_suave[idx]/base[idx]-1)/5+compOven, 'o', ms=6, color=ax.get_lines()[-1].get_color(),zorder=10)
Base = np.polyval(mm,rango.mean())
val_pico = cuentas_suave[I].min()
......@@ -398,14 +400,14 @@ for data in sorted([ h5py.File(DataFile, 'r') for DataFile in DATAFILES_costado_
print('')
ax.legend()
# ax.legend()
ax.set_xlim(-9,9)
ax = axx[1]
ax.plot( picos[0] , compOven_vec , '.')
ax.plot( picos[1] , compOven_vec , 'o' )
# ax.plot( picos[0] , compOven_vec , '.')
# ax.plot( picos[1] , compOven_vec , 'o' )
......@@ -414,27 +416,29 @@ profundidad_dev = [ np.array(np.array(picos[0])[compOven_vec==val].tolist()+np.
compOven_uniq = np.unique(compOven_vec)
ax.plot( profundidad_mean , compOven_uniq , 'o-', color='gray' , alpha=0.5 )
ax.errorbar( profundidad_mean , compOven_uniq , xerr=profundidad_dev , color='gray' ,capsize=5)
ax.plot( profundidad_mean , compOven_uniq , 'o-', color='black' , alpha=1 )
ax.errorbar( profundidad_mean , compOven_uniq , xerr=profundidad_dev , color='black' ,capsize=3)
ax.set_xlabel('Profundidad')
ax.set_xlabel('Profundidad media de resonancias')
axx[0].set_ylabel('compOven [V]')
axx[0].set_xlabel('frecuencia [kHz]')
axx[0].set_ylabel('Voltaje electrodo (V)', fontsize=10)
axx[0].set_xlabel('Desintonía IR1 (MHz)',fontsize=10)
axx[0].grid(alpha=0.5)
axx[1].grid(alpha=0.5)
for ax in axx:
ax.grid(b=True,linestyle=':',color='lightgray')
# for ax in axx:
# ax.grid(b=True,linestyle=':',color='lightgray')
ax.set_xlim( 0, ax.get_xlim()[1] )
fig.suptitle("Configuracion +2/-2 colineales, ion al costado del haz compOven")
# fig.suptitle("Configuración +2/-2 colineales")
# fig.savefig("config+2-2_colineal_ion_al_costado_compOven.png")
plt.savefig('C://Users//nicon//Nextcloud//Nico//Doctorado//Tesis//Tesis_doctorado//Chapters//figures//Cap8//fig3a.pdf')
......@@ -572,7 +576,7 @@ ax.set_xlim( 0, ax.get_xlim()[1] )
fig.suptitle("Configuracion +2/-2 colineales, ion arriba del haz dcA")
fig.savefig("config+2-2_colineal_ion_ariba_dcA.png")
# fig.savefig("config+2-2_colineal_ion_ariba_dcA.png")
......
......@@ -270,170 +270,190 @@ for ii,DATO in enumerate(DATOS_COMPLETOS[0:]):
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#%% CVersion AREA
"""
FIGURA TESIS PARTE 2
"""
FACTOR_ESCALA = 10
for ii,DATO in enumerate(DATOS_COMPLETOS):
VECTOR_DE_DATOS, SUP_TITLE, FILENAME = DATO
# Grafico con subplots
fig,axx = plt.subplots(1,2,figsize=(12,8), constrained_layout=True , sharey=True )
fig.set_constrained_layout_pads(w_pad=1/72, h_pad=0, hspace=0, wspace=0)
rango_dr1 = np.array([435,437])
rango_dr2 = np.array([443,445])
I_base_fit = np.arange(0,50).tolist()+np.arange(230,280).tolist()+np.arange(450,459).tolist()
I_base_fit = np.array(I_base_fit)
ax = axx[0]
if ii==1:
# plt.figure()
# ax = plt.gca()
NORMALIZADO = True
rango_dr1 = np.array([435,437])
rango_dr2 = np.array([443,446])
picos = {0:[], 1:[]}
picos_err = {0:[], 1:[]}
dcA_vec = []
for data in sorted([ h5py.File(DataFile, 'r') for DataFile in VECTOR_DE_DATOS ],key=lambda x: np.array(x['datasets']['initialvoltage_dcA']) ):
frecuencia = np.array(data['datasets']['IR1_Frequencies'])*2e-6
voltages = np.array(data['datasets']['scanning_voltages'])
for kk, dcA in enumerate( voltages ):
VECTOR_DE_DATOS, SUP_TITLE, FILENAME = DATO
# cuentas = np.array(data['datasets']['data_array'])
cuentas = np.array(data['datasets']['data_array']).reshape(len(voltages),-1)[kk][0:len(frecuencia)]
amplitudes = np.array(data['datasets']['IR1_Amplitudes'])
# dcA = np.array(data['datasets']['initialvoltage_dcA'])
dcA_vec.append( dcA.tolist() )
frecuencia,cuentas = clean_jumps_below(frecuencia,cuentas, 200)
cuentas_suave = savgol(cuentas,13,4)
# cuentas_suave = cuentas
I_base_fit = np.arange(len(frecuencia))[:50].tolist()
I_base_fit += np.arange(len(frecuencia))[(frecuencia>=439)&(frecuencia<=442)].tolist()
# I_base_fit += np.arange(len(frecuencia))[(frecuencia>=500)&(frecuencia<=442)].tolist()
I_base_fit = np.array(I_base_fit)
mm,cov = np.polyfit(frecuencia[I_base_fit], cuentas[I_base_fit],1, cov=True)
base = np.polyval(mm,frecuencia)
# Grafico con subplots
fig,axx = plt.subplots(1,2,figsize=(6.5,3.2), constrained_layout=True , sharey=True )
fig.set_constrained_layout_pads(w_pad=1/72, h_pad=0, hspace=0, wspace=0)
rango_dr1 = np.array([435,437])
rango_dr2 = np.array([443,445])
I_base_fit = np.arange(0,50).tolist()+np.arange(230,280).tolist()+np.arange(450,459).tolist()
I_base_fit = np.array(I_base_fit)
ax = axx[0]
# plt.figure()
# ax = plt.gca()
NORMALIZADO = True
rango_dr1 = np.array([435,437])
rango_dr2 = np.array([443,446])
picos = {0:[], 1:[]}
picos_err = {0:[], 1:[]}
dcA_vec = []
iii = 0
for data in sorted([ h5py.File(DataFile, 'r') for DataFile in VECTOR_DE_DATOS ],key=lambda x: np.array(x['datasets']['initialvoltage_dcA']) ):
frecuencia = np.array(data['datasets']['IR1_Frequencies'])*2e-6
voltages = np.array(data['datasets']['scanning_voltages'])
for kk, dcA in enumerate( voltages ):
CURVA = (cuentas/base-1)/FACTOR_ESCALA + dcA
CURVA_SUAVE = (cuentas_suave/base-1)/FACTOR_ESCALA+ dcA
ax.plot(frecuencia,CURVA , '.', alpha=0.1)
ax.plot(frecuencia,CURVA_SUAVE, '-', alpha=0.9, color=ax.get_lines()[-1].get_color())
# cuentas = np.array(data['datasets']['data_array'])
cuentas = np.array(data['datasets']['data_array']).reshape(len(voltages),-1)[kk][0:len(frecuencia)]
amplitudes = np.array(data['datasets']['IR1_Amplitudes'])
# dcA = np.array(data['datasets']['initialvoltage_dcA'])
dcA_vec.append( dcA.tolist() )
frecuencia,cuentas = clean_jumps_below(frecuencia,cuentas, 200)
cuentas_suave = savgol(cuentas,13,4)
# cuentas_suave = cuentas
I_base_fit = np.arange(len(frecuencia))[:50].tolist()
I_base_fit += np.arange(len(frecuencia))[(frecuencia>=439)&(frecuencia<=442)].tolist()
# I_base_fit += np.arange(len(frecuencia))[(frecuencia>=500)&(frecuencia<=442)].tolist()
I_base_fit = np.array(I_base_fit)
mm,cov = np.polyfit(frecuencia[I_base_fit], cuentas[I_base_fit],1, cov=True)
base = np.polyval(mm,frecuencia)
CURVA = (cuentas/base-1)/FACTOR_ESCALA + dcA
CURVA_SUAVE = (cuentas_suave/base-1)/FACTOR_ESCALA+ dcA
if iii>1:
ax.plot([f-440 for f in frecuencia],CURVA , '.', alpha=0.1)
ax.plot([f-440 for f in frecuencia],CURVA_SUAVE, '-', alpha=0.9, color=ax.get_lines()[-1].get_color())
else:
pass
for jj,rango in enumerate([rango_dr1,rango_dr2]):
I = np.arange(len(frecuencia))[(frecuencia>rango.min())&(frecuencia<rango.max())]
idx = cuentas_suave[I].argmin() + I[0]
if iii>1:
ax.plot(frecuencia[idx]-440,(cuentas_suave[idx]/base[idx]-1)/FACTOR_ESCALA+dcA, 'o', ms=6, color=ax.get_lines()[-1].get_color(),zorder=10)
else:
pass
Base = np.polyval(mm,rango.mean())
Base_err = np.sqrt(np.sum(np.diag(cov)*np.array([frecuencia[idx]**2,1])))
val_pico = cuentas_suave[I].min()
picos[jj].append( (Base-val_pico)/Base )
# picos_err[jj].append( np.sqrt(cuentas[idx])/Base )
picos_err[jj].append( np.sqrt(cuentas[idx])/Base + cuentas[idx]*np.sqrt(cuentas[idx])/Base**2 )
print( (Base-val_pico)/Base , end="\t")
iii=iii+1
print('')
# break
# break
# ax.plot(frecuencia,cuentas , label=dcA)
# plt.pause(2)
# plt.cla()
# ax.plot(cuentas , label=dcA)
for jj,rango in enumerate([rango_dr1,rango_dr2]):
I = np.arange(len(frecuencia))[(frecuencia>rango.min())&(frecuencia<rango.max())]
idx = cuentas_suave[I].argmin() + I[0]
ax.plot(frecuencia[idx],(cuentas_suave[idx]/base[idx]-1)/FACTOR_ESCALA+dcA, 'o', ms=6, color=ax.get_lines()[-1].get_color(),zorder=10)
Base = np.polyval(mm,rango.mean())
Base_err = np.sqrt(np.sum(np.diag(cov)*np.array([frecuencia[idx]**2,1])))
val_pico = cuentas_suave[I].min()
picos[jj].append( (Base-val_pico)/Base )
# picos_err[jj].append( np.sqrt(cuentas[idx])/Base )
picos_err[jj].append( np.sqrt(cuentas[idx])/Base + cuentas[idx]*np.sqrt(cuentas[idx])/Base**2 )
print( (Base-val_pico)/Base , end="\t")
print('')
# break
# break
# ax.plot(frecuencia,cuentas , label=dcA)
# plt.plot(frecuencia,amplitudes )
# ax.legend()
# plt.pause(2)
# plt.cla()
# ax.plot(cuentas , label=dcA)
# ax.axvline(rango_dr1.mean(), color='gray', zorder=-10, lw=3 , alpha=0.5)
# ax.axvline(rango_dr2.mean(), color='gray', zorder=-10, lw=3, ls='--', alpha=0.5)
ax = axx[1]
dcA_vec = np.array(dcA_vec)
picos[0] = np.array(picos[0])
picos[1] = np.array(picos[1])
picos_err[0] = np.array(picos_err[0])
picos_err[1] = np.array(picos_err[1])
# ax.fill_betweenx( dcA_vec, picos[0]+ picos_err[0],picos[0]- picos_err[0] , alpha=0.6)
# ax.fill_betweenx( dcA_vec, picos[1]+ picos_err[1],picos[1]- picos_err[1] , alpha=0.6)
# for pico,pico_err,dcA_val in zip(picos[0],picos_err[0],dcA_vec):
# # ax.plot( pico, dcA_val, '.' ,ms=7)
# ax.errorbar( pico, dcA_val, xerr=pico_err, fmt='.' ,ms=7, capsize=4)
# ax.set_prop_cycle(None)
# # ax.plot( picos[0] , dcA_vec , '.-' , color='C0')
# # ax.plot( picos[1] , dcA_vec , 'o--' , color='C1')
# for pico,pico_err,dcA_val in zip(picos[1],picos_err[1],dcA_vec):
# # ax.plot( pico, dcA_val, 'o' ,ms=7)
# ax.errorbar( pico, dcA_val, xerr=pico_err, fmt='.' ,ms=7, capsize=4)
profundidad_mean = [ np.array(np.array(picos[0])[dcA_vec==val].tolist()+np.array(picos[1])[dcA_vec==val].tolist()).mean() for val in np.unique(dcA_vec) ]
profundidad_dev = [ np.array(np.array(picos[0])[dcA_vec==val].tolist()+np.array(picos[1])[dcA_vec==val].tolist()).std() for val in np.unique(dcA_vec) ]
dcA_uniq = np.unique(dcA_vec)
ax.plot( profundidad_mean[2:] , dcA_uniq[2:] , 'o-', color='black' , alpha=1 )
ax.errorbar( profundidad_mean[2:] , dcA_uniq[2:] , xerr=profundidad_dev[2:] , color='black' ,capsize=3)
# plt.plot(frecuencia,amplitudes )
# ax.legend()
ax.axvline(rango_dr1.mean(), color='gray', zorder=-10, lw=3 , alpha=0.5)
ax.axvline(rango_dr2.mean(), color='gray', zorder=-10, lw=3, ls='--', alpha=0.5)
ax = axx[1]
dcA_vec = np.array(dcA_vec)
picos[0] = np.array(picos[0])
picos[1] = np.array(picos[1])
picos_err[0] = np.array(picos_err[0])
picos_err[1] = np.array(picos_err[1])
ax.fill_betweenx( dcA_vec, picos[0]+ picos_err[0],picos[0]- picos_err[0] , alpha=0.6)
ax.fill_betweenx( dcA_vec, picos[1]+ picos_err[1],picos[1]- picos_err[1] , alpha=0.6)
# for pico,pico_err,dcA_val in zip(picos[0],picos_err[0],dcA_vec):
# # ax.plot( pico, dcA_val, '.' ,ms=7)
# ax.errorbar( pico, dcA_val, xerr=pico_err, fmt='.' ,ms=7, capsize=4)
# ax.set_prop_cycle(None)
ax.plot( picos[0] , dcA_vec , '.-' , color='C0')
ax.plot( picos[1] , dcA_vec , 'o--' , color='C1')
# for pico,pico_err,dcA_val in zip(picos[1],picos_err[1],dcA_vec):
# # ax.plot( pico, dcA_val, 'o' ,ms=7)
# ax.errorbar( pico, dcA_val, xerr=pico_err, fmt='.' ,ms=7, capsize=4)
profundidad_mean = [ np.array(np.array(picos[0])[dcA_vec==val].tolist()+np.array(picos[1])[dcA_vec==val].tolist()).mean() for val in np.unique(dcA_vec) ]
profundidad_dev = [ np.array(np.array(picos[0])[dcA_vec==val].tolist()+np.array(picos[1])[dcA_vec==val].tolist()).std() for val in np.unique(dcA_vec) ]
dcA_uniq = np.unique(dcA_vec)
axx[0].set_ylabel('Voltaje electrodo (V)', fontsize=10)
axx[0].set_xlabel('Desintonía IR1 (MHz)',fontsize=10)
axx[0].grid(alpha=0.5)
axx[1].grid(alpha=0.5)
axx[1].set_xlabel('Profundidad media de resonancias')
# for ax in axx:
# ax.grid(b=True,linestyle=':',color='lightgray')
ax.set_xlim( 0, ax.get_xlim()[1] )
ax.set_xlabel('Profundidad')
axx[0].set_ylabel(f'{SUP_TITLE.split()[-1]} [V]')
axx[0].set_xlabel('frecuencia [kHz]')
for ax in axx:
ax.grid(b=True,linestyle=':',color='lightgray')
ax.set_xlim( 0, ax.get_xlim()[1] )
fig.suptitle(SUP_TITLE)
fig.savefig(f"area_{ii+1:02d}_{FILENAME}")
axx[0].set_xlim(-8,8)
axx[0].set_xticks([-5,0,5])
plt.savefig('C://Users//nicon//Nextcloud//Nico//Doctorado//Tesis//Tesis_doctorado//Chapters//figures//Cap8//fig3b.pdf')
# fig.suptitle(SUP_TITLE)
# fig.savefig(f"area_{ii+1:02d}_{FILENAME}")
# break
......@@ -58,7 +58,7 @@ def HImatrix(rabG, rabP, phidoppler, titadoppler, phiprobe, titaprobe, circulari
i, j = 2, 4
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.cos(titadoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 5
HI[i-1, j-1] = -(rabP/2) * np.sin(titaprobe)*(np.cos(phiprobe)-1j*np.sin(phiprobe)*circularityprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
......@@ -72,6 +72,7 @@ def HImatrix(rabG, rabP, phidoppler, titadoppler, phiprobe, titaprobe, circulari
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 6
HI[i-1, j-1] = -(rabP/np.sqrt(12)) * np.sin(titaprobe)*(np.cos(phiprobe)-1j*np.sin(phiprobe)*circularityprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
......
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jul 2 16:30:09 2020
@author: oem
"""
import os
import numpy as np
import time
import matplotlib.pyplot as plt
from scipy.signal import argrelextrema
from EITfit.threeLevel_2repumps_linealpol_python_scripts import CPTspectrum8levels, CPTspectrum8levels_fixedRabi
import random
from scipy.signal import savgol_filter as sf
def CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump):
if titadoppler==0:
NegativeDR = [(-7/5)*u, (-3/5)*u, (-1/5)*u, (1/5)*u, (3/5)*u, (7/5)*u]
elif titadoppler==90:
NegativeDR = [(-11/5)*u, (-7/5)*u, (-3/5)*u, (3/5)*u, (7/5)*u, (11/5)*u]
else:
NegativeDR = [(-11/5)*u, (-7/5)*u, (-3/5)*u, (-1/5)*u, (1/5)*u, (3/5)*u, (7/5)*u, (11/5)*u]
PositiveDR = [(-8/5)*u, (-4/5)*u, 0, (4/5)*u, (8/5)*u]
return [detuningdoppler + dr for dr in NegativeDR], [detuningrepump + dr for dr in PositiveDR]
def GetClosestIndex(Vector, value, tolerance=1e-3):
i = 0
while i<len(Vector):
if abs(Vector[i] - value) < tolerance:
return i
else:
i = i + 1
return GetClosestIndex(Vector, value, tolerance=2*tolerance)
def FindDRFrequencies(Freq, Fluo, TeoDR, entorno=3):
"""
Busca los indices y la frecuencia de los minimos en un entorno cercano al de la DR.
Si no encuentra, devuelve el valor teórico.
"""
IndiceDRteo1, IndiceEntornoinicialDRteo1, IndiceEntornofinalDRteo1 = GetClosestIndex(Freq, TeoDR[0]), GetClosestIndex(Freq, TeoDR[0]-entorno), GetClosestIndex(Freq, TeoDR[0]+entorno)
IndiceDRteo2, IndiceEntornoinicialDRteo2, IndiceEntornofinalDRteo2 = GetClosestIndex(Freq, TeoDR[1]), GetClosestIndex(Freq, TeoDR[1]-entorno), GetClosestIndex(Freq, TeoDR[1]+entorno)
IndiceDRteo3, IndiceEntornoinicialDRteo3, IndiceEntornofinalDRteo3 = GetClosestIndex(Freq, TeoDR[2]), GetClosestIndex(Freq, TeoDR[2]-entorno), GetClosestIndex(Freq, TeoDR[2]+entorno)
IndiceDRteo4, IndiceEntornoinicialDRteo4, IndiceEntornofinalDRteo4 = GetClosestIndex(Freq, TeoDR[3]), GetClosestIndex(Freq, TeoDR[3]-entorno), GetClosestIndex(Freq, TeoDR[3]+entorno)
IndiceDRteo5, IndiceEntornoinicialDRteo5, IndiceEntornofinalDRteo5 = GetClosestIndex(Freq, TeoDR[4]), GetClosestIndex(Freq, TeoDR[4]-entorno), GetClosestIndex(Freq, TeoDR[4]+entorno)
IndiceDRteo6, IndiceEntornoinicialDRteo6, IndiceEntornofinalDRteo6 = GetClosestIndex(Freq, TeoDR[5]), GetClosestIndex(Freq, TeoDR[5]-entorno), GetClosestIndex(Freq, TeoDR[5]+entorno)
EntornoFreqDR1, EntornoFreqDR2 = Freq[IndiceEntornoinicialDRteo1:IndiceEntornofinalDRteo1], Freq[IndiceEntornoinicialDRteo2:IndiceEntornofinalDRteo2]
EntornoFreqDR3, EntornoFreqDR4 = Freq[IndiceEntornoinicialDRteo3:IndiceEntornofinalDRteo3], Freq[IndiceEntornoinicialDRteo4:IndiceEntornofinalDRteo4]
EntornoFreqDR5, EntornoFreqDR6 = Freq[IndiceEntornoinicialDRteo5:IndiceEntornofinalDRteo5], Freq[IndiceEntornoinicialDRteo6:IndiceEntornofinalDRteo6]
EntornoFluoDR1, EntornoFluoDR2 = Fluo[IndiceEntornoinicialDRteo1:IndiceEntornofinalDRteo1], Fluo[IndiceEntornoinicialDRteo2:IndiceEntornofinalDRteo2]
EntornoFluoDR3, EntornoFluoDR4 = Fluo[IndiceEntornoinicialDRteo3:IndiceEntornofinalDRteo3], Fluo[IndiceEntornoinicialDRteo4:IndiceEntornofinalDRteo4]
EntornoFluoDR5, EntornoFluoDR6 = Fluo[IndiceEntornoinicialDRteo5:IndiceEntornofinalDRteo5], Fluo[IndiceEntornoinicialDRteo6:IndiceEntornofinalDRteo6]
IndiceFluoMinimaEntorno1, IndiceFluoMinimaEntorno2 = argrelextrema(np.array(EntornoFluoDR1), np.less)[0], argrelextrema(np.array(EntornoFluoDR2), np.less)[0]
IndiceFluoMinimaEntorno3, IndiceFluoMinimaEntorno4 = argrelextrema(np.array(EntornoFluoDR3), np.less)[0], argrelextrema(np.array(EntornoFluoDR4), np.less)[0]
IndiceFluoMinimaEntorno5, IndiceFluoMinimaEntorno6 = argrelextrema(np.array(EntornoFluoDR5), np.less)[0], argrelextrema(np.array(EntornoFluoDR6), np.less)[0]
try:
FreqDR1 = EntornoFreqDR1[int(IndiceFluoMinimaEntorno1)]
IndiceDR1 = GetClosestIndex(Freq, FreqDR1)
except:
FreqDR1 = TeoDR[0]
IndiceDR1 = IndiceDRteo1
try:
FreqDR2 = EntornoFreqDR2[int(IndiceFluoMinimaEntorno2)]
IndiceDR2 = GetClosestIndex(Freq, FreqDR2)
except:
FreqDR2 = TeoDR[1]
IndiceDR2 = IndiceDRteo2
try:
FreqDR3 = EntornoFreqDR3[int(IndiceFluoMinimaEntorno3)]
IndiceDR3 = GetClosestIndex(Freq, FreqDR3)
except:
FreqDR3 = TeoDR[2]
IndiceDR3 = IndiceDRteo3
try:
FreqDR4 = EntornoFreqDR4[int(IndiceFluoMinimaEntorno4)]
IndiceDR4 = GetClosestIndex(Freq, FreqDR4)
except:
FreqDR4 = TeoDR[3]
IndiceDR4 = IndiceDRteo4
try:
FreqDR5 = EntornoFreqDR5[int(IndiceFluoMinimaEntorno5)]
IndiceDR5 = GetClosestIndex(Freq, FreqDR5)
except:
FreqDR5 = TeoDR[4]
IndiceDR5 = IndiceDRteo5
try:
FreqDR6 = EntornoFreqDR6[int(IndiceFluoMinimaEntorno6)]
IndiceDR6 = GetClosestIndex(Freq, FreqDR6)
except:
FreqDR6 = TeoDR[5]
IndiceDR6 = IndiceDRteo6
return [IndiceDR1, IndiceDR2, IndiceDR3, IndiceDR4, IndiceDR5, IndiceDR6], [FreqDR1, FreqDR2, FreqDR3, FreqDR4, FreqDR5, FreqDR6]
def FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=1, frecuenciareferenciacriterioasintotico=-100, getindices=False):
"""
Toma los indices donde estan las DR y evalua su fluorescencia. Esos indices son minimos locales en un entorno
cercano a las DR teoricas y, si no hay ningun minimo, toma la teorica.
Luego, hace el cociente de esa fluorescencia y un factor de normalización segun NormalizationCriterium:
1: Devuelve la fluorescencia absoluta de los minimos
2: Devuelve el cociente entre la fluorescencia del minimo y un valor medio entre dos puntos lejanos, como si no
hubiera una resonancia oscura y hubiera una recta. Ese valor esta a DistanciaFrecuenciaCociente del detuning del azul (el punto medio entre las dos DR en este caso)
3: Devuelve el cociente entre la fluorescencia del minimo y el valor a -100 MHz (si se hizo de -100 a 100),
o el valor limite por izquierda de la curva
4: Deuelve el cociente entre la fluorescencia del minimo y el valor de fluorescencia a detuning 0 MHz
"""
IndiceDR1, IndiceDR2, IndiceDR3, IndiceDR4, IndiceDR5, IndiceDR6 = IndicesDR[0], IndicesDR[1], IndicesDR[2], IndicesDR[3], IndicesDR[4], IndicesDR[5]
FluorescenceOfMinimums = [Fluo[IndiceDR1], Fluo[IndiceDR2], Fluo[IndiceDR3], Fluo[IndiceDR4], Fluo[IndiceDR5], Fluo[IndiceDR6]]
FrequencyOfMinimums = [Freq[IndiceDR1], Freq[IndiceDR2], Freq[IndiceDR3], Freq[IndiceDR4], Freq[IndiceDR5], Freq[IndiceDR6]]
DistanciaFrecuenciaCociente = 25
if NormalizationCriterium==0:
print('che')
return FrequencyOfMinimums, FluorescenceOfMinimums
if NormalizationCriterium==1:
Fluorescenciacerodetuning = Fluo[GetClosestIndex(Freq, 0)]
Fluorescenciaasintotica = Fluo[GetClosestIndex(Freq, frecuenciareferenciacriterioasintotico)]
return FrequencyOfMinimums, np.array([Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica, Fluorescenciacerodetuning/Fluorescenciaasintotica])
if NormalizationCriterium==2:
k = 0
while k < len(Freq):
if Freq[k] < detuningdoppler-DistanciaFrecuenciaCociente + 2 and Freq[k] > detuningdoppler-DistanciaFrecuenciaCociente - 2:
FluoIzquierda = Fluo[k]
indiceizquierda = k
print('Izq:', Freq[k])
break
else:
k = k + 1
l = 0
while l < len(Freq):
if Freq[l] < detuningdoppler+DistanciaFrecuenciaCociente + 2 and Freq[l] > detuningdoppler+DistanciaFrecuenciaCociente - 2:
FluoDerecha = Fluo[l]
indicederecha = l
print('Der: ', Freq[l])
break
else:
l = l + 1
FluoNormDivisor = 0.5*(FluoDerecha+FluoIzquierda)
print(FluoNormDivisor)
if NormalizationCriterium==3:
#asintotico
FluoNormDivisor = Fluo[GetClosestIndex(Freq, frecuenciareferenciacriterioasintotico)]
if NormalizationCriterium==4:
#este te tira la fluorescencia de detuning 0
FluoNormDivisor = Fluo[GetClosestIndex(Freq, 0)]
RelativeFluorescenceOfMinimums = np.array([Fluore/FluoNormDivisor for Fluore in FluorescenceOfMinimums])
print('Esto: ', RelativeFluorescenceOfMinimums)
if NormalizationCriterium==2 and getindices==True:
return FrequencyOfMinimums, RelativeFluorescenceOfMinimums, indiceizquierda, indicederecha
return FrequencyOfMinimums, RelativeFluorescenceOfMinimums
def GetFinalMaps(MapasDR1, MapasDR2, MapasDR3, MapasDR4, MapasDR5, MapasDR6):
"""
Nota: esto vale para polarizacion del 397 sigma+ + sigma-. Sino hay que cambiar los coeficientes.
La estructura es:
MapasDRi = [MapaMedido_criterio1_DRi, MapaMedido_criterio2_DRi, MapaMedido_criterio3_DRi, MapaMedido_criterio4_DRi]
"""
Mapa1 = MapasDR1[0]
Mapa2pi = np.sqrt(3)*(MapasDR2[1] + MapasDR5[1])
Mapa2smas = np.sqrt(12/2)*MapasDR3[1] + (2/np.sqrt(2))*MapasDR6[1]
Mapa2smenos = (2/np.sqrt(2))*MapasDR1[1] + np.sqrt(12/2)*MapasDR4[1]
Mapa3pi = np.sqrt(3)*(MapasDR2[2] + MapasDR5[2])
Mapa3smas = np.sqrt(12/2)*MapasDR3[2] + (2/np.sqrt(2))*MapasDR6[2]
Mapa3smenos = (2/np.sqrt(2))*MapasDR1[2] + np.sqrt(12/2)*MapasDR4[2]
return Mapa1, [Mapa2pi, Mapa2smas, Mapa2smenos], [Mapa3pi, Mapa3smas, Mapa3smenos]
def CombinateDRwithCG(RelMinMedido1, RelMinMedido2, RelMinMedido3, RelMinMedido4):
Fluo1 = RelMinMedido1[0]
Fluo2pi = np.sqrt(3)*(RelMinMedido2[1] + RelMinMedido2[4])
Fluo2smas = np.sqrt(12/2)*RelMinMedido2[2] + (2/np.sqrt(2))*RelMinMedido2[5]
Fluo2smenos = (2/np.sqrt(2))*RelMinMedido2[0] + np.sqrt(12/2)*RelMinMedido2[3]
Fluo3pi = np.sqrt(3)*(RelMinMedido3[1] + RelMinMedido3[4])
Fluo3smas = np.sqrt(12/2)*RelMinMedido3[2] + (2/np.sqrt(2))*RelMinMedido3[5]
Fluo3smenos = (2/np.sqrt(2))*RelMinMedido3[0] + np.sqrt(12/2)*RelMinMedido3[3]
return Fluo1, [Fluo2pi, Fluo2smas, Fluo2smenos], [Fluo3pi, Fluo3smas, Fluo3smenos]
def IdentifyPolarizationCoincidences(theoricalmap, target, tolerance=1e-1):
"""
Busca en un mapa 2D la presencia de un valor target (medido) con tolerancia tolerance.
Si lo encuentra, pone un 1. Sino, un 0. Al plotear con pcolor se verá
en blanco la zona donde el valor medido se puede hallar.
"""
CoincidenceMatrix = np.zeros((len(theoricalmap), len(theoricalmap[0])))
i = 0
while i<len(theoricalmap):
j = 0
while j<len(theoricalmap[0]):
if abs(theoricalmap[i][j]-target) < tolerance:
CoincidenceMatrix[i][j] = 1
j=j+1
i=i+1
return CoincidenceMatrix
def RetrieveAbsoluteCoincidencesBetweenMaps(MapsVectors):
MatrixSum = np.zeros((len(MapsVectors[0]), len(MapsVectors[0][0])))
AbsoluteCoincidencesMatrix = np.zeros((len(MapsVectors[0]), len(MapsVectors[0][0])))
MatrixMapsVectors = []
for i in range(len(MapsVectors)):
MatrixMapsVectors.append(np.matrix(MapsVectors[i]))
for i in range(len(MatrixMapsVectors)):
MatrixSum = MatrixSum + MatrixMapsVectors[i]
MaxNumberOfCoincidences = np.max(MatrixSum)
ListMatrixSum = [list(i) for i in list(np.array(MatrixSum))]
for i in range(len(ListMatrixSum)):
for j in range(len(ListMatrixSum[0])):
if ListMatrixSum[i][j] == MaxNumberOfCoincidences:
AbsoluteCoincidencesMatrix[i][j] = 1
return AbsoluteCoincidencesMatrix, MaxNumberOfCoincidences
def MeasureMeanValueOfEstimatedArea(AbsoluteCoincidencesMap, X, Y):
NonZeroIndices = np.nonzero(AbsoluteCoincidencesMap)
Xsum = 0
Xvec = []
Ysum = 0
Yvec = []
N = len(NonZeroIndices[0])
for i in range(N):
Xsum = Xsum + X[NonZeroIndices[1][i]]
Xvec.append(X[NonZeroIndices[1][i]])
Ysum = Ysum + Y[NonZeroIndices[0][i]]
Yvec.append(Y[NonZeroIndices[0][i]])
Xaverage = Xsum/N
Yaverage = Ysum/N
Xspread = np.std(Xvec)
Yspread = np.std(Yvec)
return Xaverage, Yaverage, N, Xspread, Yspread
def MeasureRelativeFluorescenceFromCPT(Freq, Fluo, u, titadoppler, detuningrepump, detuningdoppler, frefasint=-100, entorno=3):
ResonanciasTeoricas, ResonanciasPositivas = CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump)
IndicesDR, FreqsDR = FindDRFrequencies(Freq, Fluo, ResonanciasTeoricas, entorno=entorno)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums0 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=0, frecuenciareferenciacriterioasintotico=frefasint)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums1 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=1, frecuenciareferenciacriterioasintotico=frefasint)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums2, indiceizquierda, indicederecha = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=2, frecuenciareferenciacriterioasintotico=frefasint, getindices=True)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums3 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=3, frecuenciareferenciacriterioasintotico=frefasint)
FrequencyOfMinimums, RelativeFluorescenceOfMinimums4 = FindRelativeFluorescencesOfDR(Freq, Fluo, IndicesDR, detuningdoppler, NormalizationCriterium=4, frecuenciareferenciacriterioasintotico=frefasint)
print('hola')
print(RelativeFluorescenceOfMinimums0)
return RelativeFluorescenceOfMinimums0, RelativeFluorescenceOfMinimums1, RelativeFluorescenceOfMinimums2, RelativeFluorescenceOfMinimums3, RelativeFluorescenceOfMinimums4, IndicesDR, [indiceizquierda, indicederecha]
def GenerateNoisyCPT(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def GenerateNoisyCPT_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def GenerateNoisyCPT_fit(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqs, plot=False, solvemode=1, detpvec=None, noiseamplitude=0.001):
Frequencyvector, Fluovector = PerformExperiment_8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, min(freqs), max(freqs) + freqs[1]-freqs[0], freqs[1]-freqs[0], plot=False, solvemode=1, detpvec=None)
NoisyFluovector = [fluo+noiseamplitude*(2*random.random()-1) for fluo in Fluovector]
return Frequencyvector, NoisyFluovector
def AddNoiseToCPT(Fluo, noisefactor):
return [f+noisefactor*(2*random.random()-1) for f in Fluo]
def SmoothNoisyCPT(Fluo, window=11, poly=3):
SmoothenFluo = sf(Fluo, window, poly)
return SmoothenFluo
def GetMinimaInfo(Freq, Fluo, u, titadoppler, detuningdoppler, detuningrepump, MinimumCriterium=2, NormalizationCriterium=1):
"""
FUNCION VIEJA
Esta funcion devuelve valores de frecuencias y fluorescencia relativa de los minimos.
Minimumcriterion:
1: Saca los minimos con funcion argelextrema
2: Directamente con las frecuencias teoricas busca las fluorescencias
Normalizationcriterium:
1: Devuelve la fluorescencia absoluta de los minimos
2: Devuelve el cociente entre la fluorescencia del minimo y un valor medio entre dos puntos lejanos, como si no
hubiera una resonancia oscura y hubiera una recta. Ese valor esta a DistanciaFrecuenciaCociente del detuning del azul (el punto medio entre las dos DR en este caso)
3: Devuelve el cociente entre la fluorescencia del minimo y el valor a -100 MHz (si se hizo de -100 a 100),
o el valor limite por izquierda de la curva
"""
FluorescenceOfMaximum = max(Fluo)
FrequencyOfMaximum = Freq[Fluo.index(FluorescenceOfMaximum)]
#criterio para encontrar los minimos
#criterio usando minimos de la fluorescencia calculados con la curva
if MinimumCriterium == 1:
LocationOfMinimums = argrelextrema(np.array(Fluo), np.less)[0]
FluorescenceOfMinimums = np.array([Fluo[i] for i in LocationOfMinimums])
FrequencyOfMinimums = np.array([Freq[j] for j in LocationOfMinimums])
#criterio con las DR teoricas
if MinimumCriterium == 2:
FrecuenciasDRTeoricas, FrecuenciasDRTeoricasPositivas = [darkresonance for darkresonance in CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump)[0]]
FrequencyOfMinimums = []
FluorescenceOfMinimums =[]
print(FrecuenciasDRTeoricas)
k=0
ventanita = 0.001
while k < len(Freq):
if Freq[k] < FrecuenciasDRTeoricas[0] + ventanita and Freq[k] > FrecuenciasDRTeoricas[0] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[1] + ventanita and Freq[k] > FrecuenciasDRTeoricas[1] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[2] + ventanita and Freq[k] > FrecuenciasDRTeoricas[2] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[3] + ventanita and Freq[k] > FrecuenciasDRTeoricas[3] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[4] + ventanita and Freq[k] > FrecuenciasDRTeoricas[4] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
elif Freq[k] < FrecuenciasDRTeoricas[5] + ventanita and Freq[k] > FrecuenciasDRTeoricas[5] - ventanita:
FrequencyOfMinimums.append(Freq[k])
FluorescenceOfMinimums.append(Fluo[k])
k = k + 1
print(FrequencyOfMinimums)
if len(FrequencyOfMinimums) != len(FrecuenciasDRTeoricas):
print('NO ANDA BIEN ESTO PAPI, revisalo')
#esto es para establecer un criterio para la fluorescencia relativa
DistanciaFrecuenciaCociente = 15
if NormalizationCriterium==1:
FluoNormDivisor = 1
if NormalizationCriterium==2:
k = 0
while k < len(Freq):
if Freq[k] < detuningdoppler-DistanciaFrecuenciaCociente + 2 and Freq[k] > detuningdoppler-DistanciaFrecuenciaCociente - 2:
FluoIzquierda = Fluo[k]
print('Izq:', Freq[k])
break
else:
k = k + 1
l = 0
while l < len(Freq):
if Freq[l] < detuningdoppler+DistanciaFrecuenciaCociente + 2 and Freq[l] > detuningdoppler+DistanciaFrecuenciaCociente - 2:
FluoDerecha = Fluo[l]
print('Der: ', Freq[l])
break
else:
l = l + 1
FluoNormDivisor = 0.5*(FluoDerecha+FluoIzquierda)
print(FluoNormDivisor)
if NormalizationCriterium==3:
FluoNormDivisor = Fluo[0]
RelativeFluorescenceOfMinimums = np.array([Fluore/FluoNormDivisor for Fluore in FluorescenceOfMinimums])
return FrequencyOfMinimums, RelativeFluorescenceOfMinimums
def GetPlotsofFluovsAngle_8levels(FrequencyOfMinimumsVector, RelativeFluorescenceOfMinimumsVector, u, titadoppler, detuningdoppler, detuningrepump, ventana=0.25, taketheoricalDR=False):
#primero buscamos las frecuencias referencia que se parezcan a las 6:
i = 0
FrecuenciasReferenciaBase = FrequencyOfMinimumsVector[0]
FrecuenciasDRTeoricas = [darkresonance for darkresonance in CalculoTeoricoDarkResonances_8levels(u, titadoppler, detuningdoppler, detuningrepump)[0]]
while i < len(FrequencyOfMinimumsVector):
if len(FrequencyOfMinimumsVector[i])==len(FrecuenciasDRTeoricas):
FrecuenciasReferenciaBase = FrequencyOfMinimumsVector[i]
print('Cool! Taking the DR identified with any curve')
break
else:
i = i + 1
if i==len(FrequencyOfMinimumsVector):
print('No hay ningun plot con 5 resonancias oscuras. Tomo las teóricas')
FrecuenciasReferenciaBase = FrecuenciasDRTeoricas
if taketheoricalDR:
FrecuenciasReferenciaBase = FrecuenciasDRTeoricas
Ventana = abs(ventana*(FrecuenciasReferenciaBase[1] - FrecuenciasReferenciaBase[0])) #ventana separadora de resonancias
print('Ventana = ', Ventana)
DarkResonance1Frequency = []
DarkResonance1Fluorescence = []
DarkResonance2Frequency = []
DarkResonance2Fluorescence = []
DarkResonance3Frequency = []
DarkResonance3Fluorescence = []
DarkResonance4Frequency = []
DarkResonance4Fluorescence = []
DarkResonance5Frequency = []
DarkResonance5Fluorescence = []
DarkResonance6Frequency = []
DarkResonance6Fluorescence = []
i = 0
while i < len(FrequencyOfMinimumsVector):
j = 0
FrecuenciasReferencia = [i for i in FrecuenciasReferenciaBase]
while j < len(FrequencyOfMinimumsVector[i]):
if abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[0])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[0])-Ventana):
DarkResonance1Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance1Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[0] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[1])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[1])-Ventana):
DarkResonance2Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance2Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[1] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[2])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[2])-Ventana):
DarkResonance3Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance3Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[2] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[3])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[3])-Ventana):
DarkResonance4Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance4Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[3] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[4])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[4])-Ventana):
DarkResonance5Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance5Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[4] = 0
elif abs(FrequencyOfMinimumsVector[i][j]) < (abs(FrecuenciasReferencia[5])+Ventana) and abs(FrequencyOfMinimumsVector[i][j]) >= (abs(FrecuenciasReferencia[5])-Ventana):
DarkResonance6Frequency.append(FrequencyOfMinimumsVector[i][j])
DarkResonance6Fluorescence.append(RelativeFluorescenceOfMinimumsVector[i][j])
FrecuenciasReferencia[5] = 0
else:
#print('Algo anduvo mal, por ahi tenes que cambiar la ventana che')
pass
j = j + 1
if np.count_nonzero(FrecuenciasReferencia) > 0:
if FrecuenciasReferencia[0] != 0:
DarkResonance1Frequency.append(FrecuenciasReferencia[0])
DarkResonance1Fluorescence.append()
if FrecuenciasReferencia[1] != 0:
DarkResonance2Frequency.append(FrecuenciasReferencia[1])
DarkResonance2Fluorescence.append(0)
if FrecuenciasReferencia[2] != 0:
DarkResonance3Frequency.append(FrecuenciasReferencia[2])
DarkResonance3Fluorescence.append(0)
if FrecuenciasReferencia[3] != 0:
DarkResonance4Frequency.append(FrecuenciasReferencia[3])
DarkResonance4Fluorescence.append(0)
if FrecuenciasReferencia[4] != 0:
DarkResonance5Frequency.append(FrecuenciasReferencia[4])
DarkResonance5Fluorescence.append(0)
if FrecuenciasReferencia[5] != 0:
DarkResonance6Frequency.append(FrecuenciasReferencia[5])
DarkResonance6Fluorescence.append(0)
i = i + 1
return DarkResonance1Frequency, DarkResonance1Fluorescence, DarkResonance2Frequency, DarkResonance2Fluorescence, DarkResonance3Frequency, DarkResonance3Fluorescence, DarkResonance4Frequency, DarkResonance4Fluorescence, DarkResonance5Frequency, DarkResonance5Fluorescence, DarkResonance6Frequency, DarkResonance6Fluorescence, FrecuenciasReferenciaBase
def PerformExperiment_8levels(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None):
"""
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
"""
Fluovectors = []
for titaprobe in titaprobeVec:
tinicial = time.time()
ProbeDetuningVectorL, Fluovector = CPTspectrum8levels(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=False, solvemode=1)
tfinal = time.time()
print('Done angle ', titarepump, ' Total time: ', round((tfinal-tinicial), 2), "s")
if plot:
plt.figure()
plt.xlabel('Repump detuning (MHz')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(ProbeDetuningVectorL, Fluovector, label=str(titarepump)+'º tita repump, T: ' + str(T*1e3) + ' mK')
plt.legend()
Fluovectors.append(Fluovector)
if len(titaprobeVec) == 1: #esto es para que no devuelva un vector de vectores si solo fijamos un angulo
Fluovectors = Fluovector
return ProbeDetuningVectorL, Fluovectors
def PerformExperiment_8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobeVec, phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None):
"""
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
"""
Fluovectors = []
for titaprobe in titaprobeVec:
tinicial = time.time()
ProbeDetuningVectorL, Fluovector = CPTspectrum8levels_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=False, solvemode=1)
tfinal = time.time()
print('Done angle ', titarepump, ' Total time: ', round((tfinal-tinicial), 2), "s")
if plot:
plt.figure()
plt.xlabel('Repump detuning (MHz')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(ProbeDetuningVectorL, Fluovector, label=str(titarepump)+'º tita repump, T: ' + str(T*1e3) + ' mK')
plt.legend()
Fluovectors.append(Fluovector)
if len(titaprobeVec) == 1: #esto es para que no devuelva un vector de vectores si solo fijamos un angulo
Fluovectors = Fluovector
return ProbeDetuningVectorL, Fluovectors
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Sep 1 17:58:39 2020
@author: oem
"""
import os
import numpy as np
#os.chdir('/home/oem/Nextcloud/G_liaf/liaf-TrampaAnular/Código General/EIT-CPT/Buenos Aires/Experiment Simulations/CPT scripts/Eight Level 2 repumps')
from threeLevel_2repumps_AnalysisFunctions import CalculoTeoricoDarkResonances_8levels, GetMinimaInfo, GetPlotsofFluovsAngle_8levels, PerformExperiment_8levels, FindDRFrequencies, FindRelativeFluorescencesOfDR, GenerateNoisyCPT, SmoothNoisyCPT, GetFinalMaps, GenerateNoisyCPT_fixedRabi, GenerateNoisyCPT_fit
import matplotlib.pyplot as plt
import time
from threeLevel_2repumps_AnalysisFunctions import MeasureRelativeFluorescenceFromCPT, IdentifyPolarizationCoincidences, RetrieveAbsoluteCoincidencesBetweenMaps, GetClosestIndex
#C:\Users\Usuario\Nextcloud\G_liaf\liaf-TrampaAnular\Código General\EIT-CPT\Buenos Aires\Experiment Simulations\CPT scripts\Eight Level 2 repumps
ub = 9.27e-24
h = 6.63e-34
c = (ub/h)*1e-4 #en unidades de MHz/G
#u = 1e6
u = 33.5e6
B = (u/(2*np.pi))/c
#sg, sp = 0.6, 5 #parámetros de control, saturación del doppler y repump
#rabG, rabP = sg*gPS, sp*gPD #frecuencias de rabi
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6 #anchos de linea de las transiciones
lw = 0.1
DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth = lw, lw, lw #ancho de linea de los laseres
DetDoppler = -36 #42
DetRepumpVec = [DetDoppler+29.6]
Tvec = [0.7] #temperatura en mK
alpha = 0*(np.pi/180) #angulo entre los láseres
phidoppler, titadoppler = 0, 90
phirepump, titarepump = 0, 0
phiprobe = 0
titaprobe = 90
#Calculo las resonancias oscuras teóricas
#ResonanciasTeoricas, DRPositivas = CalculoTeoricoDarkResonances_8levels(u/(2*np.pi*1e6), titadoppler, DetDoppler, DetRepump)
#Parametros de la simulacion cpt
center = -45
span = 80
freqMin = center-span*0.5
freqMax = center+span*0.5
""" parametros para tener espectros coherentes
freqMin = -56
freqMax = 14
"""
freqStep = 1e-1
noiseamplitude = 0
RelMinMedido0Vector = []
RelMinMedido1Vector = []
RelMinMedido2Vector = []
RelMinMedido3Vector = []
RelMinMedido4Vector = []
#Sr = np.arange(0, 10, 0.2)
#Sg = np.arange(0.01, 1, 0.05)
#Sp = np.arange(0.1, 6.1, 1)
#Sg = [0.6**2]
#Sp = [2.3**2]
Sg = [1.4]
Sp = [6]
Sr = [11]
i = 0
save = False
showFigures = True
if not showFigures:
plt.ioff()
else:
plt.ion()
fig1, ax1 = plt.subplots()
offsetx = 464
ax1.plot([f-offsetx for f in FreqsDR], CountsDR, 'o')
run = True
Scale = 730
Offset = 600 #600 para 20k cuentas aprox
MaxCoherenceValue = []
for sg in Sg:
for sp in Sp:
rabG, rabP = sg*gPS, sp*gPD
for Ti in Tvec:
T = Ti*1e-3
for DetRepump in DetRepumpVec:
print(T)
for sr in Sr:
rabR = sr*gPD
#MeasuredFreq, MeasuredFluo = GenerateNoisyCPT(rabG, rabR, rabP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
if run:
MeasuredFreq4, MeasuredFluo4 = GenerateNoisyCPT_fixedRabi(sg, sr, sp, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqMin, freqMax, freqStep, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
#SmoothFluo = SmoothNoisyCPT(MeasuredFluo, window=9, poly=2)
SmoothFluo4 = MeasuredFluo4
#Scale = max(BestC)/max([100*s for s in SmoothFluo4])
ax1.plot(MeasuredFreq4, [Scale*100*f + Offset for f in SmoothFluo4], label=f'Sr = {sr}')
ax1.axvline(DetDoppler, linestyle='--', linewidth=1)
#if sr != 0:
#ax1.axvline(DetRepump, linestyle='--', linewidth=1)
MaxCoherenceValue.append(np.max(SmoothFluo4))
#print(titaprobe)
ax1.set_xlabel('Detuning Rebombeo (MHz)')
ax1.set_ylabel('Fluorescencia (AU)')
ax1.set_title(f'B: {round(B, 2)} G, Sdop: {round(sg, 2)}, Sp: {round(sp, 2)}, Sr: {round(sr, 2)}, lw: {lw} MHz, T: {Ti} mK')
#ax1.set_ylim(0, 8)
#ax1.axvline(DetDoppler, linestyle='dashed', color='red', linewidth=1)
#ax1.axvline(DetRepump, linestyle='dashed', color='black', linewidth=1)
#ax1.set_title('Pol Doppler y Repump: Sigma+ Sigma-, Pol Probe: PI')
#ax1.legend()
ax1.grid()
print (f'{i+1}/{len(Sg)*len(Sp)}')
i = i + 1
if save:
plt.savefig(f'Mapa_plots_100k_1mk/CPT_SMSM_sdop{round(sg, 2)}_sp{round(sp, 2)}_sr{round(sr, 2)}.jpg')
ax1.legend()
"""
plt.figure()
plt.plot(Sr, MaxCoherenceValue, 'o')
plt.xlabel('Sr')
plt.ylabel('Coherence')
"""
"""
plt.figure()
plt.plot(MeasuredFreq, [100*f for f in SmoothFluo], color='darkred')
plt.xlabel('Desintonía 866 (MHz)')
plt.ylabel('Fluorescencia (A.U.)')
plt.axvline(-30, color='darkblue', linewidth=1.2, linestyle='--')
plt.yticks(np.arange(0.4, 1.8, 0.2))
plt.ylim(0.5, 1.6)
plt.grid()
plt.figure()
plt.plot(MeasuredFreq4, [100*f for f in SmoothFluo4], color='darkred')
plt.xlabel('Desintonía 866 (MHz)')
plt.ylabel('Fluorescencia (A.U.)')
plt.axvline(-30, color='darkblue', linewidth=1.2, linestyle='--')
plt.yticks(np.arange(0.8, 2.4, 0.4))
plt.grid()
"""
#%%
from scipy.optimize import curve_fit
T = 0.5e-3
sg = 0.7
sp = 6
sr = 0
DetDoppler = -14
DetRepump = 0
FitsSp = []
FitsOffset = []
Sg = [0.87]
def FitEIT(freqs, SP, offset):
MeasuredFreq, MeasuredFluo = GenerateNoisyCPT_fit(0.87, sr, SP, gPS, gPD, DetDoppler, DetRepump, u, DopplerLaserLinewidth, RepumpLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, [titaprobe], phirepump, titarepump, freqs, plot=False, solvemode=1, detpvec=None, noiseamplitude=noiseamplitude)
FinalFluo = [f*43000 + 2685 for f in MeasuredFluo]
return FinalFluo
freqs = [f-offsetx+32 for f in FreqsDR]
freqslong = np.arange(min(freqs), max(freqs)+freqs[1]-freqs[0], 0.1*(freqs[1]-freqs[0]))
popt, pcov = curve_fit(FitEIT, freqs, CountsDR, p0=[5, 700], bounds=(0, [10, 1e6]))
FitsSp.append(popt[0])
FitsOffset.append(popt[1])
print(popt)
FittedEIT = FitEIT(freqslong, *popt)
plt.figure()
plt.errorbar(freqs, CountsDR, yerr=2*np.sqrt(CountsDR), fmt='o', capsize=2, markersize=2)
plt.plot(freqslong, FitEIT(freqslong, *popt))
plt.title(f'Sdop: {round(popt[0], 2)}, Spr: {round(popt[1], 2)}, T: {T*1e3} mK, detDop: {DetDoppler} MHz')
np.savetxt('CPT_measured.txt', np.transpose([freqs, CountsDR]))
np.savetxt('CPT_fitted.txt', np.transpose([freqslong, FittedEIT]))
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 7 22:30:01 2020
@author: nico
"""
import numpy as np
import time
import matplotlib.pyplot as plt
from scipy.signal import argrelextrema
"""
Scripts para el calculo de la curva CPT
"""
def H0matrix(Detg, Detp, u):
"""
Calcula la matriz H0 en donde dr es el detuning del doppler, dp es el retuning del repump y u es el campo magnético en Hz/Gauss.
Para esto se toma la energía del nivel P como 0
"""
eigenEnergies = (Detg-u, Detg+u, -u/3, u/3, Detp-6*u/5, Detp-2*u/5, Detp+2*u/5, Detp+6*u/5) #pagina 26 de Oberst. los lande del calcio son iguales a Bario.
H0 = np.diag(eigenEnergies)
return H0
def HImatrix(rabG, rabP, phidoppler, titadoppler, phiprobe, titaprobe):
"""
Calcula la matriz de interacción Hsp + Hpd, en donde rabR es la frecuencia de rabi de la transición Doppler SP,
rabP es la frecuencia de rabi de la transición repump DP, y las componentes ei_r y ei_p son las componentes de la polarización
del campo eléctrico incidente de doppler y repump respectivamente. Deben estar normalizadas a 1
"""
HI = np.zeros((8, 8), dtype=np.complex_)
i, j = 1, 3
HI[i-1, j-1] = (rabG/np.sqrt(3)) * np.cos(titadoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 1, 4
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.sin(titadoppler)*np.exp(1j*phidoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 2, 3
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.sin(titadoppler)*np.exp(-1j*phidoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 2, 4
HI[i-1, j-1] = -(rabG/np.sqrt(3)) * np.cos(titadoppler)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 5
HI[i-1, j-1] = -(rabP/2) * np.sin(titaprobe)*np.exp(-1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 6
HI[i-1, j-1] = -(rabP/np.sqrt(3)) * np.cos(titaprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 3, 7
HI[i-1, j-1] = rabP/np.sqrt(12) * np.sin(titaprobe)*np.exp(1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 6
HI[i-1, j-1] = -(rabP/np.sqrt(12)) * np.sin(titaprobe)*np.exp(-1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 7
HI[i-1, j-1] = -(rabP/np.sqrt(3)) * np.cos(titaprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
i, j = 4, 8
HI[i-1, j-1] = (rabP/2) * np.sin(titaprobe)*np.exp(1j*phiprobe)
HI[j-1, i-1] = np.conjugate(HI[i-1, j-1])
return HI
def Lplusminus(detr, detp, phirepump, titarepump, forma=1):
Hintplus = np.zeros((8, 8), dtype=np.complex_)
Hintminus = np.zeros((8, 8), dtype=np.complex_)
Hintplus[4, 2] = (-1/2)*np.sin(titarepump)*np.exp(1j*phirepump)
Hintplus[5, 2] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintplus[6, 2] = (1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintplus[5, 3] = (-1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(1j*phirepump)
Hintplus[6, 3] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintplus[7, 3] = (1/2)*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintminus[2, 4] = (-1/2)*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintminus[2, 5] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintminus[2, 6] = (1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(1j*phirepump)
Hintminus[3, 5] = (-1/(2*np.sqrt(3)))*np.sin(titarepump)*np.exp(-1j*phirepump)
Hintminus[3, 6] = (-1/np.sqrt(3))*np.cos(titarepump)
Hintminus[3, 7] = (1/2)*np.sin(titarepump)*np.exp(1j*phirepump)
if forma==1:
Lplus = np.zeros((64, 64), dtype=np.complex_)
Lminus = np.zeros((64, 64), dtype=np.complex_)
DeltaBar = np.zeros((64, 64), dtype=np.complex_)
for r in range(8):
for q in range(8):
for k in range(8):
for j in range(8):
if j==q:
if (k==2 or k==3) and r > 3:
Lplus[r*8+q][k*8+j] = (-1j)*(Hintplus[r,k])
if (r==2 or r==3) and k > 3:
Lminus[r*8+q][k*8+j] = (-1j)*(Hintminus[r,k])
elif r==k:
if (q==2 or q==3) and j > 3:
Lplus[r*8+q][k*8+j] = (-1j)*(- Hintplus[j,q])
if (j==2 or j==3) and q > 3:
Lminus[r*8+q][k*8+j] = (-1j)*(- Hintminus[j,q])
if forma==2:
deltaKro = np.diag([1, 1, 1, 1, 1, 1, 1, 1])
Lplus = (-1j)*(np.kron(Hintplus, deltaKro) - np.kron(deltaKro, Hintplus))
Lminus = (-1j)*(np.kron(Hintminus, deltaKro) - np.kron(deltaKro, Hintminus))
DeltaBar = np.zeros((64, 64), dtype=np.complex_)
for i in range(64):
DeltaBar[i, i] = (1j)*(detr - detp)
return np.matrix(Lminus), np.matrix(Lplus), np.matrix(DeltaBar)
def GetL1(Lplus, Lminus, DeltaBar, L0, rabR, nmax):
"""
Devuelve Splus0 y Sminus0
"""
Sp = (-1)*(0.5*rabR)*(np.matrix(np.linalg.inv(L0 - (nmax+1)*DeltaBar))*np.matrix(Lplus))
Sm = (-1)*(0.5*rabR)*(np.matrix(np.linalg.inv(L0 + (nmax+1)*DeltaBar))*np.matrix(Lminus))
for n in list(range(nmax+1))[(nmax+1)::-1][0:len(list(range(nmax+1))[(nmax+1)::-1])-1]: #jaja esto solo es para que vaya de nmax a 1 bajando. debe haber algo mas facil pero kcio
Sp = (-1)*(rabR)*(np.matrix(np.linalg.inv(L0 - n*DeltaBar + rabR*(Lminus*np.matrix(Sp))))*np.matrix(Lplus))
Sm = (-1)*(rabR)*(np.matrix(np.linalg.inv(L0 + n*DeltaBar + rabR*(Lplus*np.matrix(Sm))))*np.matrix(Lminus))
L1 = 0.5*rabR*(np.matrix(Lminus)*np.matrix(Sp) + np.matrix(Lplus)*np.matrix(Sm))
return L1
def EffectiveL(gPS, gPD, lwg, lwr, lwp):
"""
Siendo Heff = H + EffectiveL, calcula dicho EffectiveL que es (-0.5j)*sumatoria(CmDaga*Cm) que luego sirve para calcular el Liouvilliano
"""
Leff = np.zeros((8, 8), dtype=np.complex_)
Leff[0, 0] = 2*lwg
Leff[1, 1] = 2*lwg
Leff[2, 2] = ((2/3)+(1/3))*gPS + ((1/2) + (1/6) + (1/3))*gPD
Leff[3, 3] = ((2/3)+(1/3))*gPS + ((1/2) + (1/6) + (1/3))*gPD
Leff[4, 4] = 2*(lwr + lwp)
Leff[5, 5] = 2*(lwr + lwp)
Leff[6, 6] = 2*(lwr + lwp)
Leff[7, 7] = 2*(lwr + lwp)
return (-0.5j)*Leff
def CalculateSingleMmatrix(gPS, gPD, lwg, lwr, lwp):
"""
Si tomamos el Liuvilliano como L = (-j)*(Heff*deltak - Heffdaga*deltak) + sum(Mm),
esta funcion calcula dichos Mm, que tienen dimensión 64x64 ya que esa es la dimensión del L. Estas componentes
salen de hacer la cuenta a mano conociendo los Cm y considerando que Mm[8*(r-1)+s, 8*(k-1)+j] = Cm[r,l] + Cmdaga[j,s] = Cm[r,l] + Cm[s,j]
ya que los componentes de Cm son reales.
Esta M es la suma de las 8 matrices M.
"""
M = np.matrix(np.zeros((64, 64), dtype=np.complex_))
M[0,27] = (2/3)*gPS
M[9,18] = (2/3)*gPS
M[0,18] = (1/3)*gPS
M[1,19] = -(1/3)*gPS
M[8,26] = -(1/3)*gPS
M[9,27] = (1/3)*gPS
M[36,18] = (1/2)*gPD
M[37,19] = (1/np.sqrt(12))*gPD
M[44,26] = (1/np.sqrt(12))*gPD
M[45,27] = (1/6)*gPD
M[54,18] = (1/6)*gPD
M[55,19] = (1/np.sqrt(12))*gPD
M[62,26] = (1/np.sqrt(12))*gPD
M[63,27] = (1/2)*gPD
M[45,18] = (1/3)*gPD
M[46,19] = (1/3)*gPD
M[53,26] = (1/3)*gPD
M[54,27] = (1/3)*gPD
M[0,0] = 2*lwg
M[1,1] = 2*lwg
M[8,8] = 2*lwg
M[9,9] = 2*lwg
factor1 = 1
factor2 = 1
factor3 = 1
factor4 = 1
#M[36, 45] = lwp
M[36,36] = 2*(lwr + factor1*lwp)
M[37,37] = 2*(lwr + factor1*lwp)
M[38,38] = 2*(lwr + factor1*lwp)
M[39,39] = 2*(lwr + factor1*lwp)
M[44,44] = 2*(lwr + factor2*lwp)
M[45,45] = 2*(lwr + factor2*lwp)
M[46,46] = 2*(lwr + factor2*lwp)
M[47,47] = 2*(lwr + factor2*lwp)
M[52,52] = 2*(lwr + factor3*lwp)
M[53,53] = 2*(lwr + factor3*lwp)
M[54,54] = 2*(lwr + factor3*lwp)
M[55,55] = 2*(lwr + factor3*lwp)
M[60,60] = 2*(lwr + factor4*lwp)
M[61,61] = 2*(lwr + factor4*lwp)
M[62,62] = 2*(lwr + factor4*lwp)
M[63,63] = 2*(lwr + factor4*lwp)
return M
def dopplerBroadening(wlg, wlp, alpha, T, mcalcio = 6.655e-23*1e-3):
"""
Calcula el broadening extra semiclásico por temperatura considerando que el ion atrapado se mueve.
wlg es la longitud de onda doppler, wlp la longitud de onda repump, T la temperatura del ion en kelvin, y alpha (en rads) el ángulo
que forman ambos láseres.
"""
kboltzmann = 1.38e-23 #J/K
gammaD = (2*np.pi)*np.sqrt((1/(wlg*wlg)) + (1/(wlp*wlp)) - 2*(1/(wlg*wlp))*np.cos(alpha))*np.sqrt(kboltzmann*T/(2*mcalcio))
return gammaD
def FullL_efficient(rabG, rabR, rabP, gPS = 0, gPD = 0, Detg = 0, Detr = 0, Detp = 0, u = 0, lwg = 0, lwr=0, lwp = 0,
phidoppler=0, titadoppler=0, phiprobe=0, titaprobe=0, phirepump=0, titarepump=0, T = 0, alpha = 0):
"""
Calcula el Liouvilliano total de manera explícita índice a índice. Suma aparte las componentes de las matrices M.
Es la más eficiente hasta ahora.
"""
db = dopplerBroadening(0.397e-6, 0.866e-6, alpha, T)
#lwr = np.sqrt(lwr**2 + dopplerBroadening(0.397e-6, 0.866e-6, alpha, T)**2)
lwg = np.sqrt(lwg**2 + db**2)
lwr = np.sqrt(lwr**2 + db**2)
CC = EffectiveL(gPS, gPD, lwg, lwr, lwp)
Heff = H0matrix(Detg, Detp, u) + HImatrix(rabG, rabP, phidoppler, titadoppler, phiprobe, titaprobe) + CC
Heffdaga = np.matrix(Heff).getH()
Lfullpartial = np.zeros((64, 64), dtype=np.complex_)
for r in range(8):
for q in range(8):
for k in range(8):
for j in range(8):
if j!=q and r!=k:
pass
elif j==q and r!=k:
if (r < 2 and k > 3) or (k < 2 and r > 3) or (r > 3 and k > 3) or (r==0 and k==1) or (r==1 and k==0) or (r==2 and k==3) or (r==3 and k==2): #todo esto sale de analizar explicitamente la matriz y tratar de no calcular cosas de más que dan cero
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(Heff[r,k])
elif j!=q and r==k:
if (j < 2 and q > 3) or (q < 2 and j > 3) or (j > 3 and q > 3) or (j==0 and q==1) or (j==1 and q==0) or (j==2 and q==3) or (j==3 and q==2):
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(-Heffdaga[j,q])
else:
if Heff[r,k] == Heffdaga[j,q]:
pass
else:
Lfullpartial[r*8+q][k*8+j] = (-1j)*(Heff[r,k]-Heffdaga[j,q])
M = CalculateSingleMmatrix(gPS, gPD, lwg, lwr, lwp)
L0 = np.array(np.matrix(Lfullpartial) + M)
nmax = 1
Lminus, Lplus, DeltaBar = Lplusminus(Detr, Detp, phirepump, titarepump)
factor1 = np.exp(1j*0.2*np.pi)
factor2 = np.exp(-1j*0.2*np.pi)
#print(factor)
L1 = GetL1(factor1*Lplus, factor2*Lminus, DeltaBar, L0, rabR, nmax)
Lfull = L0 + L1
#NORMALIZACION DE RHO
i = 0
while i < 64:
if i%9 == 0:
Lfull[0, i] = 1
else:
Lfull[0, i] = 0
i = i + 1
return Lfull
"""
Scripts para correr un experimento y hacer el análisis de los datos
"""
def CalculoTeoricoDarkResonances(u, titadoppler):
if titadoppler==0:
NegativeDR = [(-7/5)*u, (-3/5)*u, (-1/5)*u, (1/5)*u, (3/5)*u, (7/5)*u]
elif titadoppler==90:
NegativeDR = [(-11/5)*u, (-7/5)*u, (-3/5)*u, (3/5)*u, (7/5)*u, (11/5)*u]
PositiveDR = [(-8/5)*u, (-4/5)*u, 0, (4/5)*u, (8/5)*u]
return NegativeDR, PositiveDR
def CPTspectrum8levels(rabG, rabR, rabP, gPS, gPD, Detg, Detr, u, lwg, lwr, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump,
freqMin=-100, freqMax=100, freqStep=1e-1, plot=False, solvemode=1):
"""
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)
phirepump, titarepump = phirepump*(np.pi/180), titarepump*(np.pi/180)
DetProbeVector = 2*np.pi*np.arange(freqMin*1e6, freqMax*1e6, freqStep*1e6)
Detg, Detr = 2*np.pi*Detg*1e6, 2*np.pi*Detr*1e6
lwg, lwr, lwp = 2*np.pi*lwg*1e6, 2*np.pi*lwr*1e6, 2*np.pi*lwp*1e6
#u = 2*np.pi*u*1e6
Fluovector = []
tinicial = time.time()
for Detp in DetProbeVector:
L = FullL_efficient(rabG, rabR, rabP, gPS, gPD, Detg, Detr, Detp, u, lwg, lwr, lwp, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, Temp, alpha)
if solvemode == 1:
rhovectorized = np.linalg.solve(L, np.array([int(i==0) for i in range(64)]))
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
if solvemode == 2:
Linv = np.linalg.inv(L)
rhovectorized = [Linv[j][0] for j in range(len(Linv))]
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
tfinal = time.time()
print('Done, Total time: ', round((tfinal-tinicial), 2), "s")
DetProbeVectorMHz = np.arange(freqMin, freqMax, freqStep)
if plot:
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(DetProbeVectorMHz, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.legend()
return DetProbeVectorMHz, Fluovector
def CPTspectrum8levels_fixedRabi(sg, sr, sp, gPS, gPD, Detg, Detr, u, lwg, lwr, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump,
freqMin=-100, freqMax=100, freqStep=1e-1, plot=False, solvemode=1):
"""
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)
phirepump, titarepump = phirepump*(np.pi/180), titarepump*(np.pi/180)
DetProbeVector = 2*np.pi*np.arange(freqMin*1e6, freqMax*1e6, freqStep*1e6)
Detg, Detr = 2*np.pi*Detg*1e6, 2*np.pi*Detr*1e6
#lwg, lwr, lwp = 2*np.pi*lwg*1e6, 2*np.pi*lwr*1e6, 2*np.pi*lwp*1e6
lwg, lwr, lwp = lwg*1e6, lwr*1e6, lwp*1e6
rabG = sg*gPS
rabR = sr*gPD
rabP = sp*gPD
#u = 2*np.pi*u*1e6
Fluovector = []
tinicial = time.time()
for Detp in DetProbeVector:
L = FullL_efficient(rabG, rabR, rabP, gPS, gPD, Detg, Detr, Detp, u, lwg, lwr, lwp, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, Temp, alpha)
if solvemode == 1:
coh = 5
rhovectorized = np.linalg.solve(L, np.array([int(i==0) for i in range(64)]))
#Fluo = np.abs(rhovectorized[coh])
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
if solvemode == 2:
Linv = np.linalg.inv(L)
rhovectorized = [Linv[j][0] for j in range(len(Linv))]
Fluo = np.real(rhovectorized[18] + np.real(rhovectorized[27])) #estos son los rho33 + rho44
Fluovector.append(Fluo)
tfinal = time.time()
print('Done, Total time: ', round((tfinal-tinicial), 2), "s")
DetProbeVectorMHz = np.arange(freqMin, freqMax, freqStep)
if plot:
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
plt.plot(DetProbeVectorMHz, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.legend()
return DetProbeVectorMHz, Fluovector
#%%
if __name__ == "__main__":
ub = 9.27e-24
h = 6.63e-34
c = (ub/h)*1e-4 #en unidades de MHz/G
B = 25 #campo magnetico en gauss
u = c*B
sg, sr, sp = 0.5, 1.5, 4 #parámetros de saturación del doppler y repump
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6 #anchos de linea de las transiciones
rabG, rabR, rabP = sg*gPS, sr*gPD, sp*gPD #frecuencias de rabi
lwg, lwr, lwp = 0.3, 0.3, 0.3 #ancho de linea de los laseres
Detg = -25
Detr = 20 #detuning del doppler y repump
Temp = 0.0e-3 #temperatura en K
alpha = 0*(np.pi/180) #angulo entre los láseres
phidoppler, titadoppler = 0, 90
phirepump, titarepump = 0, 90
phiprobe, titaprobe = 0, 90
plotCPT = False
freqMin = -50
freqMax = 50
freqStep = 5e-2
Frequencyvector, Fluovector = CPTspectrum8levels(rabG, rabR, rabP, gPS, gPD, Detg, Detr, u, lwg, lwr, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, phirepump, titarepump, freqMin=freqMin, freqMax=freqMax, freqStep=freqStep, plot=plotCPT, solvemode=1)
NegativeDR, PositiveDR = CalculoTeoricoDarkResonances(u/(2*np.pi*1e6), titadoppler)
plt.plot(Frequencyvector, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.xlabel('Probe detuning (MHz)')
plt.ylabel('Fluorescence (A.U.)')
for PDR in PositiveDR:
plt.axvline(Detr+PDR, linestyle='--', linewidth=0.5, color='red')
for NDR in NegativeDR:
plt.axvline(Detg+NDR, linestyle='--', linewidth=0.5, color='blue')
#parametros que andan piola:
"""
ub = 9.27e-24
h = 6.63e-34
c = (ub/h)*1e-4 #en unidades de MHz/G
B = 17 #campo magnetico en gauss
u = c*B
#u = 80e6
sr, sp = 0.53, 4.2
gPS, gPD, = 2*np.pi*21.58e6, 2*np.pi*1.35e6
rabR, rabP = sr*gPS, sp*gPD
lw = 2*np.pi * 0.33e6
lwr, lwp = lw, lw #ancho de linea de los laseres
dr_spec = - 2*np.pi* 26e6
freqSteps = 500
freqMin = -100e6
freqMax = 100e6
dps = 2*np.pi*np.linspace(freqMin, freqMax, freqSteps)
#dps = [-30e6]
alfar = 90*(np.pi/180)
ex_r, ey_r, ez_r = np.sin(alfar)*np.cos(0), np.sin(alfar)*np.sin(0), np.cos(alfar)
alfap = 90*(np.pi/180)
ex_p, ey_p, ez_p = np.sin(alfap)*np.cos(0), np.sin(alfap)*np.sin(0), np.cos(alfap)
"""
import h5py
import matplotlib.pyplot as plt
import numpy as np
import sys
import re
import ast
from scipy.optimize import curve_fit
import os
from scipy import interpolate
#Mediciones barriendo angulo del TISA y viendo kicking de resonancias oscuras
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20220106_CPT_DosLaseres_v08_TISA_DR\Data
# os.chdir('/home/nico/Documents/artiq_experiments/analisis/plots/20230707_MotionalSpectrum_v2/Data/')
os.chdir('C://Users//nicon//Doctorado//artiq_experiments//analisis//plots//20240515_MotionalSpectrum_v3_pendientes//Data')
MOTIONAL_FILES = """
000013002-AD9910RAM_andor
000013003-AD9910RAM_andor
000013004-AD9910RAM_andor
"""
def SeeKeys(files):
for i, fname in enumerate(files.split()):
data = h5py.File(fname+'.h5', 'r') # Leo el h5: Recordar que nuestros datos estan en 'datasets'
print(fname)
print(list(data['datasets'].keys()))
print(SeeKeys(MOTIONAL_FILES))
#%%
#carpeta pc nico labo escritorio:
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20211101_CPT_DosLaseres_v03\Data
Counts_roi1 = []
Counts_roi2 = []
RealFreqs = []
IR1_amp_vec = []
for i, fname in enumerate(MOTIONAL_FILES.split()):
print(str(i) + ' - ' + fname)
data = h5py.File(fname+'.h5', 'r')
RealFreqs.append(np.array(data['datasets']['real_freq']))
Counts_roi1.append(np.array(data['datasets']['counts_roi1']))
Counts_roi2.append(np.array(data['datasets']['counts_roi2']))
IR1_amp_vec.append(np.array(data['datasets']['IR1_amp']))
Potencias_IR = [0,20,50]
#%%
"""
Ploteo una curva para buscar su minimo
"""
jvec = [2,1,0]
plt.figure()
i = 0
kmin = 106
for j in jvec:
plt.errorbar([1*f*1e-3 for f in RealFreqs[j]], Counts_roi1[j], yerr=0.1*np.sqrt(Counts_roi1[j]), fmt='o', capsize=2, markersize=2, label=f'IR1 power: {Potencias_IR[j]} uW')
#plt.plot([1*f*1e-3 for f in RealFreqs[j]][kmin], Counts[j][kmin], 'o', markersize=15)
i = i + 1
plt.xlabel('Frecuencia mod IR2 (kHz)')
plt.ylabel('Cuentas/400 ms')
plt.xlim(780,810)
plt.ylim(18680,19650)
plt.grid()
plt.legend(loc='lower left')
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