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:
f = (fmin + fmax)/2
pulser.cmd(f"FREQ {f:.1f}")
tek.cmd("ACQ:NUMAVG 1")
tek.cmd("ACQ:NUMAVG 512")
t = time.time() + t_settle
phi = tek.cmd(f":MEASU:MEAS{i_phi}:VAL?")[1]

View file

@ -13,6 +13,8 @@ arena._connect(ifc)
if ifc.is_a("USB"):
findarena()
lasc.lasc_init(ifc)
def enable(what="usb/f3/hk"):
Cmd("altera/fifo/set 8")
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):
if not lasc:
lasc = (LAread(),)
LASCplot(*lasc, what=LAch)
lasc = (lasc.LAread(),)
lasc.LASCplot(*lasc, what=LAch)
LAdata=None
def taLAsingle(trig="RD"):
if trig[0]=='~' or trig[0]=='!':
LASCsingle(trig[1:], edge=False)
lasc.LASCsingle(trig[1:], edge=False)
else:
LASCsingle(trig)
lasc.LASCsingle(trig)
def taLAread():
global LAdata
LAdata = LAread()
LAdata = lasc.LAread()
return LAdata
def taLAplot(d=None, what=LAch):
if not d:
d = LAdata
LASCplot(d, None, what=what)
lasc.LASCplot(d, None, what=what)
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 out "%s"
""" % fn)