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
cf9323b4
Commit
cf9323b4
authored
Jul 15, 2021
by
Nicolas Nunez Barreto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agrego codigos para ver lo de la calibracion
parent
71b527d1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
0 deletions
+100
-0
Calibration_tests.py
...sis/plots/20210714_CalibrationsTests/Calibration_tests.py
+100
-0
LaserUV_VariasCurvas.png
...210714_CalibrationsTests/Figuras/LaserUV_VariasCurvas.png
+0
-0
LaserUV_unafreq.png
...ts/20210714_CalibrationsTests/Figuras/LaserUV_unafreq.png
+0
-0
LaserUV_unafreq_axislabels.png
..._CalibrationsTests/Figuras/LaserUV_unafreq_axislabels.png
+0
-0
No files found.
analisis/plots/20210714_CalibrationsTests/Calibration_tests.py
0 → 100644
View file @
cf9323b4
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
ALL_FILES
=
"""000002068-LaserPowerCalibration.h5"""
#carpeta pc nico labo escritorio:
#C:\Users\Usuario\Documents\artiq\artiq_experiments\artiq_master\results\2021-07-14\16
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.
Calibration_amps
=
np
.
array
(
data
[
'datasets'
][
'Calibration_amps'
])
Calibration_freqs
=
np
.
array
(
data
[
'datasets'
][
'Calibration_freqs'
])
PD_UV_counts
=
np
.
array
(
data
[
'datasets'
][
'PD_UV_counts'
])
#%%
#for i in range(len(measurements)):
# SumaTotal[i%len(freqs)] = SumaTotal[i%len(freqs)] + measurements[i]
len_amps
=
len
(
Calibration_amps
)
len_freqs
=
int
(
len
(
Calibration_freqs
)
/
len_amps
)
freqs
=
Calibration_freqs
[
0
:
len_freqs
]
n
=
len
(
freqs
)
PD_split
=
np
.
matrix
([
PD_UV_counts
[
i
*
n
:(
i
+
1
)
*
n
]
for
i
in
range
((
len
(
PD_UV_counts
)
+
n
-
1
)
//
n
)])
PD_T
=
np
.
transpose
(
PD_split
)
plt
.
figure
()
for
i
in
range
(
len
(
PD_split
)):
plt
.
plot
([
f
*
1e-6
for
f
in
freqs
],
np
.
array
(
PD_split
[
i
])[
0
],
'o'
)
plt
.
xlabel
(
'Frecuencia (MHz)'
)
plt
.
ylabel
(
'Voltaje fotodiodo (V)'
)
plt
.
title
(
'Láser UV'
)
i
=
10
plt
.
figure
()
plt
.
plot
(
np
.
array
(
PD_T
[
i
][
0
])[
0
],
Calibration_amps
,
'o'
,
label
=
f
"Freq: {round(freqs[i]*1e-6, 3)} MHz"
)
plt
.
ylabel
(
'Amplitud Artiq'
)
plt
.
xlabel
(
"Voltaje fotodiodo (V)"
)
plt
.
legend
()
#%%
i
=
15
interpolations
=
[]
for
i
in
range
(
len
(
PD_T
)):
PD
=
np
.
array
(
PD_T
[
i
][
0
])[
0
]
amps
=
Calibration_amps
f
=
interpolate
.
interp1d
(
PD
,
amps
,
kind
=
'quadratic'
)
xs
=
np
.
arange
(
min
(
PD
),
max
(
PD
),
1e-4
)
interpolations
.
append
(
f
)
Calibs
=
[]
for
fi
in
interpolations
:
try
:
Calibs
.
append
(
fi
(
0.2
))
except
:
Calibs
.
append
(
0
)
plt
.
plot
(
freqs
,
Calibs
,
'o'
)
analisis/plots/20210714_CalibrationsTests/Figuras/LaserUV_VariasCurvas.png
0 → 100644
View file @
cf9323b4
29.2 KB
analisis/plots/20210714_CalibrationsTests/Figuras/LaserUV_unafreq.png
0 → 100644
View file @
cf9323b4
8.19 KB
analisis/plots/20210714_CalibrationsTests/Figuras/LaserUV_unafreq_axislabels.png
0 → 100644
View file @
cf9323b4
9.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