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
21bcb32a
Commit
21bcb32a
authored
May 13, 2022
by
Nicolas Nunez Barreto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
meto archivos nuevos
parent
7f8b6916
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
104 additions
and
18 deletions
+104
-18
000007161-UV_Scan_withcalib_Haeffner.h5
...trosUVnuevos/Data/000007161-UV_Scan_withcalib_Haeffner.h5
+0
-0
000007163-UV_Scan_withcalib_Haeffner.h5
...trosUVnuevos/Data/000007163-UV_Scan_withcalib_Haeffner.h5
+0
-0
000007165-UV_Scan_withcalib_Haeffner.h5
...trosUVnuevos/Data/000007165-UV_Scan_withcalib_Haeffner.h5
+0
-0
000007198-UV_Scan_withcalib_Haeffner.h5
...trosUVnuevos/Data/000007198-UV_Scan_withcalib_Haeffner.h5
+0
-0
000007209-UV_Scan_withcalib_Haeffner.h5
...trosUVnuevos/Data/000007209-UV_Scan_withcalib_Haeffner.h5
+0
-0
000007211-UV_Scan_withcalib_Haeffner.h5
...trosUVnuevos/Data/000007211-UV_Scan_withcalib_Haeffner.h5
+0
-0
000007212-UV_Scan_withcalib_Haeffner.h5
...trosUVnuevos/Data/000007212-UV_Scan_withcalib_Haeffner.h5
+0
-0
UV_spectrums.py
analisis/plots/20220503_EspectrosUVnuevos/UV_spectrums.py
+104
-18
No files found.
analisis/plots/20220503_EspectrosUVnuevos/Data/000007161-UV_Scan_withcalib_Haeffner.h5
0 → 100644
View file @
21bcb32a
File added
analisis/plots/20220503_EspectrosUVnuevos/Data/000007163-UV_Scan_withcalib_Haeffner.h5
0 → 100644
View file @
21bcb32a
File added
analisis/plots/20220503_EspectrosUVnuevos/Data/000007165-UV_Scan_withcalib_Haeffner.h5
0 → 100644
View file @
21bcb32a
File added
analisis/plots/20220503_EspectrosUVnuevos/Data/000007198-UV_Scan_withcalib_Haeffner.h5
0 → 100644
View file @
21bcb32a
File added
analisis/plots/20220503_EspectrosUVnuevos/Data/000007209-UV_Scan_withcalib_Haeffner.h5
0 → 100644
View file @
21bcb32a
File added
analisis/plots/20220503_EspectrosUVnuevos/Data/000007211-UV_Scan_withcalib_Haeffner.h5
0 → 100644
View file @
21bcb32a
File added
analisis/plots/20220503_EspectrosUVnuevos/Data/000007212-UV_Scan_withcalib_Haeffner.h5
0 → 100644
View file @
21bcb32a
File added
analisis/plots/20220503_EspectrosUVnuevos/UV_spectrums.py
View file @
21bcb32a
...
...
@@ -10,7 +10,14 @@ from scipy import interpolate
# Solo levanto algunos experimentos
Calib_Files
=
"""000007155-UV_Scan_withcalib_Haeffner
000007160-UV_Scan_withcalib_Haeffner"""
000007160-UV_Scan_withcalib_Haeffner
000007161-UV_Scan_withcalib_Haeffner
000007163-UV_Scan_withcalib_Haeffner
000007165-UV_Scan_withcalib_Haeffner
000007198-UV_Scan_withcalib_Haeffner
000007209-UV_Scan_withcalib_Haeffner
000007211-UV_Scan_withcalib_Haeffner
000007212-UV_Scan_withcalib_Haeffner"""
...
...
@@ -28,6 +35,7 @@ def SeeKeys(files):
Amps
=
[]
Freqs
=
[]
Counts
=
[]
T_readouts
=
[]
for
i
,
fname
in
enumerate
(
Calib_Files
.
split
()):
print
(
SeeKeys
(
Calib_Files
))
...
...
@@ -38,6 +46,7 @@ for i, fname in enumerate(Calib_Files.split()):
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, )
...
...
@@ -45,30 +54,107 @@ for i, fname in enumerate(Calib_Files.split()):
#%%
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
jvec
=
[
8
]
#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
(
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 30 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
))
+
10
#40 es el piso de ruido estimado
return
(
A
/
np
.
pi
)
*
0.5
*
gamma
/
(((
f
-
x0
)
**
2
)
+
((
0.5
*
gamma
)
**
2
))
def
MicromotionSpectra
(
det
,
A
,
beta
,
x0
):
ftrap
=
22.1
gamma
=
23
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()
j
=
0
#UV_cooling en 90 MHz
for j in jvec:
FreqsChosen
=
[
2
*
f
*
1e-6
for
f
in
Freqs
[
j
]]
CountsChosen
=
Counts
[
j
]
FreqsChosen = [2*f*1e-6 for f in Freqs[j]]
CountsChosen = Counts[j]
portion
=
0.
portion = 0.
popt
,
pcov
=
curve_fit
(
Lorentzian
,
FreqsChosen
[
int
(
portion
*
len
(
FreqsChosen
)):],
CountsChosen
[
int
(
portion
*
len
(
FreqsChosen
)):
])
popt, pcov = curve_fit(Lorentzian, FreqsChosen[int(portion*len(FreqsChosen)):], CountsChosen[int(portion*len(FreqsChosen)):], p0=[12000, 25, 208, 30
])
freqslong
=
np
.
arange
(
min
(
FreqsChosen
)
-
10
,
max
(
FreqsChosen
)
+
10
,
(
FreqsChosen
[
1
]
-
FreqsChosen
[
0
])
*
0.01
)
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 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'Ancho medido: {round(popt[1])} MHz')
"""
plt
.
figure
()
plt
.
plot
(
FreqsChosen
,
CountsChosen
,
'o'
,
label
=
'4 uW'
)
plt
.
plot
(
freqslong
,
Lorentzian
(
freqslong
,
*
popt
),
label
=
f
'FWHM {round(popt[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[1])} MHz'
)
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
=
[
200
,
4
,
220
],
bounds
=
((
-
1000
,
-
10
,
-
300
),(
1000
,
10
,
300
)))
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
'Ancho medido: {round(popt[1])} MHz'
)
\ 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