Commit 058680d2 authored by Nicolas Nunez Barreto's avatar Nicolas Nunez Barreto
parents f8589b7d 525f3039
**/__pycache__/
*.pyc
*.pyon
**/__*.py
**/__*.md
analisis/plots/20231123_CPTconmicromocion3/grafico_*.png
analisis/plots/20231123_CPTconmicromocion3/grafico_*.pdf
......@@ -551,16 +551,16 @@ if depthscurve:
plt.grid()
#plt.axvline(3, color='salmon')
plt.legend()
#%%
plt.figure()
#plt.plot(np.arange(0,len(Intensityver1),1), [i/np.max(Intensityver1) for i in Intensityver1], '-o',markersize=8)
#plt.errorbar(np.arange(0,len(Intensityver1),1), [p for p in pmdepthsdrver1], yerr= errorpmdepthsdrver1, fmt='o', capsize=3, markersize=8)
plt.plot(np.arange(0,len(Intensityver2),1), [i/np.max(Intensityver2) for i in Intensityver2], '-o',markersize=8)
plt.errorbar(np.arange(0,len(Intensityver2),1), [p for p in pmdepthsdrver2], yerr= errorpmdepthsdrver2, fmt='o', capsize=3, markersize=8)
# plt.plot(np.arange(0,len(Intensityver1),1), [i/np.max(Intensityver1) for i in Intensityver1], '-o',markersize=8)
# plt.errorbar(np.arange(0,len(Intensityver1),1), [p for p in pmdepthsdrver1], yerr= errorpmdepthsdrver1, fmt='o', capsize=3, markersize=8)
# plt.plot(np.arange(0,len(Intensityver2),1), [i/np.max(Intensityver2) for i in Intensityver2], '-o',markersize=8)
# plt.errorbar(np.arange(0,len(Intensityver2),1), [p for p in pmdepthsdrver2], yerr= errorpmdepthsdrver2, fmt='o', capsize=3, markersize=8)
plt.plot(np.arange(0,len(Intensityver3),1), [i/np.max(Intensityver3) for i in Intensityver3], '-o',color='darkgreen',markersize=8)
plt.errorbar(np.arange(0,len(Intensityver3),1), [p for p in pmdepthsdrver3], yerr= errorpmdepthsdrver3, color='darkgreen',fmt='o', alpha=0.7, capsize=3, markersize=8)
#plt.plot([m for m in np.arange(0,len(Intensityver4),1)], [i/np.max(Intensityver4) for i in Intensityver4], '-o',color='navy',markersize=8)
#plt.errorbar([m for m in np.arange(0,len(Intensityver4),1)], [p for p in pmdepthsdrver4], yerr=list(errorpmdepthsdrver4), fmt='o', color='navy', alpha=0.7,capsize=3, markersize=8)
plt.plot([m for m in np.arange(0,len(Intensityver4),1)], [i/np.max(Intensityver3) for i in Intensityver4], '-o',color='navy',markersize=8)
plt.errorbar([m for m in np.arange(0,len(Intensityver4),1)], [p for p in pmdepthsdrver4], yerr=list(errorpmdepthsdrver4), fmt='o', color='navy', alpha=0.7,capsize=3, markersize=8)
#plt.xlim(-0.5, 12.7)
plt.ylim(-0.1,1.1)
plt.grid()
......@@ -657,7 +657,7 @@ plt.xticks([-50,-25,0,25,50],fontname='STIXgeneral',fontsize=35)
plt.yticks([3.5,4,4.5],fontname='STIXgeneral',fontsize=35)
plt.tight_layout()
plt.grid()
plt.savefig('/home/nico/Nextcloud/Nico/Doctorado/Charlas/2023 Europe/DDresonancesexperimental_fine.pdf')
#plt.savefig('/home/nico/Nextcloud/Nico/Doctorado/Charlas/2023 Europe/DDresonancesexperimental_fine.pdf')
# plt.legend()
print(f'Ancho: {round(1e3*popt[3],2)} kHz')
......@@ -447,13 +447,18 @@ if plotcurvita:
#%%
a=0.3
plt.figure()
plt.plot(np.arange(0,len(Intensityver1),1), [i/np.max(Intensityver1) for i in Intensityver1], '-o', color='navy',alpha=0.5,markersize=8)
plt.errorbar(np.arange(0,len(Intensityver1),1), [p for p in pmdepthsdrver1], yerr= errorpmdepthsdrver1, fmt='o', color='navy',alpha=1, capsize=3, markersize=8)
plt.plot([x*a for x in np.arange(0,len(Intensityver1),1)], [i/np.max(Intensityver2) for i in Intensityver1], '-o', color='navy',alpha=0.5,markersize=8)
#plt.plot(np.arange(0,len(Intensityver1),1), [i/np.max(Intensityver1) for i in Intensityver1], '-o', color='navy',alpha=0.5,markersize=8)
plt.errorbar([x*a for x in np.arange(0,len(Intensityver1),1)], [p for p in pmdepthsdrver1], yerr= errorpmdepthsdrver1, fmt='o', color='navy',alpha=1, capsize=3, markersize=8)
plt.plot(np.arange(0,len(Intensityver2),1), [i/np.max(Intensityver2) for i in Intensityver2], '-o',color='firebrick',markersize=8,alpha=0.5)
#plt.plot(np.arange(0,len(Intensityver2),1), [i/np.max(Intensityver2) for i in Intensityver2], '-o',color='firebrick',markersize=8,alpha=0.5)
plt.errorbar(np.arange(0,len(Intensityver2),1), [p for p in pmdepthsdrver2], yerr= errorpmdepthsdrver2, fmt='o', color='firebrick',alpha=1,capsize=3, markersize=8)
plt.xlim(-0.5, 36)
plt.xlim(-0.5, 10)
plt.ylim(-0.1,1.1)
plt.grid()
......@@ -960,3 +965,26 @@ plt.ylim(-0.1,1.1)
plt.grid()
#%%
"""
Analuisis posterior
"""
k = 0.4
#ahora la anterior con haz grande y alguna de las 4 potencias con haz chico
plt.figure()
plt.plot([k*f for f in np.arange(0,len(Intensityver1),1)], [i/np.max(Intensityver31) for i in Intensityver1], '-o', color='navy',alpha=0.5,markersize=8)
plt.errorbar([k*f for f in np.arange(0,len(Intensityver1),1)], [p for p in pmdepthsdrver1], yerr= errorpmdepthsdrver1, fmt='o', color='navy',alpha=1, capsize=3, markersize=8)
# plt.plot(np.arange(0,len(Intensityver2),1), [i/np.max(Intensityver2) for i in Intensityver2], '-o', color='navy',alpha=0.5,markersize=8)
# plt.errorbar(np.arange(0,len(Intensityver2),1), [p for p in pmdepthsdrver2], yerr= errorpmdepthsdrver2, fmt='o', color='navy',alpha=1, capsize=3, markersize=8)
plt.plot(np.arange(0,len(Intensityver31),1), [i/np.max(Intensityver31) for i in Intensityver31], '-o',color='green',markersize=8,alpha=0.5)
plt.errorbar(np.arange(0,len(Intensityver31),1), [0.8*p for p in pmdepthsdrver31], yerr= errorpmdepthsdrver31, fmt='o', color='green',alpha=1,capsize=3, markersize=8)
plt.xlim(-0.5, 10)
plt.ylim(-0.1,1.1)
plt.grid()
......@@ -83,8 +83,8 @@ fact = (np.max(LG1)/np.max(LG2))
plt.figure()
plt.plot(r/w1,LG1)
plt.plot(r/w2,LG2*fact)
plt.plot(r,LG1)
#plt.plot(r/w2,LG2*fact)
plt.title('Scaled ratio between LG and RDE, x axis scaled with LG waist')
......
......@@ -7,6 +7,11 @@
reingenieria del código que anda
Surge de fusionar
Data/EITfit/MM_eightLevel_2repumps_AnalysisFunctions.py
Data/EITfit/MM_eightLevel_2repumps_python_scripts.py
MAPA de FUNCIONES
CPTspectrum8levels_MM
......
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Ploteo de datos y ajustes
Ploteo de datos y ajustes del barrido en voltaje del Endcap
equivalente a pasear el ion en algun entorno del punto de compensación ideal
y ver los efectos de micromoción (y tal vez temperatura)
@author: lolo
"""
......@@ -24,6 +29,7 @@ from time import time
# /home/lolo/Dropbox/marce/LIAF/Trampa_anular/artiq_experiments/analisis/plots/20231123_CPTconmicromocion3/Data/EITfit/MM_eightLevel_2repumps_AnalysisFunctions.py
from Data.EITfit.lolo_modelo_full_8niveles import PerformExperiment_8levels_MM
......@@ -405,7 +411,7 @@ for Detunings_3_SA_short,CountsDR,Detunings_3_SA_long,FittedEITpi_3_SA_long,sele
ax.grid(True, ls=":")
print(f'listo med {selectedcurve}')
print(popt_3_SA)
# print(popt_3_SA)
for ax in axx[:,0]:
......@@ -452,58 +458,86 @@ ax.set_xticks(num_med)
ax.set_xlabel('Num. de medición')
#%%
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#%% Endcap hiperbola (con residuos)
"""
Grafico distintas variables que salieron del SUper ajuste
Veamos cómo varía el Beta con el voltaje del endcap
"""
import seaborn as sns
paleta = sns.color_palette("rocket")
voltages_dcA = Voltages[0][1:10]
I = slice(None,9)
voltages_dcA = Voltages[0][SelectedCurveVec]
def lineal(x,a,b):
return a*x+b
def hiperbola(x,a,b,c,x0):
return a*np.sqrt(((x-x0)**2+c**2))+b
def hiperbola(x,a,y0,b,x0):
"""
Hiperbola de ecuación:
1 =(y-y0)²/a² - (x-x0)²/b²
"""
return a*np.sqrt(((x-x0)**2+b**2))+y0
hiperbola_or_linear = True
es_hiperbola = False
if hiperbola_or_linear:
popthip,pcovhip = curve_fit(hiperbola,voltages_dcA,Betas_vec,p0=(100,0.1,1,-0.15))
# par_inicial = (100,0.1,1,-0.15)
# a y0 b x0
par_inicial = (12,0.1,1,-0.13)
popthip,pcovhip = curve_fit(hiperbola,voltages_dcA[I],Betas_vec[I],p0=par_inicial)
xhip = np.linspace(-0.23,0.005,200)
xhip = np.linspace(-0.23,0.005,200)
# plt.figure()
# plt.errorbar(voltages_dcA[I],Betas_vec[I],yerr=ErrorBetas_vec[I],fmt='o',capsize=5,markersize=5,color=paleta[1])
# plt.plot(xhip,hiperbola(xhip,*popthip))
# # plt.plot(xhip,hiperbola(xhip,*par_inicial),'--',color='red')
# plt.xlabel('Endcap voltage (V)')
# plt.ylabel('Modulation factor')
# plt.grid()
fig, axx = plt.subplots( 2, figsize=(10,7) ,
constrained_layout=True, sharex=True,
gridspec_kw=dict(height_ratios=[10,2]))
fig.set_constrained_layout_pads(w_pad=2/72, h_pad=2/72, hspace=0, wspace=0)
plt.figure()
plt.errorbar(voltages_dcA,Betas_vec,yerr=ErrorBetas_vec,fmt='o',capsize=5,markersize=5,color=paleta[1])
plt.plot(xhip,hiperbola(xhip,*popthip))
plt.xlabel('Endcap voltage (V)')
plt.ylabel('Modulation factor')
plt.grid()
ax = axx[0]
else:
poptini,pcovini = curve_fit(lineal,voltages_dcA[0:3],Betas_vec[0:3])
poptfin,pcovfin = curve_fit(lineal,voltages_dcA[4:],Betas_vec[4:])
ax.errorbar(voltages_dcA[I],Betas_vec[I],yerr=ErrorBetas_vec[I],fmt='o',capsize=5,markersize=5,color=paleta[1])
ax.plot(xhip,hiperbola(xhip,*popthip))
# plt.plot(xhip,hiperbola(xhip,*par_inicial),'--',color='red')
minimum_voltage = -(poptini[1]-poptfin[1])/(poptini[0]-poptfin[0]) #voltaje donde se intersectan las rectas, es decir, donde deberia estar el minimo de micromocion
minimum_modulationfactor = lineal(minimum_voltage,*poptini) #es lo mismo si pongo *poptfin
ax.set_ylabel('Modulation factor')
xini = np.linspace(-0.23,-0.13,100)
xfin = np.linspace(-0.15,0.005,100)
ax = axx[1]
plt.figure()
plt.errorbar(voltages_dcA,Betas_vec,yerr=ErrorBetas_vec,fmt='o',capsize=5,markersize=5,color=paleta[1])
plt.plot(xini,lineal(xini,*poptini))
plt.plot(xfin,lineal(xfin,*poptfin))
plt.axvline(minimum_voltage,linestyle='dashed',color='grey')
plt.xlabel('Endcap voltage (V)')
plt.ylabel('Modulation factor')
plt.grid()
ax.errorbar(voltages_dcA[I],Betas_vec[I]-hiperbola(voltages_dcA[I],*popthip),
yerr=ErrorBetas_vec[I],fmt='o',capsize=5,markersize=5,color=paleta[1])
ax.set_ylabel('Res.')
ax.set_xlabel('Endcap voltage (V)')
for ax in axx:
ax.grid(True, ls=":", color='lightgray')
print([t*1e3 for t in Temp_vec])
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#%% Este hay que armarlo aún
plt.figure()
plt.errorbar(voltages_dcA,[t*1e3 for t in Temp_vec],yerr=[t*1e3 for t in ErrorTemp_vec],fmt='o',capsize=5,markersize=5,color=paleta[3])
# plt.axvline(minimum_voltage,linestyle='dashed',color='grey')
......@@ -514,30 +548,11 @@ plt.ylabel('Temperature (mK)')
plt.grid()
#plt.ylim(0,2)
#%%
"""
Ahora hago un ajuste con una hiperbola porque tiene mas sentido, por el hecho
de que en el punto optimo el ion no esta en el centro de la trampa
sino que esta a una distancia d
"""
def hiperbola(x,a,b,c,x0):
return a*np.sqrt(((x-x0)**2+c**2))+b
popthip,pcovhip = curve_fit(hiperbola,voltages_dcA,Betas_vec,p0=(100,0.1,1,-0.15))
xhip = np.linspace(-0.23,0.005,200)
plt.figure()
plt.errorbar(voltages_dcA,Betas_vec,yerr=ErrorBetas_vec,fmt='o',capsize=5,markersize=5,color=paleta[1])
plt.plot(xhip,hiperbola(xhip,*popthip))
plt.xlabel('Endcap voltage (V)')
plt.ylabel('Modulation factor')
plt.grid()
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
#%% Ajuste de los betas y la temperatura
#%%
from scipy.special import jv
......
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Acá hay un análisis de la estabilidad del campo magnético (presuntamente).
Se midieron N veces el mismo espectro y se analiza la variación del spliting
de picos CPT que se debe al efecto Zeeman.
El gráfico final muestra el corrimiento en procentual
@author: lolo
"""
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 de una resonancia oscura DD multiples veces a lo largo de una noche para ver estabilidad de B
"""
#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/20231212_Bstability/Data/')
# CPT_FILES = """000016432-IR_Scan_withcal_optimized
# 000016433-IR_Scan_withcal_optimized
# 000016434-IR_Scan_withcal_optimized
# 000016435-IR_Scan_withcal_optimized
# 000016436-IR_Scan_withcal_optimized
# 000016437-IR_Scan_withcal_optimized
# 000016438-IR_Scan_withcal_optimized
# 000016439-IR_Scan_withcal_optimized
# 000016440-IR_Scan_withcal_optimized
# 000016441-IR_Scan_withcal_optimized
# 000016442-IR_Scan_withcal_optimized
# 000016443-IR_Scan_withcal_optimized
# """
folder = '../20231212_Bstability/Data/'
CPT_FILES = f"""
{folder}/000016434-IR_Scan_withcal_optimized
{folder}/000016435-IR_Scan_withcal_optimized
{folder}/000016436-IR_Scan_withcal_optimized
{folder}/000016437-IR_Scan_withcal_optimized
{folder}/000016438-IR_Scan_withcal_optimized
{folder}/000016439-IR_Scan_withcal_optimized
{folder}/000016440-IR_Scan_withcal_optimized
{folder}/000016441-IR_Scan_withcal_optimized
{folder}/000016442-IR_Scan_withcal_optimized
{folder}/000016443-IR_Scan_withcal_optimized
""".strip()
CALIB_FILES = f"""{folder}/000016430-IR_Scan_withcal_optimized"""
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(CPT_FILES))
#carpeta pc nico labo escritorio:
#C:\Users\Usuario\Documents\artiq\artiq_experiments\analisis\plots\20211101_CPT_DosLaseres_v03\Data
Counts = []
Freqs = []
CalibCounts = []
CalibFreqs = []
AmpTisa = []
UVCPTAmp = []
No_measures = []
Voltages = []
for i, fname in enumerate(CPT_FILES.split()):
print(str(i) + ' - ' + fname)
#print(fname)
data = h5py.File(fname+'.h5', 'r') # Leo el h5: Recordar que nuestros datos estan en 'datasets'
# Aca hago algo repugnante para poder levantar los strings que dejamos
# que además tenian un error de tipeo al final. Esto no deberá ser necesario
# cuando se solucione el error este del guardado.
Freqs.append(np.array(data['datasets']['IR1_Frequencies']))
Counts.append(np.array(data['datasets']['data_array']))
#AmpTisa.append(np.array(data['datasets']['TISA_CPT_amp']))
UVCPTAmp.append(np.array(data['datasets']['UV_CPT_amp']))
No_measures.append(np.array(data['datasets']['no_measures']))
Voltages.append(np.array(data['datasets']['scanning_voltages']))
for i, fname in enumerate(CALIB_FILES.split()):
print(str(i) + ' - ' + fname)
data = h5py.File(fname+'.h5', 'r') # Leo el h5: Recordar que nuestros datos estan en 'datasets'
CalibFreqs.append(np.array(data['datasets']['IR1_Frequencies']))
CalibCounts.append(np.array(data['datasets']['counts_spectrum']))
def Split(array,n):
length=len(array)/n
splitlist = []
jj = 0
while jj<length:
partial = []
ii = 0
while ii < n:
partial.append(array[jj*n+ii])
ii = ii + 1
splitlist.append(partial)
jj = jj + 1
return splitlist
CountsSplit = []
k=0
for k in range(len(Counts)):
CountsSplit.append(Split(Counts[k],len(Freqs[k])))
#%%
from scipy.optimize import curve_fit
def lorentzian(x,A,B,x0,g,C):
return 2*(A/np.pi)*g/(g**2 + 4*(x-x0)**2)+B+C*(x-x0)
Freqscal = [2*f*1e-6 for f in CalibFreqs[0]]
Countscal = CalibCounts[0]
popt_dr1, pcov_dr1 = curve_fit(lorentzian,Freqscal[37:47],Countscal[37:47],p0=(-1000,1000,436,1,1))
popt_dr2, pcov_dr2 = curve_fit(lorentzian,Freqscal[90:120],Countscal[90:120],p0=(-1000,1000,443,1,1))
DeltaFreqs = popt_dr2[2]-popt_dr1[2]
ZeroFrequency = 0.5*(popt_dr2[2]+popt_dr1[2])
plt.figure()
plt.plot(Freqscal,Countscal,'o')
plt.plot(Freqscal,lorentzian(Freqscal,*popt_dr1))
plt.plot(Freqscal,lorentzian(Freqscal,*popt_dr2))
plt.axvline(ZeroFrequency)
print(DeltaFreqs)
"""
Estas cuentas estan en el cuaderno SMILE MORE WORRY LESS pag 25.
La resonancia de la izquierda esta a (-4/5)*u. La de la derecha esta a (4/5)*u.
Por ende la diferencia es (8/5)*u.
Definimos u como 1.4 MHz/G * B. Entonces Despejamos B facilmente.
"""
ub = 9.27e-24
h = 6.63e-34
u = 1e-6*(ub/h)*1e-4 #en unidades de MHz/G
MagneticField = DeltaFreqs/((8/5)*u)
print(f'Magnetic field: {MagneticField}')
#%%
"""
Ploteo la cpt de referencia / plotting the reference CPT
"""
freqs = [2*f*1e-6 for f in Freqs[0]]
def lorentzian(x,A,B,x0,g,C):
return 2*(A/np.pi)*g/(g**2 + 4*(x-x0)**2)+B+C*(x-x0)
# ii_plot = 11
# jj_plot = 0
ii_plot = 9
jj_plot = 0
ii_problematic = []
jj_problematic = []
Centers = []
Widths = []
test = []
for ii in range(len(CountsSplit)):
for jj in range(len(CountsSplit[0])):
# print(ii)
# print(jj)
try:
if ii==2 and jj==11:
popt_lorentz, pcov_lorentz = curve_fit(lorentzian, freqs[:-10], CountsSplit[ii][jj][:-10],p0=(-1000,1000,436,1,1))
elif ii==2 and jj==12:
popt_lorentz, pcov_lorentz = curve_fit(lorentzian, freqs[40:], CountsSplit[ii][jj][40:],p0=(-1000,1000,436,1,1))
elif ii==4 and jj==1:
popt_lorentz, pcov_lorentz = curve_fit(lorentzian, freqs[:-86], CountsSplit[ii][jj][:-86],p0=(-1000,1000,436,1,1))
elif ii==4 and jj==2:
popt_lorentz = [0,0,0,0,0]
elif ii==4 and jj==7:
popt_lorentz = [0,0,0,0,0]
elif ii==4 and jj==12:
popt_lorentz = [0,0,0,0,0]
elif ii==4 and jj==13:
popt_lorentz = [0,0,0,0,0]
elif ii==4 and jj==14:
popt_lorentz = [0,0,0,0,0]
elif ii==11 and jj==2:
popt_lorentz = [0,0,0,0,0]
elif ii==11 and jj==3:
popt_lorentz = [0,0,0,0,0]
else:
popt_lorentz, pcov_lorentz = curve_fit(lorentzian, freqs, CountsSplit[ii][jj],p0=(-1000,1000,436,1,1))
if popt_lorentz[2]>435.95 or popt_lorentz[2]<435.8:
if popt_lorentz[2]==0:
pass
else:
ii_problematic.append(ii)
jj_problematic.append(jj)
except:
popt_lorentz=[0,0,0,0]
print("except")
print(ii,jj)
if ii == ii_plot and jj == jj_plot:
print('MATCH')
test.append(popt_lorentz)
Centers.append(popt_lorentz[2])
Widths.append(popt_lorentz[3])
prob = 4
print(ii_problematic[prob])
print(jj_problematic[prob])
kk=-83
plt.figure()
plt.plot(freqs, CountsSplit[ii_problematic[prob]][jj_problematic[prob]])
plt.plot(freqs[kk], CountsSplit[ii_problematic[prob]][jj_problematic[prob]][kk],'o',markersize=10)
plt.plot(freqs,lorentzian(freqs,*test[0]))
#%%
"""
Usando que la DR de la izquierda esta a (-4/5)u, donde u = 1.4 MHz/G * B,
despejo y convierto la posicion de esa resonancia a campo magnetico
"""
def ConvertFreqsToMagneticField(f,zerofreq,u):
return np.abs(f-zerofreq)*(5/4)/(1.4)
lentotal = len(CountsSplit)*len(CountsSplit[0])
medtime=4/60
timevec = np.linspace(0,medtime*lentotal, lentotal)
plt.figure()
plt.plot(timevec[4:],ConvertFreqsToMagneticField(Centers,ZeroFrequency,u)[4:],'o')
plt.ylim(3.670,3.730)
plt.xlabel('Time (h)')
plt.ylabel('Magnetic field (G)')
plt.figure()
plt.plot(timevec[4:],[100*c/3.718 for c in ConvertFreqsToMagneticField(Centers,ZeroFrequency,u)][4:],'o')
plt.ylim(98.5,100.1)
plt.xlabel('Time (h)')
plt.ylabel('Magnetic field variation (percent)')
......@@ -129,7 +129,7 @@ def LtempCalculus(beta, drivefreq, forma=1):
if forma==2:
deltaKro = np.diag([1, 1, 1, 1, 1, 1, 1, 1])
Ltemp = (-1j)*(np.kron(Hint, deltaKro) - np.kron(deltaKro, Hint))
print(np.matrix(Ltemp))
Omega = np.zeros((64, 64), dtype=np.complex_)
for i in range(64):
......@@ -399,7 +399,10 @@ if __name__ == "__main__":
freqMax = 50
freqStep = 5e-2
Frequencyvector, Fluovector = CPTspectrum8levels_MM(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)
Freq, Fluo = CPTspectrum8levels_MM(sg, sp, gPS, gPD, Detg, u, lwg, lwp, Temp, alpha, phidoppler, titadoppler, phiprobe, titaprobe, Circularityprobe, beta, drivefreq, freqMin=-100, freqMax=100, freqStep=1e-1, plot=False, solvemode=1)
#Frequencyvector, Fluovector = CPTspectrum8levels_MM(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)
plt.plot(Frequencyvector, [100*f for f in Fluovector], label=str(titaprobe) + 'º, T: ' + str(Temp*1e3) + ' mK')
plt.xlabel('Probe detuning (MHz)')
......
......@@ -67,7 +67,7 @@ sp = 8 #nice range: 0.1 to 20 #p is for probe but is the repump
drivefreq=2*np.pi*22.135*1e6 #ignore it
#betavec = np.arange(0,1.1,0.1) #ignore it
betavec=[0] #ignore it
betavec=[10] #ignore it
alphavec = [0] #ignore it
......@@ -81,7 +81,7 @@ for sg in sgvec:
for T in TempVec:
for alpha in alphavec:
for beta in betavec:
Frequencies, Fluorescence = PerformExperiment_8levels(sg, sp, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobe, beta, drivefreq, freqMin, freqMax, freqStep, circularityprobe=CircPr, plot=False, solvemode=1, detpvec=None)
Frequencies, Fluorescence = PerformExperiment_8levels_MM(sg, sp, gPS, gPD, DetDoppler, u, DopplerLaserLinewidth, ProbeLaserLinewidth, T, alpha, phidoppler, titadoppler, phiprobe, titaprobe, beta, drivefreq, freqMin, freqMax, freqStep, circularityprobe=CircPr, plot=False, solvemode=1, detpvec=None)
FrequenciesVec.append(Frequencies)
FluorescencesVec.append(Fluorescence)
......
......@@ -135,7 +135,9 @@ def LtempCalculus(beta, drivefreq, forma=1):
for i in range(64):
Omega[i, i] = (1j)*drivefreq
#print(np.allclose(np.matrix(Ltemp), np.matrix(Ltemp).T, rtol=1e-5, atol=1e-8))
print(np.max(np.matrix(Ltemp)))
return np.matrix(Ltemp), np.matrix(Omega)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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