Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import numpy as np
from artiq.experiment import *
class HistogramsIons(EnvExperiment):
"""
Plotear y guardar histogramas de iones y oscuridad
"""
def build(self):
self.setattr_device("ccb")
self.setattr_device("core")
self.pmt = self.get_device("ttl0")
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("Number_Measurements", NumberValue(300), "Histogram Params")
self.setattr_argument(f"t_readout",
NumberValue(100*ms, unit='ms', scale=ms, min=1*ms),
"Histogram Params")
@rpc
def create_datasets(self):
self.set_dataset("pmt_counts_on", np.zeros(self.Number_Measurements, dtype=int), broadcast=True, archive=False)
self.set_dataset("pmt_counts_off", np.zeros(self.Number_Measurements, dtype=int), broadcast=True, archive=False)
@rpc
def create_applets(self):
# self.ccb.issue("create_applet", "calibration_pmt_blinking",
# "${python} -m pyLIAF.artiq.applets.realtime "
# "200 "
# "pmt_counts_on "
# "--y2 pmt_counts_off")
pass
@kernel
def init_kernel(self):
self.core.reset()
self.pmt.input()
delay(1*s)
# print(1)
self.laserIR.initialize_channel()
# self.core.break_realtime()
# print(2)
self.laserUV.initialize_channel()
# self.core.break_realtime()
# print(3)
self.laserIR.set_channel()
self.laserUV.set_channel()
self.core.wait_until_mu(now_mu())