# -*- coding: utf-8 -*- """ Created on Wed Oct 6 16:40:32 2021 @author: Nico """ import numpy as np import matplotlib.pyplot as plt def GetTemp(Gamma, Det, kb=1.38e-23, hbar=1.03e-34): T = (1/4)*(hbar/kb)*Gamma*((Gamma/(-2*Det)) + (-2*Det/Gamma)) return np.abs(T*1e3) GammaUV = 2*np.pi*22.4e6 Det = 2*np.pi*np.arange(1e6, 50e6, 0.1e6) plt.figure() plt.plot(Det/GammaUV, GetTemp(GammaUV, Det)) plt.axvline(0.5, linestyle='--', linewidth=1) plt.xlabel('Detuning/Gamma') plt.ylabel('Final Temp (mK)') MinTemp = np.min(GetTemp(GammaUV, Det)) print(f'Min temp: {MinTemp} mK') #%% from scipy.special import jv from scipy.optimize import curve_fit def Lorentzian(f, A, gamma, x0): return (A/np.pi)*0.5*gamma/(((f-x0)**2)+((0.5*gamma)**2)) def MicromotionSpectra(det, ftrap, gamma, beta, n): P = (jv(0, beta)**2)/((det**2)+(0.5*gamma)**2) i = 1 #print(P) while i <= n: P = P + ((jv(n, beta))**2)/(((det+n*ftrap)**2)+(0.5*gamma)**2) + ((jv(-n, beta))**2)/(((det-n*ftrap)**2)+(0.5*gamma)**2) i = i + 1 #print(P) return P Det = np.arange(-50, 50, 0.1) ftrap = 21 gamma = 22 beta = np.arange(0, 2, 0.05) n = 1 anchos = [] for b in beta: Micromotion = MicromotionSpectra(Det, ftrap, gamma, b, n) popt, pcov = curve_fit(Lorentzian, Det, Micromotion) anchos.append(popt[1]) plt.figure() plt.plot(beta, anchos, 'o') plt.xlabel('Micromotion index beta') plt.ylabel('Apparent linewidth(MHz)') plt.axhline(22, linewidth=1, linestyle='--') plt.grid() #%% #chosenbeta = 1.25 plt.figure() for chosenbeta in [0, 1, 1.25, 2]: plt.plot(Det, MicromotionSpectra(Det, ftrap, gamma, chosenbeta, n), label=f'beta={chosenbeta}') #plt.ylim(0, 0.005) plt.xlabel('Frecuencia (MHz)') plt.ylabel('Fluorescencia') plt.grid() plt.legend()