Compare commits

..

2 commits

Author SHA1 Message Date
Stephan I. Böttcher
36c011d26e tarena: fix lasc 2025-10-20 09:34:32 +02:00
Stephan I. Böttcher
cfa4107659 cvphase: reset numavg to restart averaging 2025-10-20 09:33:51 +02:00
2 changed files with 10 additions and 7 deletions

View file

@ -46,6 +46,7 @@ tek.verbosity = verbosity
while fmin + fres < fmax: while fmin + fres < fmax:
f = (fmin + fmax)/2 f = (fmin + fmax)/2
pulser.cmd(f"FREQ {f:.1f}") pulser.cmd(f"FREQ {f:.1f}")
tek.cmd("ACQ:NUMAVG 1")
tek.cmd("ACQ:NUMAVG 512") tek.cmd("ACQ:NUMAVG 512")
t = time.time() + t_settle t = time.time() + t_settle
phi = tek.cmd(f":MEASU:MEAS{i_phi}:VAL?")[1] phi = tek.cmd(f":MEASU:MEAS{i_phi}:VAL?")[1]

View file

@ -13,6 +13,8 @@ arena._connect(ifc)
if ifc.is_a("USB"): if ifc.is_a("USB"):
findarena() findarena()
lasc.lasc_init(ifc)
def enable(what="usb/f3/hk"): def enable(what="usb/f3/hk"):
Cmd("altera/fifo/set 8") Cmd("altera/fifo/set 8")
Cmd("altera/fifo/reset 0x080") Cmd("altera/fifo/reset 0x080")
@ -128,29 +130,29 @@ lasc.LA.update({a: 1<<i for i,a in enumerate(LAch)})
def IPLOT(lasc=None): def IPLOT(lasc=None):
if not lasc: if not lasc:
lasc = (LAread(),) lasc = (lasc.LAread(),)
LASCplot(*lasc, what=LAch) lasc.LASCplot(*lasc, what=LAch)
LAdata=None LAdata=None
def taLAsingle(trig="RD"): def taLAsingle(trig="RD"):
if trig[0]=='~' or trig[0]=='!': if trig[0]=='~' or trig[0]=='!':
LASCsingle(trig[1:], edge=False) lasc.LASCsingle(trig[1:], edge=False)
else: else:
LASCsingle(trig) lasc.LASCsingle(trig)
def taLAread(): def taLAread():
global LAdata global LAdata
LAdata = LAread() LAdata = lasc.LAread()
return LAdata return LAdata
def taLAplot(d=None, what=LAch): def taLAplot(d=None, what=LAch):
if not d: if not d:
d = LAdata d = LAdata
LASCplot(d, None, what=what) lasc.LASCplot(d, None, what=what)
def taLAprint(fn="la.ps", what=LAch): def taLAprint(fn="la.ps", what=LAch):
LASCplot(LAdata, None, what=what, term=""" lasc.LASCplot(LAdata, None, what=what, term="""
set term post enhanced solid color set term post enhanced solid color
set out "%s" set out "%s"
""" % fn) """ % fn)