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
fc4cdd60
Commit
fc4cdd60
authored
Jun 04, 2021
by
Lucas Giardino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
experimento de transicion SP andando mas o menos
parent
6eeb6608
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
13 deletions
+72
-13
single_transition.py
artiq_master/repository/Experiments/single_transition.py
+53
-13
urukul_drivers.py
artiq_master/repository/Experiments/urukul_drivers.py
+19
-0
No files found.
artiq_master/repository/Experiments/single_transition.py
View file @
fc4cdd60
...
...
@@ -3,12 +3,20 @@ from urukul_drivers import UrukulCh
import
time
import
numpy
as
np
def
SingleLine
(
EnvExperiment
):
"""S-P Transition Emission Experiment"""
# TODO:
# [ ] Revisar los tiempos
# [ ] Ver por que da overflow intermitentemente en las corrids
# [ ] Ver como esta guardando los resultados y guardar lo que falta
# [ ] Cambiarle los parametros a los laseres cuando arranca el exp
class
SingleLine
(
EnvExperiment
):
"""SP Transition Emission Experiment"""
def
build
(
self
):
self
.
setattr_device
(
"core"
)
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
)
...
...
@@ -17,46 +25,62 @@ def SingleLine(EnvExperiment):
"Experiment params"
)
self
.
setattr_argument
(
f
"t_prepS"
,
NumberValue
(
1
*
us
,
unit
=
'us'
,
scale
=
us
,
min
=
1
*
us
),
NumberValue
(
1
0
*
us
,
unit
=
'us'
,
scale
=
us
,
min
=
1
*
us
),
"Experiment params"
)
self
.
setattr_argument
(
f
"t_ion"
,
NumberValue
(
1
*
us
,
unit
=
'us'
,
scale
=
us
,
min
=
1
*
us
),
NumberValue
(
1
0
*
us
,
unit
=
'us'
,
scale
=
us
,
min
=
1
*
us
),
"Experiment params"
)
self
.
setattr_argument
(
f
"t_readout"
,
NumberValue
(
1
*
us
,
unit
=
'us'
,
scale
=
us
,
min
=
1
*
us
),
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
),
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
(
"no_measures"
,
self
.
no_measures
,
broadcast
=
False
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
(
"no_measures"
,
self
.
no_measures
,
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
@
rpc
def
create_applets
(
self
):
self
.
ccb
.
issue
(
"create_applet"
,
"cuentas"
,
"${artiq_applet}histogram "
"counts "
"--update-delay 0.2"
)
@
kernel
def
run
(
self
):
self
.
create_datasets
()
self
.
create_applets
()
self
.
init_kernel
()
delay
(
100
*
ms
)
self
.
prep_ion
()
for
runN
in
range
(
self
.
no_measures
):
self
.
prep_ion
()
# 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
)
self
.
prep_S
()
counts
=
self
.
readout
()
self
.
mutate_dataset
(
"counts"
,
runN
,
counts
)
delay_mu
(
8
)
self
.
cleanup
()
@
kernel
def
init_kernel
(
self
):
self
.
core
.
reset
()
self
.
pmt
.
input
()
self
.
pmt_state
.
output
()
self
.
laserIR
.
initialize_channel
()
self
.
laserUV
.
initialize_channel
()
self
.
pmt_state
.
off
()
self
.
core
.
wait_until_mu
(
now_mu
())
...
...
@@ -65,7 +89,7 @@ def SingleLine(EnvExperiment):
"""Preparo el ion prendiendo ambos laseres"""
self
.
laserIR
.
on
()
self
.
laserUV
.
on
()
delay
(
self
.
t_ion
)
#
delay(self.t_ion)
@
kernel
def
prep_S
(
self
):
...
...
@@ -80,4 +104,20 @@ def SingleLine(EnvExperiment):
"""Registro cuentas emitidas con el laser UV prendido"""
self
.
laserIR
.
off
()
self
.
laserUV
.
on
()
return
self
.
pmt
.
count
(
self
.
t_readout
)
# Prendo y apago la TTL para ver en el osc.
here
=
self
.
pmt
.
gate_rising
(
self
.
t_readout
)
self
.
pmt_state
.
pulse
(
self
.
t_readout
)
cuentas
=
self
.
pmt
.
count
(
here
)
delay
(
1
*
us
)
self
.
prep_ion
()
return
cuentas
@
kernel
def
cleanup
(
self
):
self
.
core
.
break_realtime
()
self
.
laserIR
.
off
()
self
.
laserUV
.
off
()
self
.
pmt_state
.
off
()
artiq_master/repository/Experiments/urukul_drivers.py
View file @
fc4cdd60
...
...
@@ -43,3 +43,22 @@ class UrukulCh(HasEnvironment):
else
:
self
.
channel
.
sw
.
off
()
@
kernel
def
on
(
self
):
self
.
channel
.
sw
.
on
()
@
kernel
def
off
(
self
):
self
.
channel
.
sw
.
off
()
@
kernel
def
set_o
(
self
,
state
):
self
.
channel
.
sw
.
set_o
(
state
)
@
kernel
def
pulse_mu
(
self
,
delay_time_mu
):
self
.
channel
.
sw
.
pulse_mu
(
delay_time_mu
)
@
kernel
def
pulse
(
self
,
delay_time
):
self
.
channel
.
sw
.
pulse
(
delay_time
)
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