Commit 4d32f5a2 authored by Nicolas Nunez Barreto's avatar Nicolas Nunez Barreto

peds

parent 371bb08a
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
fit-margin-left="0" fit-margin-left="0"
fit-margin-right="0" fit-margin-right="0"
fit-margin-bottom="0" fit-margin-bottom="0"
inkscape:zoom="1.4142136" inkscape:zoom="1"
inkscape:cx="2526.139" inkscape:cx="2455.5"
inkscape:cy="-697.56084" inkscape:cy="-763.5"
inkscape:window-width="1846" inkscape:window-width="1846"
inkscape:window-height="1016" inkscape:window-height="1016"
inkscape:window-x="0" inkscape:window-x="0"
...@@ -2324,13 +2324,6 @@ YAmFwWDYy/8DHTJV9KTZCpkAAAAASUVORK5CYII= ...@@ -2324,13 +2324,6 @@ YAmFwWDYy/8DHTJV9KTZCpkAAAAASUVORK5CYII=
cy="-365.55286" cy="-365.55286"
rx="2.9858103" rx="2.9858103"
ry="2.675787" /> ry="2.675787" />
<ellipse
style="fill:#aa0000;stroke:#aa0000;stroke-width:2;stroke-linejoin:round"
id="path880-7-1-76-3"
cx="350.41907"
cy="-365.55286"
rx="2.9858103"
ry="2.675787" />
<ellipse <ellipse
style="fill:#aa0000;stroke:#aa0000;stroke-width:2;stroke-linejoin:round" style="fill:#aa0000;stroke:#aa0000;stroke-width:2;stroke-linejoin:round"
id="path880-7-1-76-8" id="path880-7-1-76-8"
...@@ -2345,27 +2338,6 @@ YAmFwWDYy/8DHTJV9KTZCpkAAAAASUVORK5CYII= ...@@ -2345,27 +2338,6 @@ YAmFwWDYy/8DHTJV9KTZCpkAAAAASUVORK5CYII=
cy="-365.88306" cy="-365.88306"
rx="2.9858103" rx="2.9858103"
ry="2.675787" /> ry="2.675787" />
<ellipse
style="fill:#aa0000;stroke:#aa0000;stroke-width:2;stroke-linejoin:round"
id="path880-7-1-76-8-85"
cx="391.52667"
cy="-365.7836"
rx="2.9858103"
ry="2.675787" />
<ellipse
style="fill:#aa0000;stroke:#aa0000;stroke-width:2;stroke-linejoin:round"
id="path880-7-1-76-8-0"
cx="379.66742"
cy="-365.55286"
rx="2.9858103"
ry="2.675787" />
<ellipse
style="fill:#aa0000;stroke:#aa0000;stroke-width:2;stroke-linejoin:round"
id="path880-7-1-76-1"
cx="364.76254"
cy="-365.55286"
rx="2.9858103"
ry="2.675787" />
<ellipse <ellipse
style="fill:#aa0000;stroke:#aa0000;stroke-width:2;stroke-linejoin:round" style="fill:#aa0000;stroke:#aa0000;stroke-width:2;stroke-linejoin:round"
id="path880-7-1-76-2" id="path880-7-1-76-2"
...@@ -2380,13 +2352,6 @@ YAmFwWDYy/8DHTJV9KTZCpkAAAAASUVORK5CYII= ...@@ -2380,13 +2352,6 @@ YAmFwWDYy/8DHTJV9KTZCpkAAAAASUVORK5CYII=
cy="-365.55286" cy="-365.55286"
rx="2.9858103" rx="2.9858103"
ry="2.675787" /> ry="2.675787" />
<ellipse
style="fill:#aa0000;stroke:#aa0000;stroke-width:2;stroke-linejoin:round"
id="path880-7-1-76-9"
cx="338.44809"
cy="-365.55286"
rx="2.9858103"
ry="2.675787" />
<path <path
style="fill:none;stroke:#000000;stroke-width:1.465;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Lend-2-1)" style="fill:none;stroke:#000000;stroke-width:1.465;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Lend-2-1)"
d="m 293.72037,-415.09093 c 33.9602,-18.35849 69.11882,-0.53749 69.11882,-0.53749" d="m 293.72037,-415.09093 c 33.9602,-18.35849 69.11882,-0.53749 69.11882,-0.53749"
......
...@@ -283,11 +283,14 @@ def sensgauss(angle): ...@@ -283,11 +283,14 @@ def sensgauss(angle):
radius = np.arange(0.1e-6,10e-6,0.01e-6) radius = np.arange(0.1e-6,10e-6,0.01e-6)
ang = 1
plt.figure() plt.figure()
plt.semilogy([r*1e6 for r in radius],sens(radius), linewidth=3, color='coral', label='D-D CPT +2/-2 OAM ') plt.semilogy([r*1e6 for r in radius],sens(radius), linewidth=3, color='coral', label='D-D CPT +2/-2 OAM ')
plt.xlabel('OAM radius (um)') plt.xlabel('OAM radius (um)')
plt.ylabel('Thermometry sensitivity') plt.ylabel('Thermometry sensitivity')
plt.axhline(8.6e6, color='indigo', linestyle='--', label='S-P CPT gaussian sensitivity') plt.axhline(8.6e6, color='indigo', linestyle='--', label='S-P CPT gaussian sensitivity')
plt.axhline(8.6e6, color='indigo', linestyle='--', label='S-P CPT gaussian sensitivity')
plt.grid() plt.grid()
plt.legend() plt.legend()
#!/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]))
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