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
59fab531
Commit
59fab531
authored
Apr 04, 2025
by
Nicolas Nunez Barreto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosas de la compu de nico
parent
978759ea
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
225 additions
and
0 deletions
+225
-0
20210623_SP_alturas_tiempos.pdf
analisis/plots/20210623_SP_alturas_tiempos.pdf
+0
-0
20210623_SP_alturas_tiempos_power.pdf
analisis/plots/20210623_SP_alturas_tiempos_power.pdf
+0
-0
20210623_SP_alturassobretiempos_vs_amp.pdf
analisis/plots/20210623_SP_alturassobretiempos_vs_amp.pdf
+0
-0
20210623_SP_alturassobretiempos_vs_power.pdf
analisis/plots/20210623_SP_alturassobretiempos_vs_power.pdf
+0
-0
20210623_alturatau_vs_potencia.png
analisis/plots/20210623_alturatau_vs_potencia.png
+0
-0
20210623_fit_histos_taus_potencia.png
analisis/plots/20210623_fit_histos_taus_potencia.png
+0
-0
20210623_potencia_vs_amplitud.png
analisis/plots/20210623_potencia_vs_amplitud.png
+0
-0
000020496-UV_Scan_withcalib_Haeffner.h5
...ra_bladetrap/Data/000020496-UV_Scan_withcalib_Haeffner.h5
+0
-0
000020498-UV_Scan_withcalib_Haeffner.h5
...ra_bladetrap/Data/000020498-UV_Scan_withcalib_Haeffner.h5
+0
-0
000020508-UV_Scan_withcalib_Haeffner.h5
...ra_bladetrap/Data/000020508-UV_Scan_withcalib_Haeffner.h5
+0
-0
UV_spectrums_new.py
...is/plots/20250403_UVspectra_bladetrap/UV_spectrums_new.py
+225
-0
No files found.
analisis/plots/20210623_SP_alturas_tiempos.pdf
deleted
100644 → 0
View file @
978759ea
File deleted
analisis/plots/20210623_SP_alturas_tiempos_power.pdf
deleted
100644 → 0
View file @
978759ea
File deleted
analisis/plots/20210623_SP_alturassobretiempos_vs_amp.pdf
deleted
100644 → 0
View file @
978759ea
File deleted
analisis/plots/20210623_SP_alturassobretiempos_vs_power.pdf
deleted
100644 → 0
View file @
978759ea
File deleted
analisis/plots/20210623_alturatau_vs_potencia.png
deleted
100644 → 0
View file @
978759ea
20.2 KB
analisis/plots/20210623_fit_histos_taus_potencia.png
deleted
100644 → 0
View file @
978759ea
146 KB
analisis/plots/20210623_potencia_vs_amplitud.png
deleted
100644 → 0
View file @
978759ea
18.6 KB
analisis/plots/20250403_UVspectra_bladetrap/Data/000020496-UV_Scan_withcalib_Haeffner.h5
0 → 100644
View file @
59fab531
File added
analisis/plots/20250403_UVspectra_bladetrap/Data/000020498-UV_Scan_withcalib_Haeffner.h5
0 → 100644
View file @
59fab531
File added
analisis/plots/20250403_UVspectra_bladetrap/Data/000020508-UV_Scan_withcalib_Haeffner.h5
0 → 100644
View file @
59fab531
File added
analisis/plots/20250403_UVspectra_bladetrap/UV_spectrums_new.py
0 → 100644
View file @
59fab531
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
# Solo levanto algunos experimentos
Calib_Files
=
"""000012744-UV_Scan_withcalib_Haeffner
000012745-UV_Scan_withcalib_Haeffner
000012749-UV_Scan_withcalib_Haeffner
000012750-UV_Scan_withcalib_Haeffner
000012751-UV_Scan_withcalib_Haeffner
000012752-UV_Scan_withcalib_Haeffner
000012753-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
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
()))
#%%
Amps
=
[]
Freqs
=
[]
Counts
=
[]
T_readouts
=
[]
for
i
,
fname
in
enumerate
(
Calib_Files
.
split
()):
print
(
SeeKeys
(
Calib_Files
))
print
(
i
)
print
(
fname
)
data
=
h5py
.
File
(
fname
+
'.h5'
,
'r'
)
# Leo el h5: Recordar que nuestros datos estan en 'datasets'
print
(
list
(
data
[
'datasets'
]
.
keys
()))
Amps
.
append
(
np
.
array
(
data
[
'datasets'
][
'UV_Amplitudes'
]))
Freqs
.
append
(
np
.
array
(
data
[
'datasets'
][
'UV_Frequencies'
]))
Counts
.
append
(
np
.
array
(
data
[
'datasets'
][
'counts_spectrum'
]))
T_readouts
.
append
(
np
.
array
(
data
[
'datasets'
][
't_readout'
]))
#def GetBackground(countsper100ms, )
#%%
from
scipy.special
import
jv
def
Lorentzian
(
f
,
A
,
x0
,
gamma
,
offset
):
return
(
A
/
np
.
pi
)
*
0.5
*
gamma
/
(((
f
-
x0
)
**
2
)
+
((
0.5
*
gamma
)
**
2
))
+
offset
#40 es el piso de ruido estimado
#primero muestro las meds 0 y 1 que son dos mediciones con potencia UV quizas un poco
#alta pero en la segunda el ion esta un poquito mejor compensado y se ve cómo se afina el espectro
jvec
=
[
6
,
7
,
8
]
plt
.
figure
()
for
j
in
jvec
:
FreqsChosen
=
[
2
*
f
*
1e-6
for
f
in
Freqs
[
j
]]
CountsChosen
=
Counts
[
j
]
portion
=
0.
#popt, pcov = curve_fit(Lorentzian, FreqsChosen[int(portion*len(FreqsChosen)):], CountsChosen[int(portion*len(FreqsChosen)):], p0=[12000, 208, 30, 30])
freqslong
=
np
.
arange
(
min
(
FreqsChosen
)
-
10
,
max
(
FreqsChosen
)
+
10
,
(
FreqsChosen
[
1
]
-
FreqsChosen
[
0
])
*
0.01
)
plt
.
errorbar
(
FreqsChosen
,
CountsChosen
,
yerr
=
np
.
sqrt
(
np
.
array
(
CountsChosen
)),
fmt
=
'o'
,
capsize
=
5
,
markersize
=
5
)
#plt.plot(freqslong, Lorentzian(freqslong, popt[0], popt[1], popt[2]), label=f'FWHM {round(popt[1])} MHz')
#plt.plot(freqslong, Lorentzian(freqslong, popt[0], popt[1], popt[2], popt[3]), label=f'FWHM {round(popt[2],1)} MHz')
#plt.axvline(popt[2]-22.1, linestyle='--', linewidth=1)
#plt.axvline(popt[2]+22.1, linestyle='--', linewidth=1)
plt
.
xlabel
(
'Frecuencia (MHz)'
)
plt
.
ylabel
(
'Cuentas'
)
plt
.
legend
()
#print(f'Ancho medido: {round(popt[2])} MHz')
#%%
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
,
A
,
beta
,
x0
,
gamma
):
ftrap
=
22.1
#gamma=28
P
=
A
*
(
jv
(
0
,
beta
)
**
2
)
/
(((
det
-
x0
)
**
2
)
+
(
0.5
*
gamma
)
**
2
)
+
100
i
=
1
#print(P)
while
i
<=
2
:
P
=
P
+
A
*
((
jv
(
i
,
beta
))
**
2
)
/
((((
det
-
x0
)
+
i
*
ftrap
)
**
2
)
+
(
0.5
*
gamma
)
**
2
)
+
A
*
((
jv
(
-
i
,
beta
))
**
2
)
/
((((
det
-
x0
)
-
i
*
ftrap
)
**
2
)
+
(
0.5
*
gamma
)
**
2
)
i
=
i
+
1
#print(P)
return
P
jvec
=
[
7
]
#UV_cooling en 90 MHz
plt
.
figure
()
for
j
in
jvec
:
FreqsChosen
=
[
2
*
f
*
1e-6
for
f
in
Freqs
[
j
]]
CountsChosen
=
Counts
[
j
]
portion
=
0.
popt
,
pcov
=
curve_fit
(
MicromotionSpectra
,
FreqsChosen
[
int
(
portion
*
len
(
FreqsChosen
)):],
CountsChosen
[
int
(
portion
*
len
(
FreqsChosen
)):],
p0
=
[
100000
,
0.1
,
215
,
22
],
bounds
=
((
0
,
0
,
0
,
0
),(
10000000
,
10
,
300
,
100
)))
print
(
popt
)
freqslong
=
np
.
arange
(
min
(
FreqsChosen
)
-
10
,
max
(
FreqsChosen
)
+
10
,
(
FreqsChosen
[
1
]
-
FreqsChosen
[
0
])
*
0.01
)
plt
.
errorbar
(
FreqsChosen
,
CountsChosen
,
yerr
=
np
.
sqrt
(
np
.
array
(
CountsChosen
)),
fmt
=
'o'
,
capsize
=
5
,
markersize
=
5
)
#plt.plot(freqslong, Lorentzian(freqslong, popt[0], popt[1], popt[2]), label=f'FWHM {round(popt[1])} MHz')
plt
.
plot
(
freqslong
,
MicromotionSpectra
(
freqslong
,
*
popt
),
label
=
f
'FWHM 30 MHz'
)
#plt.axvline(popt[2]+2*22.1, linestyle='--', linewidth=1)
#plt.axvline(popt[2]+22.1, linestyle='--', linewidth=1)
plt
.
xlabel
(
'Frecuencia (MHz)'
)
plt
.
ylabel
(
'Cuentas'
)
plt
.
legend
()
print
(
f
'Beta: {round(popt[1],2)}'
)
#%%
from
scipy.special
import
jv
def
Lorentzian
(
f
,
A
,
x0
,
gamma
,
offset
):
offset
=
50
return
(
A
/
np
.
pi
)
*
0.5
*
gamma
/
(((
f
-
x0
)
**
2
)
+
((
0.5
*
gamma
)
**
2
))
+
offset
#40 es el piso de ruido estimado
#para tres potencias distintas del UV:
jvec
=
[
2
,
3
,
4
,
5
]
plt
.
figure
()
for
j
in
jvec
:
FreqsChosen
=
[
2
*
f
*
1e-6
for
f
in
Freqs
[
j
]]
CountsChosen
=
Counts
[
j
]
portion
=
0.
popt
,
pcov
=
curve_fit
(
Lorentzian
,
FreqsChosen
[
int
(
portion
*
len
(
FreqsChosen
)):],
CountsChosen
[
int
(
portion
*
len
(
FreqsChosen
)):],
p0
=
[
12000
,
208
,
30
,
30
])
freqslong
=
np
.
arange
(
min
(
FreqsChosen
)
-
10
,
max
(
FreqsChosen
)
+
10
,
(
FreqsChosen
[
1
]
-
FreqsChosen
[
0
])
*
0.01
)
plt
.
errorbar
(
FreqsChosen
,
CountsChosen
,
yerr
=
np
.
sqrt
(
np
.
array
(
CountsChosen
)),
fmt
=
'o'
,
capsize
=
5
,
markersize
=
5
)
#plt.plot(freqslong, Lorentzian(freqslong, popt[0], popt[1], popt[2]), label=f'FWHM {round(popt[1])} MHz')
plt
.
plot
(
freqslong
,
Lorentzian
(
freqslong
,
popt
[
0
],
popt
[
1
],
popt
[
2
],
popt
[
3
]),
label
=
f
'FWHM {round(popt[2],1)} MHz'
)
#plt.axvline(popt[2]-22.1, linestyle='--', linewidth=1)
#plt.axvline(popt[2]+22.1, linestyle='--', linewidth=1)
plt
.
xlabel
(
'Frecuencia (MHz)'
)
plt
.
ylabel
(
'Cuentas'
)
plt
.
legend
()
print
(
popt
)
print
(
f
'Ancho medido: {round(popt[2])} MHz'
)
#%%
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
,
A
,
beta
,
x0
,
gamma
):
ftrap
=
22.1
#gamma=35
P
=
A
*
(
jv
(
0
,
beta
)
**
2
)
/
(((
det
-
x0
)
**
2
)
+
(
0.5
*
gamma
)
**
2
)
+
100
i
=
1
#print(P)
while
i
<=
2
:
P
=
P
+
A
*
((
jv
(
i
,
beta
))
**
2
)
/
((((
det
-
x0
)
+
i
*
ftrap
)
**
2
)
+
(
0.5
*
gamma
)
**
2
)
+
A
*
((
jv
(
-
i
,
beta
))
**
2
)
/
((((
det
-
x0
)
-
i
*
ftrap
)
**
2
)
+
(
0.5
*
gamma
)
**
2
)
i
=
i
+
1
#print(P)
return
P
jvec
=
[
6
,
7
]
#6, 7, 8: tres compensaciones distintas. la 8 en realidad el ion se fue un pcoo del pinhole entonces se ve mas chica
plt
.
figure
()
for
j
in
jvec
:
FreqsChosen
=
[
2
*
f
*
1e-6
for
f
in
Freqs
[
j
]]
CountsChosen
=
Counts
[
j
]
portion
=
0.
popt
,
pcov
=
curve_fit
(
MicromotionSpectra
,
FreqsChosen
[
int
(
portion
*
len
(
FreqsChosen
)):],
CountsChosen
[
int
(
portion
*
len
(
FreqsChosen
)):],
p0
=
[
100000
,
0.1
,
215
,
30
],
bounds
=
((
0
,
0
,
0
,
0
),(
10000000
,
10
,
300
,
100
)))
freqslong
=
np
.
arange
(
min
(
FreqsChosen
)
-
10
,
max
(
FreqsChosen
)
+
10
,
(
FreqsChosen
[
1
]
-
FreqsChosen
[
0
])
*
0.01
)
plt
.
errorbar
(
FreqsChosen
,
CountsChosen
,
yerr
=
np
.
sqrt
(
np
.
array
(
CountsChosen
)),
fmt
=
'o'
,
capsize
=
5
,
markersize
=
5
,
label
=
f
'Beta: {round(popt[1],2)}, Gamma: {round(popt[3],1)}'
)
#plt.plot(freqslong, Lorentzian(freqslong, popt[0], popt[1], popt[2]), label=f'FWHM {round(popt[1])} MHz')
plt
.
plot
(
freqslong
,
MicromotionSpectra
(
freqslong
,
*
popt
))
#plt.axvline(popt[2]+2*22.1, linestyle='--', linewidth=1)
#plt.axvline(popt[2]+22.1, linestyle='--', linewidth=1)
plt
.
xlabel
(
'Frecuencia (MHz)'
)
plt
.
ylabel
(
'Cuentas'
)
plt
.
legend
()
print
(
f
'Beta: {round(popt[1],2)}'
)
\ No newline at end of file
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