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
45e7941a
Commit
45e7941a
authored
Jun 19, 2021
by
Lucas Giardino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
elimino archivos redundantes con pyLIAF
parent
c3d6f853
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
165 deletions
+0
-165
rpdummy.py
artiq_master/repository/Examples/Urukul/rpdummy.py
+0
-8
urukul_drivers.py
artiq_master/repository/Examples/Urukul/urukul_drivers.py
+0
-70
urukul_drivers.py
artiq_master/repository/Experiments/urukul_drivers.py
+0
-87
No files found.
artiq_master/repository/Examples/Urukul/rpdummy.py
deleted
100644 → 0
View file @
c3d6f853
import
random
import
numpy
as
np
class
RedPitaya
:
def
__init__
(
self
):
pass
def
give_measurement
(
self
):
return
0.5
*
(
random
.
random
()
+
1
)
artiq_master/repository/Examples/Urukul/urukul_drivers.py
deleted
100644 → 0
View file @
c3d6f853
from
artiq.experiment
import
*
class
UrukulCh
(
HasEnvironment
):
"""Urukul single freq class
Set the frecuencies/amplitudes of each Urukul channel
"""
def
build
(
self
,
ch
=
0
,
freq
=
100.0
,
amp
=
1.0
):
# super().build() ch, amp, freq
self
.
ch
=
ch
self
.
amp
=
amp
self
.
freq
=
freq
# 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 self.ch == 0:
# self.channel = self.urukul0_ch0
# self.amplitude = self.amp_ch0
# self.frequency = self.freq_ch0
# self.state = self.state_ch0
# elif self.ch == 1:
# self.channel = self.urukul0_ch1
# self.amplitude = self.amp_ch1
# self.frequency = self.freq_ch1
# self.state = self.state_ch1
# elif self.ch == 2:
# self.channel = self.urukul0_ch2
# self.amplitude = self.amp_ch2
# self.frequency = self.freq_ch2
# self.state = self.state_ch2
# elif self.ch == 3:
# self.channel = self.urukul0_ch3
# self.amplitude = self.amp_ch3
# self.frequency = self.freq_ch3
# self.state = self.state_ch3
@
kernel
def
initialize_channel
(
self
):
# self.core.reset()
# initialises CPLD the selected channel
self
.
channel
.
cpld
.
init
()
self
.
channel
.
init
()
@
kernel
def
set_channel
(
self
):
self
.
channel
.
set_att
(
0.
)
self
.
channel
.
set
(
self
.
frequency
,
amplitude
=
self
.
amplitude
)
# turn on every selected channel
if
self
.
state
==
True
:
self
.
channel
.
sw
.
on
()
else
:
self
.
channel
.
sw
.
off
()
artiq_master/repository/Experiments/urukul_drivers.py
deleted
100644 → 0
View file @
c3d6f853
from
artiq.experiment
import
*
class
UrukulCh
(
HasEnvironment
):
"""Urukul single freq class
Set the frecuencies/amplitudes of each Urukul channel
"""
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"
)
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
):
self
.
channel
.
set
(
self
.
frequency
,
amplitude
=
self
.
amplitude
)
if
self
.
state
==
True
:
self
.
channel
.
sw
.
on
()
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