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
b1154c79
Commit
b1154c79
authored
Jul 09, 2021
by
Nicolas Nunez Barreto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
archivo colgado de analisis
parent
5e5a28ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
0 deletions
+71
-0
Analisis_Espectro_dummy.py
analisis/plots/20210706/Analisis_Espectro_dummy.py
+71
-0
No files found.
analisis/plots/20210706/Analisis_Espectro_dummy.py
0 → 100644
View file @
b1154c79
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
# Solo levanto algunos experimentos
ALL_FILES
=
"""000001853-IR_Scan.h5"""
#000001514-SingleLine.h5 #este tiene amplitud 0.08 que es muy poquito
BINW
=
20e-9
def
expo
(
T
,
tau
,
N0
,
C
):
global
T0
return
N0
*
np
.
exp
(
-
(
T
-
T0
)
/
tau
)
+
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
])
assert
amp
in
amplitudes_UV
potencias_UV
=
np
.
array
([
5
,
11
,
20
,
32
,
47
,
67
,
86
,
105
,
120
,
134
,
144
])
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:
# fig, ax = plt.subplots()
# ax.axvline(T0, color='k')
#os.chdir('/home/oem/Documentos/Doctorado/Artiq/Repositorio/artiq_experiments/artiq_master/results/2021-07-02/17')
#fig0, [ax0, ax1_a] = plt.subplots(1, 2)
#ax1_b = ax1_a.twinx()
allamps
=
np
.
array
([])
allpows
=
np
.
array
([])
alltaus
=
np
.
array
([])
allN0
=
np
.
array
([])
for
i
,
fname
in
enumerate
(
ALL_FILES
.
split
()):
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'
]
#print(laser_UV)
measurements
=
np
.
array
(
data
[
'datasets'
][
'measurements'
])
freqs
=
np
.
array
(
data
[
'datasets'
][
'IR_frequencies'
])
n
=
np
.
array
(
data
[
'datasets'
][
'no_measures'
])
print
(
measurements
)
print
(
freqs
)
print
(
n
)
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