Commit c3d6f853 authored by Lucas Giardino's avatar Lucas Giardino

cambio todo para usar pyLIAF

parent cb287172
from urukul_drivers import UrukulCh
import numpy as np import numpy as np
from artiq.experiment import * from artiq.experiment import *
from pyLIAF.artiq.controllers import UrukulCh
class PMTCalibration(EnvExperiment): class PMTCalibration(EnvExperiment):
...@@ -27,7 +27,7 @@ class PMTCalibration(EnvExperiment): ...@@ -27,7 +27,7 @@ class PMTCalibration(EnvExperiment):
@rpc @rpc
def create_applets(self): def create_applets(self):
self.ccb.issue("create_applet", "calibration_pmt_blinking", self.ccb.issue("create_applet", "calibration_pmt_blinking",
"${artiq_applet}realtime " "${python} -m pyLIAF.artiq.applets.realtime "
"200 " "200 "
"pmt_counts_on " "pmt_counts_on "
"--y2 pmt_counts_off") "--y2 pmt_counts_off")
......
from artiq.experiment import * from artiq.experiment import *
from urukul import UrukulCh from pyLIAF.artiq.controllers import UrukulCh
import time from pyLIAF.artiq.dummies import RedPitaya
import numpy as np import numpy as np
from rpdummy import RedPitaya
class TestDataset(EnvExperiment): class TestDataset(EnvExperiment):
"""Test dataset con Pitaya dummy """Test dataset con Pitaya dummy
......
from artiq.experiment import * from artiq.experiment import *
from urukul_drivers import UrukulCh from pyLIAF.artiq.controllers import UrukulCh
import time
import numpy as np import numpy as np
from rpdummy import RedPitaya
class ControlAllRF(EnvExperiment): class ControlAllRF(EnvExperiment):
"""Urukul control all RF withe the driver """Urukul control all RF withe the driver
...@@ -16,13 +14,12 @@ class ControlAllRF(EnvExperiment): ...@@ -16,13 +14,12 @@ class ControlAllRF(EnvExperiment):
NumberValue(0*dB, unit='dB', scale=dB, min=0*dB, max=31*dB), NumberValue(0*dB, unit='dB', scale=dB, min=0*dB, max=31*dB),
) )
RF_ch0 = UrukulCh(self, ch=0, freq=100.0, amp=1.0) RF_ch0 = UrukulCh(self, ch=0, freq=100.0, amp=1)
RF_ch1 = UrukulCh(self, ch=1, freq=100.0, amp=1.0) RF_ch1 = UrukulCh(self, ch=1, freq=208.0, amp=0.35)
RF_ch2 = UrukulCh(self, ch=2, freq=100.0, amp=1.0) RF_ch2 = UrukulCh(self, ch=2, freq=110.0, amp=0.3)
RF_ch3 = UrukulCh(self, ch=3, freq=50.0, amp=1.0) RF_ch3 = UrukulCh(self, ch=3, freq=50.0, amp=1.0)
self.RF_chs = [RF_ch0, RF_ch1, RF_ch2, RF_ch3] self.RF_chs = [RF_ch0, RF_ch1, RF_ch2, RF_ch3]
#self.RP = RedPitaya()
#self.set_dataset("Potencias", np.full(0., 10)) #self.set_dataset("Potencias", np.full(0., 10))
...@@ -34,17 +31,23 @@ class ControlAllRF(EnvExperiment): ...@@ -34,17 +31,23 @@ class ControlAllRF(EnvExperiment):
@kernel @kernel
def run(self): def run(self):
self.core.reset() self.core.reset()
delay(100*ms) delay(1000*ms)
# initialises CPLD all the selected channels # initialises CPLD all the selected channels
for rf_ch in self.RF_chs: for rf_ch in self.RF_chs:
rf_ch.initialize_channel() rf_ch.initialize_channel()
self.core.break_realtime()
delay(10*ms) delay(100*ms)
for rf_ch in self.RF_chs: for rf_ch in self.RF_chs:
rf_ch.set_channel() rf_ch.set_channel()
self.core.break_realtime()
for rf_ch in self.RF_chs:
rf_ch.channel.set_att(0.)
self.core.break_realtime()
#self.get_measurement(medN) #self.get_measurement(medN)
self.core.break_realtime() # self.core.break_realtime()
from artiq.experiment import * from artiq.experiment import *
from urukul_drivers import UrukulCh from pyLIAF.artiq.controllers import UrukulCh
import time
import numpy as np import numpy as np
# TODO: # TODO:
...@@ -61,7 +60,7 @@ class SingleLine(EnvExperiment): ...@@ -61,7 +60,7 @@ class SingleLine(EnvExperiment):
@rpc @rpc
def create_applets(self): def create_applets(self):
self.ccb.issue("create_applet", "cuentas", self.ccb.issue("create_applet", "cuentas",
"${artiq_applet}histogram " "${python} -m pyLIAF.artiq.applets.histogram "
"counts " "counts "
"--update-delay 0.2") "--update-delay 0.2")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment