Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
artiq_experiments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nicolas Nunez Barreto
artiq_experiments
Commits
7f468d59
Commit
7f468d59
authored
Jul 20, 2023
by
Nicolas Nunez Barreto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agreto doto
parent
2983dff9
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1463 additions
and
0 deletions
+1463
-0
threeLevel_2repumps_AnalysisFunctions.py
...ones/Data/EITfit/threeLevel_2repumps_AnalysisFunctions.py
+608
-0
threeLevel_2repumps_CPTPlotter.py
...istal2iones/Data/EITfit/threeLevel_2repumps_CPTPlotter.py
+233
-0
threeLevel_2repumps_linealpol_python_scripts.py
...ta/EITfit/threeLevel_2repumps_linealpol_python_scripts.py
+542
-0
Espectroscpt_cristal.py
...s/20230720_EspectrosCristal2iones/Espectroscpt_cristal.py
+80
-0
No files found.
analisis/plots/20230720_EspectrosCristal2iones/Data/EITfit/threeLevel_2repumps_AnalysisFunctions.py
0 → 100644
View file @
7f468d59
This diff is collapsed.
Click to expand it.
analisis/plots/20230720_EspectrosCristal2iones/Data/EITfit/threeLevel_2repumps_CPTPlotter.py
0 → 100644
View file @
7f468d59
#!/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
]))
analisis/plots/20230720_EspectrosCristal2iones/Data/EITfit/threeLevel_2repumps_linealpol_python_scripts.py
0 → 100644
View file @
7f468d59
This diff is collapsed.
Click to expand it.
analisis/plots/20230720_EspectrosCristal2iones/Espectroscpt_cristal.py
0 → 100644
View file @
7f468d59
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/20230713_EspectrosCristal6iones/Data/'
)
MOTIONAL_FILES
=
"""000013216-IR_Scan_withcal_optimized_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
CountsRoi1
=
[]
CountsRoi2
=
[]
CountsRoi3
=
[]
CountsRoi4
=
[]
CountsRoi5
=
[]
CountsRoi6
=
[]
CountsRoi7
=
[]
#Amplitudes = []
IR1_Freqs
=
[]
#IR_amps = []
for
i
,
fname
in
enumerate
(
MOTIONAL_FILES
.
split
()):
print
(
str
(
i
)
+
' - '
+
fname
)
data
=
h5py
.
File
(
fname
+
'.h5'
,
'r'
)
#Amplitudes.append(np.array(data['datasets']['amplitudes']))
CountsRoi1
.
append
(
np
.
array
(
data
[
'datasets'
][
'counts_roi1'
]))
CountsRoi2
.
append
(
np
.
array
(
data
[
'datasets'
][
'counts_roi2'
]))
IR1_Freqs
.
append
(
np
.
array
(
data
[
'datasets'
][
'IR1_Frequencies'
]))
#%%
"""
En cristal de 2 iones veo espectros cpt.
"""
i
=
0
CountsRois
=
[
CountsRoi1
,
CountsRoi2
]
plt
.
figure
()
f
=
[
1
]
for
counts
in
CountsRois
:
plt
.
plot
(
IR1_Freqs
[
0
][
1
:],
[
c
for
c
in
counts
[
0
][
1
:]],
'-o'
,
markersize
=
2
)
i
=
i
+
1
plt
.
xlabel
(
'Frecuencia'
)
plt
.
ylabel
(
'Cuentas ROI'
)
#plt.xlim(0.05,0.23)
#plt.ylim(15550,16400)
plt
.
grid
()
plt
.
legend
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment