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
125100ba
Commit
125100ba
authored
Jun 11, 2021
by
Lucas Giardino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
corrijo codigo transicion SP para tomar timestamps + urukul generate datset + algunos resultados
parent
690792f0
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
73 additions
and
30 deletions
+73
-30
single_transition.py
artiq_master/repository/Experiments/single_transition.py
+36
-16
urukul_drivers.py
artiq_master/repository/Experiments/urukul_drivers.py
+37
-14
000000651-SingleLine.h5
artiq_master/results/2021-06-10/20/000000651-SingleLine.h5
+0
-0
000000653-SingleLine.h5
artiq_master/results/2021-06-10/20/000000653-SingleLine.h5
+0
-0
000000654-SingleLine.h5
artiq_master/results/2021-06-10/20/000000654-SingleLine.h5
+0
-0
000000655-SingleLine.h5
artiq_master/results/2021-06-10/20/000000655-SingleLine.h5
+0
-0
000000656-SingleLine.h5
artiq_master/results/2021-06-10/20/000000656-SingleLine.h5
+0
-0
No files found.
artiq_master/repository/Experiments/single_transition.py
View file @
125100ba
...
...
@@ -13,12 +13,14 @@ class SingleLine(EnvExperiment):
"""SP Transition Emission Experiment"""
def
build
(
self
):
self
.
setattr_device
(
"core"
)
self
.
setattr_device
(
"ccb"
)
self
.
setattr_device
(
"ccb"
)
self
.
pmt
=
self
.
get_device
(
"ttl0"
)
self
.
pmt_state
=
self
.
get_device
(
"ttl4"
)
self
.
laserUV
=
UrukulCh
(
self
,
ch
=
0
,
freq
=
100.0
,
amp
=
1.0
)
self
.
laserIR
=
UrukulCh
(
self
,
ch
=
1
,
freq
=
100.0
,
amp
=
1.0
)
self
.
laserUV
=
UrukulCh
(
self
,
ch
=
2
,
freq
=
110.0
,
amp
=
0.3
,
name
=
"UV"
)
#corresponde a 0.7 Vpp
self
.
laserIR
=
UrukulCh
(
self
,
ch
=
1
,
freq
=
208.0
,
amp
=
0.35
,
name
=
"IR"
)
#corresponde a 0.8 Vpp
self
.
setattr_argument
(
"no_measures"
,
NumberValue
(
100
,
min
=
1
,
ndecimals
=
0
,
step
=
1
),
...
...
@@ -28,7 +30,7 @@ class SingleLine(EnvExperiment):
NumberValue
(
10
*
us
,
unit
=
'us'
,
scale
=
us
,
min
=
1
*
us
),
"Experiment params"
)
self
.
setattr_argument
(
f
"t_
ion
"
,
self
.
setattr_argument
(
f
"t_
cool
"
,
NumberValue
(
10
*
us
,
unit
=
'us'
,
scale
=
us
,
min
=
1
*
us
),
"Experiment params"
)
...
...
@@ -36,14 +38,19 @@ class SingleLine(EnvExperiment):
NumberValue
(
5
*
us
,
unit
=
'us'
,
scale
=
us
,
min
=
1
*
us
),
"Experiment params"
)
@
rpc
def
create_datasets
(
self
):
self
.
set_dataset
(
"counts"
,
np
.
full
(
self
.
no_measures
,
np
.
nan
)
,
self
.
set_dataset
(
"counts"
,
[]
,
broadcast
=
True
,
archive
=
True
)
self
.
set_dataset
(
"t_readout"
,
self
.
t_readout
,
broadcast
=
False
,
archive
=
True
)
self
.
set_dataset
(
"t_prep_S"
,
self
.
t_prepS
,
broadcast
=
False
,
archive
=
True
)
self
.
set_dataset
(
"t_
prep_ion"
,
self
.
t_ion
,
broadcast
=
False
,
archive
=
True
)
self
.
set_dataset
(
"t_
enfriar_ion"
,
self
.
t_cool
,
broadcast
=
False
,
archive
=
True
)
self
.
set_dataset
(
"no_measures"
,
self
.
no_measures
,
broadcast
=
False
,
archive
=
True
)
self
.
laserIR
.
generate_dataset
()
self
.
laserUV
.
generate_dataset
()
#self.set_dataset("frec_UV",self.frec_UV, broadcast=False,archive=True)
#self.set_dataset("frec_IR",self.frec_IR, broadcast=False,archive=True)
# TODO: Agregar forma de guardar los datos de los canales del Urukul.
# o bien guardando todos aca, o armando un metodo apropiado en su controlador
...
...
@@ -62,14 +69,15 @@ class SingleLine(EnvExperiment):
self
.
init_kernel
()
delay
(
100
*
ms
)
self
.
prep
_ion
()
self
.
enfriar
_ion
()
for
runN
in
range
(
self
.
no_measures
):
# Aprovecho el tiempo que necesito para extraer datos
# par enfriar al ion con los dos laseres prendidos
at_mu
(
self
.
core
.
get_rtio_counter_mu
()
+
6000
)
at_mu
(
self
.
core
.
get_rtio_counter_mu
()
+
self
.
core
.
seconds_to_mu
(
self
.
t_cool
)
)
self
.
prep_S
()
counts
=
self
.
readout
()
self
.
mutate_dataset
(
"counts"
,
runN
,
counts
)
t_end
=
self
.
readout
()
self
.
save_counts
(
t_end
)
#self.mutate_dataset("counts", runN, counts)
self
.
cleanup
()
...
...
@@ -80,16 +88,19 @@ class SingleLine(EnvExperiment):
self
.
pmt_state
.
output
()
self
.
laserIR
.
initialize_channel
()
self
.
laserUV
.
initialize_channel
()
# Quizas haya errores de tiempo.
self
.
pmt_state
.
off
()
self
.
laserIR
.
set_channel
()
self
.
laserUV
.
set_channel
()
self
.
core
.
wait_until_mu
(
now_mu
())
@
kernel
def
prep
_ion
(
self
):
def
enfriar
_ion
(
self
):
"""Preparo el ion prendiendo ambos laseres"""
self
.
laserIR
.
on
()
self
.
laserUV
.
on
()
#delay(self.t_
ion
)
#delay(self.t_
cool
)
@
kernel
def
prep_S
(
self
):
...
...
@@ -109,11 +120,20 @@ class SingleLine(EnvExperiment):
here
=
self
.
pmt
.
gate_rising
(
self
.
t_readout
)
self
.
pmt_state
.
pulse
(
self
.
t_readout
)
cuentas
=
self
.
pmt
.
count
(
here
)
#
self.pmt_state.pulse(self.t_readout)
#
cuentas = self.pmt.count(here)
delay
(
1
*
us
)
self
.
prep_ion
()
return
cuentas
self
.
enfriar_ion
()
return
here
@
kernel
def
save_counts
(
self
,
t_end
):
count
=
self
.
pmt
.
timestamp_mu
(
t_end
)
t0
=
t_end
-
self
.
core
.
seconds_to_mu
(
self
.
t_readout
)
while
count
>
0
:
self
.
append_to_dataset
(
"counts"
,
self
.
core
.
mu_to_seconds
(
count
-
t0
)
)
count
=
self
.
pmt
.
timestamp_mu
(
t_end
)
@
kernel
def
cleanup
(
self
):
...
...
artiq_master/repository/Experiments/urukul_drivers.py
View file @
125100ba
...
...
@@ -6,33 +6,56 @@ class UrukulCh(HasEnvironment):
Set the frecuencies/amplitudes of each Urukul channel
"""
def
build
(
self
,
ch
=
0
,
freq
=
100.0
,
amp
=
1.0
):
def
build
(
self
,
ch
=
0
,
freq
=
100.0
,
amp
=
1.0
,
name
=
None
):
# super().build() ch, amp, freq
self
.
ch
=
ch
self
.
amp
=
amp
self
.
freq
=
freq
self
.
name
=
name
# sets core device drivers as attributes
self
.
setattr_device
(
"core"
)
self
.
channel
=
self
.
get_device
(
f
"urukul0_ch{self.ch}"
)
### This two attributes will be shown in the GUI grouped by channel
# use/don't use each channel
self
.
state
=
self
.
get_argument
(
f
"state_ch{self.ch}"
,
BooleanValue
(
1
==
0
),
f
"canal_{self.ch}"
)
# each channel's frequency
self
.
frequency
=
self
.
get_argument
(
f
"freq_ch{self.ch}"
,
NumberValue
(
self
.
freq
*
MHz
,
unit
=
'MHz'
,
scale
=
MHz
,
min
=
1
*
MHz
,
max
=
400
*
MHz
),
f
"canal_{self.ch}"
)
# each channel's amplitude
self
.
amplitude
=
self
.
get_argument
(
f
"amp_ch{self.ch}"
,
NumberValue
(
self
.
amp
,
min
=
0.
,
max
=
1.
),
f
"canal_{self.ch}"
)
if
name
==
None
:
self
.
channel
=
self
.
get_device
(
f
"urukul0_ch{self.ch}"
)
### This two attributes will be shown in the GUI grouped by channel
# use/don't use each channel
self
.
state
=
self
.
get_argument
(
f
"state_ch{self.ch}"
,
BooleanValue
(
1
==
0
),
f
"canal_{self.ch}"
)
# each channel's frequency
self
.
frequency
=
self
.
get_argument
(
f
"freq_ch{self.ch}"
,
NumberValue
(
self
.
freq
*
MHz
,
unit
=
'MHz'
,
scale
=
MHz
,
min
=
1
*
MHz
,
max
=
400
*
MHz
),
f
"canal_{self.ch}"
)
# each channel's amplitude
self
.
amplitude
=
self
.
get_argument
(
f
"amp_ch{self.ch}"
,
NumberValue
(
self
.
amp
,
min
=
0.
,
max
=
1.
),
f
"canal_{self.ch}"
)
else
:
self
.
channel
=
self
.
get_device
(
f
"urukul0_ch{self.ch}"
)
### This two attributes will be shown in the GUI grouped by channel
# use/don't use each channel
self
.
state
=
self
.
get_argument
(
f
"state_ch{self.ch}"
,
BooleanValue
(
1
==
0
),
name
)
# each channel's frequency
self
.
frequency
=
self
.
get_argument
(
f
"freq_ch{self.ch}"
,
NumberValue
(
self
.
freq
*
MHz
,
unit
=
'MHz'
,
scale
=
MHz
,
min
=
1
*
MHz
,
max
=
400
*
MHz
),
name
)
# each channel's amplitude
self
.
amplitude
=
self
.
get_argument
(
f
"amp_ch{self.ch}"
,
NumberValue
(
self
.
amp
,
min
=
0.
,
max
=
1.
),
name
)
@
rpc
def
generate_dataset
(
self
):
self
.
set_dataset
(
f
"laser_{self.name}"
,
'{'
+
f
'"freq": {self.frequency}, "amp": {self.amplitude}"'
+
'}'
)
@
kernel
def
initialize_channel
(
self
):
# initialises CPLD the selected channel
self
.
channel
.
cpld
.
init
()
self
.
channel
.
init
()
delay
(
1
*
s
)
@
kernel
def
set_channel
(
self
):
...
...
artiq_master/results/2021-06-10/20/000000651-SingleLine.h5
0 → 100644
View file @
125100ba
File added
artiq_master/results/2021-06-10/20/000000653-SingleLine.h5
0 → 100644
View file @
125100ba
File added
artiq_master/results/2021-06-10/20/000000654-SingleLine.h5
0 → 100644
View file @
125100ba
File added
artiq_master/results/2021-06-10/20/000000655-SingleLine.h5
0 → 100644
View file @
125100ba
File added
artiq_master/results/2021-06-10/20/000000656-SingleLine.h5
0 → 100644
View file @
125100ba
File added
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