Compare commits
3 commits
7733e70b55
...
131a7dfc72
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
131a7dfc72 | ||
|
|
c3354fcb42 | ||
|
|
a972e74bee |
3 changed files with 20 additions and 8 deletions
|
|
@ -351,3 +351,10 @@ function BANANA(d,c, p) {
|
|||
p -= B0[d,c]
|
||||
return 1+p*p*(B2[d,c] + p*(B3[d,c] + p*B4[d,c]))
|
||||
}
|
||||
|
||||
function isPulser() {
|
||||
if (!/agilent pa/) return 0
|
||||
Pulser = $NF
|
||||
Time = $2
|
||||
return 1
|
||||
}
|
||||
|
|
|
|||
17
dorn.py
17
dorn.py
|
|
@ -490,7 +490,7 @@ fifos enable SA/EV/HK HI {(e>>7)&7:03b} {(e>>10)&7:03b} {(e>>6)&1}
|
|||
def read_event(sl=None, ev=None):
|
||||
if ev is None:
|
||||
fifo_read(sl=sl, ev=True)
|
||||
ev = ifc._read_fifo(2)
|
||||
ev = _ifc._read_fifo(2)
|
||||
if (ev[0] & 0xfffc) != 0x5718:
|
||||
raise ValueError(f"EV packet magic mismatch {ev[0]:04x}")
|
||||
Ba = ev[5]
|
||||
|
|
@ -530,7 +530,7 @@ def read_samples(sl=0, n=None, sa=None):
|
|||
if not (ff & (8 << (3*sl))):
|
||||
break;
|
||||
fifo_read(sl=sl, sa=True)
|
||||
sa.append(ifc._read_fifo(3))
|
||||
sa.append(_ifc._read_fifo(3))
|
||||
n -= 1
|
||||
for s in sa:
|
||||
if (s[0] & 0xfffc) != 0x5714:
|
||||
|
|
@ -563,22 +563,23 @@ class pulser_test(DataJob):
|
|||
self.filename = fn
|
||||
self.pu = make_pulser()
|
||||
super().__init__(amplitudes)
|
||||
self.connect(ifc)
|
||||
self.connect(_ifc)
|
||||
|
||||
def iniz(self):
|
||||
disable()
|
||||
if self.filename:
|
||||
disable()
|
||||
self.pu.cmd("OUTPUT ON")
|
||||
self.info("agilent pulser on")
|
||||
self.next_time(10)
|
||||
if self.filename:
|
||||
ifc._data.Open()
|
||||
_ifc._data.Open()
|
||||
enable()
|
||||
|
||||
def fini(self):
|
||||
self.pu.cmd("OUTPUT OFF")
|
||||
self.info("agilent pulser off")
|
||||
if self.filename:
|
||||
ifc._data.Open()
|
||||
_ifc._data.Open()
|
||||
disable()
|
||||
|
||||
def Start(self, fn=None):
|
||||
|
|
@ -588,12 +589,12 @@ class pulser_test(DataJob):
|
|||
|
||||
def func(self, a):
|
||||
if self.filename:
|
||||
ifc._data.Open()
|
||||
_ifc._data.Open()
|
||||
disable()
|
||||
pu.set_highlevel(a)
|
||||
self.info("agilent pa %.3f" % a)
|
||||
if self.filename:
|
||||
ifc._data.Open(self.filename % a)
|
||||
_ifc._data.Open(self.filename % a)
|
||||
enable()
|
||||
Status()
|
||||
|
||||
|
|
|
|||
|
|
@ -47,6 +47,10 @@ def aenable(sl=None, hk=True, ev=True, **aa):
|
|||
fifo_enable(sl=sl, hk=hk, ev=ev, **aa)
|
||||
enable()
|
||||
|
||||
def adisable():
|
||||
cmd("s/cron/none")
|
||||
disable()
|
||||
|
||||
if __name__=="__main__":
|
||||
ifc,_oo = armlib.init_irena(scope = globals(), name = "AHEPAM", prod = (0xee0c,),
|
||||
long_options=["seth", "ahbgo"])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue