Merge branch 'tnmr' of https://gitea.psi.ch/linse/frappy into tnmr

This commit is contained in:
2025-07-21 17:10:53 +02:00
2 changed files with 12 additions and 1 deletions

View File

@@ -39,9 +39,14 @@ class ZVLNetAnalyzer():
self.instrument.write(":CALC:PAR:MEAS 'Trc1', 'S11'")
self.instrument.write('CALC:FORM MLOG')
self.instrument.write('INIT:CONT OFF')
self.instrument.write("SYST:USER:DISP:TITL 'Frappy connection'")
#self.instrument.write('INIT:SCOP OFF')
#self.instrument.write('DISPlay:WINDow2:STATe ON')
def load_calibration(self, f):
self.instrument.write(f":MMEMORY:STORE:CORR 1, 'OSM1 {f}'") # put calibration in pool
self.instrument.write(f":MMEMORY:LOAD:CORR 1, 'OSM1 {f}'") # load from pool
def set_freq_range(self, start, stop):
'''In Hz'''
self.instrument.write(f'SENS1:FREQ:STAR {start}')

View File

@@ -26,6 +26,7 @@ class ZVLNode(fc.Readable):
pollinterval = fc.Parameter(default=1)
central_freq = fc.Parameter('central_freq', fc.FloatRange(min=9_000, max=13_600_000_000, unit='Hz'), default=10_000_000, readonly=False)
freq_span = fc.Parameter('freq_span', fc.FloatRange(unit='Hz'), default=1_000_000, readonly=False)
calibration = fc.Parameter('calibration filename', fc.StringType(), default='None', readonly=False)
analyser_ip = fc.Parameter('analyser_ip', fc.StringType())
@@ -43,7 +44,12 @@ class ZVLNode(fc.Readable):
self.NA.set_freq_span(self.central_freq, self.freq_span)
self.value = self.NA.get_data()[1]
self.status = ('IDLE', 'idle')
def write_calibration(self, f):
self.calibration = f
self.NA.load_calibration(self.calibration)
return self.read_calibration()
def write_central_freq(self, f):
self.central_freq = (f)
self.acq()