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
5e5a28ae
Commit
5e5a28ae
authored
Jul 09, 2021
by
Nicolas Nunez Barreto
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://code.df.uba.ar/nnunez/artiq_experiments
nada jaja
parents
8c22b64a
fd6b6888
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
129 additions
and
7 deletions
+129
-7
apagado_vs_potencia.py
analisis/plots/20210703/apagado_vs_potencia.py
+6
-7
Encendido_AOM_UV.py
analisis/plots/20210705_EncendidoAOM_UV/Encendido_AOM_UV.py
+123
-0
encendido_AOM_UV.png
analisis/plots/20210705_EncendidoAOM_UV/encendido_AOM_UV.png
+0
-0
encendido_AOM_UV_bin1ns.png
...lots/20210705_EncendidoAOM_UV/encendido_AOM_UV_bin1ns.png
+0
-0
encendido_AOM_UV_bin5ns.png
...lots/20210705_EncendidoAOM_UV/encendido_AOM_UV_bin5ns.png
+0
-0
estadistica_uvon_uvoff_poissonian.png
...705_EncendidoAOM_UV/estadistica_uvon_uvoff_poissonian.png
+0
-0
full_encendido_AOM_UV_bin1ns.png
...20210705_EncendidoAOM_UV/full_encendido_AOM_UV_bin1ns.png
+0
-0
No files found.
analisis/plots/20210703/apagado_vs_potencia.py
View file @
5e5a28ae
...
...
@@ -18,9 +18,8 @@ ALL_FILES_SP = """000001503-SingleLine.h5
000001510-SingleLine.h5
000001511-SingleLine.h5
000001512-SingleLine.h5
000001513-SingleLine.h5"""
#000001514-SingleLine.h5 #este tiene amplitud 0.08 que es muy poquito
000001513-SingleLine.h5
000001514-SingleLine.h5"""
#este tiene amplitud 0.08 que es muy poquito
BINW
=
20e-9
T0
=
1.15e-6
...
...
@@ -32,17 +31,17 @@ def expo(T, tau, N0, C):
def
pow_from_amp
(
amp
):
"""Paso de amplitud urukul a potencia medida por Nico"""
# Forma altamente ineficiente de hacer esto, pero me salio asi
amplitudes_UV
=
np
.
array
([
0.10
,
0.12
,
0.14
,
0.16
,
0.18
,
0.20
,
0.22
,
0.24
,
0.26
,
0.28
,
0.30
]
)
amplitudes_UV
=
np
.
flip
(
np
.
array
([
0.08
,
0.10
,
0.12
,
0.14
,
0.16
,
0.18
,
0.20
,
0.22
,
0.24
,
0.26
,
0.28
,
0.30
])
)
assert
amp
in
amplitudes_UV
potencias_UV
=
np
.
array
([
5
,
11
,
20
,
32
,
47
,
67
,
86
,
105
,
120
,
134
,
144
]
)
potencias_UV
=
np
.
flip
(
np
.
array
([
4
,
10
,
19
,
32
,
49
,
71
,
96
,
125
,
155
,
183
,
208
,
229
])
)
return
potencias_UV
[
np
.
where
(
amplitudes_UV
==
amp
)][
0
]
amplitudes_UV
=
np
.
flip
(
np
.
array
([
0.08
,
0.10
,
0.12
,
0.14
,
0.16
,
0.18
,
0.20
,
0.22
,
0.24
,
0.26
,
0.28
,
0.30
]))
potencias_UV
=
np
.
flip
(
np
.
array
([
4
,
10
,
19
,
32
,
49
,
71
,
96
,
125
,
155
,
183
,
208
,
229
]))
"""
plt.plot(amplitudes_UV, potencias_UV, 'ko-', lw=0.2)
plt.xlabel("Amplitud Urukul")
plt.ylabel("Potencia /uW")
plt.grid()
"""
#%%
## Mostrar corte de los histos:
...
...
analisis/plots/20210705_EncendidoAOM_UV/Encendido_AOM_UV.py
0 → 100755
View file @
5e5a28ae
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 7 16:12:04 2021
@author: oem
"""
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.optimize
import
curve_fit
from
scipy.special
import
factorial
from
scipy.stats
import
poisson
# Solo levanto algunos experimentos
ALL_FILES_SP
=
"""000001556-SingleLine.h5
000001558-SingleLine.h5
000001559-SingleLine.h5
000001560-SingleLine.h5"""
#000001514-SingleLine.h5 #este tiene amplitud 0.08 que es muy poquito
BINW
=
1e-9
T0
=
0.0e-6
os
.
chdir
(
'/home/oem/Documentos/Doctorado/Artiq/Repositorio/artiq_experiments/artiq_master/results/2021-07-05/16'
)
fig0
,
ax0
=
plt
.
subplots
()
#ax1_b = ax1_a.twinx()
for
i
,
fname
in
enumerate
(
ALL_FILES_SP
.
split
()):
if
i
==
3
:
print
(
i
)
print
(
fname
)
data
=
h5py
.
File
(
fname
,
'r'
)
# Leo el h5: Recordar que nuestros datos estan en 'datasets'
# Aca hago algo repugnante para poder levantar los strings que dejamos
# que además tenian un error de tipeo al final. Esto no deberá ser necesario
# cuando se solucione el error este del guardado.
laser_UV_amp
=
data
[
'datasets'
][
'laser_UV_amp'
]
laser_UV_freq
=
data
[
'datasets'
][
'laser_UV_freq'
]
counts
=
np
.
array
(
data
[
'datasets'
][
'counts'
])
bines
=
np
.
arange
(
counts
.
min
(),
counts
.
max
()
+
BINW
,
BINW
)
heigs
,
binsf
=
np
.
histogram
(
counts
,
bines
[
bines
>
T0
])
times
=
[
t
*
1e6
for
t
in
binsf
[:
-
1
]]
#ax0.step([t*1e6 for t in binsf[:-1]], heigs, label=f"AMP: {laser_UV_amp}", where='mid', color='blue', lw=1, alpha=0.4)
ax0
.
plot
(
times
,
heigs
,
'o-'
,
color
=
'blue'
,
lw
=
1
)
#ax0.set_xlim(0.95, 1.2)
ti
=
1.045
tf
=
1.1
#ax0.axvline(ti, color='red', linestyle='dashed', linewidth=2)
#ax0.axvline(tf, color='red', linestyle='dashed', linewidth=2)
ax0
.
set_title
(
f
'UV AOM on, 5 M meds, bin {int(BINW*1e9)} ns, turning on: {round((tf-ti)*1000)} ns'
)
ax0
.
set_xlabel
(
'Time (us)'
)
ax0
.
set_ylabel
(
'Counts'
)
ax0
.
grid
()
#%%
"""
Ahora veo el comportamiento estadistico de oscuridad y del laser prendido a ver si es poissoniano
"""
def
fit_function
(
k
,
lamb
):
'''poisson function, parameter lamb is the fit parameter'''
return
poisson
.
pmf
(
k
,
lamb
)
binw
=
1
counts_UVoff
=
heigs
[
0
:
int
(
0.45
*
len
(
heigs
))]
counts_UVon
=
heigs
[
int
(
0.55
*
len
(
heigs
)):]
N
=
len
(
counts_UVoff
)
mediaoff
=
np
.
mean
(
counts_UVoff
)
mediaon
=
np
.
mean
(
counts_UVon
)
binesoff
=
np
.
arange
(
counts_UVoff
.
min
(),
counts_UVoff
.
max
()
+
binw
,
binw
)
bineson
=
np
.
arange
(
counts_UVon
.
min
(),
counts_UVon
.
max
()
+
binw
,
binw
)
heigsoff
,
binsoff
=
np
.
histogram
(
counts_UVoff
,
binesoff
)
heigson
,
binson
=
np
.
histogram
(
counts_UVon
,
bineson
)
#plt.figure()
#plt.plot(binsoff[:-1], heigsoff, 'o-', bineson[:-1], heigson, 'o-')
"""
#Puedo ajustar con poissoniana o directamente plotearle una
parametersoff, cov_matrixoff = curve_fit(fit_function, binsoff[:-1], heigsoff/sum(heigsoff))
parameterson, cov_matrixon = curve_fit(fit_function, binson[:-1], heigson/sum(heigson))
"""
xoff
=
binsoff
[:
-
1
]
xon
=
binson
[:
-
1
]
plt
.
figure
()
plt
.
plot
(
binsoff
[:
-
1
],
heigsoff
/
sum
(
heigsoff
),
'ko'
,
label
=
'Laser UV off'
)
plt
.
plot
(
xoff
,
[
fit_function
(
k
,
np
.
mean
(
counts_UVoff
))
for
k
in
xoff
],
'r'
,
lw
=
3
)
plt
.
plot
(
binson
[:
-
1
],
heigson
/
sum
(
heigson
),
'bo'
,
label
=
'Laser UV on'
)
plt
.
plot
(
xon
,[
fit_function
(
k
,
np
.
mean
(
counts_UVon
))
for
k
in
xon
],
'r'
,
lw
=
3
)
plt
.
xlabel
(
'Counts'
)
plt
.
ylabel
(
'Occurrences'
)
plt
.
title
(
f
'Bin: {binw} ns, {N} measurements, no ions'
)
plt
.
legend
()
analisis/plots/20210705_EncendidoAOM_UV/encendido_AOM_UV.png
0 → 100644
View file @
5e5a28ae
15.9 KB
analisis/plots/20210705_EncendidoAOM_UV/encendido_AOM_UV_bin1ns.png
0 → 100644
View file @
5e5a28ae
21.5 KB
analisis/plots/20210705_EncendidoAOM_UV/encendido_AOM_UV_bin5ns.png
0 → 100644
View file @
5e5a28ae
16 KB
analisis/plots/20210705_EncendidoAOM_UV/estadistica_uvon_uvoff_poissonian.png
0 → 100644
View file @
5e5a28ae
16.5 KB
analisis/plots/20210705_EncendidoAOM_UV/full_encendido_AOM_UV_bin1ns.png
0 → 100644
View file @
5e5a28ae
17.5 KB
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