Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pyLIAF
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
pyLIAF
Commits
f9cbd675
Commit
f9cbd675
authored
Jul 07, 2021
by
Lucas Giardino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agrego opciones de profile en algunas funciones
parent
30daff26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
Urukul.py
pyLIAF/artiq/_controllers/Urukul.py
+16
-8
No files found.
pyLIAF/artiq/_controllers/Urukul.py
View file @
f9cbd675
from
artiq.experiment
import
*
#from typing import TFloat
class
UrukulCh
(
HasEnvironment
):
"""Urukul single freq class
...
...
@@ -6,7 +7,7 @@ class UrukulCh(HasEnvironment):
Set the frecuencies/amplitudes of each Urukul channel
"""
def
build
(
self
,
ch
=
0
,
freq
=
100.0
,
amp
=
1.0
,
name
=
None
):
def
build
(
self
,
ch
:
TInt32
=
0
,
freq
:
TFloat
=
100.0
,
amp
:
TFloat
=
1.0
,
name
=
None
):
self
.
ch
=
ch
self
.
amp
=
amp
self
.
freq
=
freq
...
...
@@ -39,8 +40,8 @@ class UrukulCh(HasEnvironment):
self
.
channel
.
init
()
@
kernel
def
set_channel
(
self
):
self
.
channel
.
set
(
self
.
frequency
,
amplitude
=
self
.
amplitude
)
def
set_channel
(
self
,
profile
:
TInt32
=
0
):
self
.
channel
.
set
(
self
.
frequency
,
amplitude
=
self
.
amplitude
,
profile
=
profile
)
if
self
.
state
==
True
:
self
.
channel
.
sw
.
on
()
...
...
@@ -48,8 +49,15 @@ class UrukulCh(HasEnvironment):
self
.
channel
.
sw
.
off
()
@
kernel
def
set_frequency
(
self
,
freq
):
self
.
channel
.
set
(
freq
,
amplitude
=
self
.
amplitude
)
def
select_profile
(
self
,
number
:
TInt32
):
self
.
channel
.
cpld
.
set_profile
(
number
)
@
kernel
def
set_frequency
(
self
,
freq
:
TFloat
,
profile
:
TInt32
=
0
):
self
.
channel
.
set
(
freq
,
amplitude
=
self
.
amplitude
,
profile
=
profile
)
def
get_frequency
(
self
)
->
TFloat
:
return
self
.
frequency
@
kernel
def
on
(
self
):
...
...
@@ -60,13 +68,13 @@ class UrukulCh(HasEnvironment):
self
.
channel
.
sw
.
off
()
@
kernel
def
set_o
(
self
,
state
):
def
set_o
(
self
,
state
:
TBool
):
self
.
channel
.
sw
.
set_o
(
state
)
@
kernel
def
pulse_mu
(
self
,
delay_time_mu
):
def
pulse_mu
(
self
,
delay_time_mu
:
TInt64
):
self
.
channel
.
sw
.
pulse_mu
(
delay_time_mu
)
@
kernel
def
pulse
(
self
,
delay_time
):
def
pulse
(
self
,
delay_time
:
TFloat
):
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