Added functionality for the TNMR module to write partial scans - useful for long experiments with many acquisitions, which might need to be terminated early. Also good for impatient people. Added functionality to the ZVL Network Analyser module to allow for use of inbuilt data correction (calibration).

This commit is contained in:
2025-07-29 14:31:24 +02:00
parent d5d9d70713
commit e77c48ace0
4 changed files with 122 additions and 26 deletions

View File

@@ -0,0 +1,50 @@
from ZVLDriver import *
import matplotlib.pyplot as plt
# example code. profiles the per-point delay for reading data and
ip = '129.129.156.201'
ip = '169.254.83.53'
import matplotlib.pyplot as plt
print('start')
z = ZVLNetAnalyzer()
z.reset()
#mm, mmi, fr, frq = z.find_peak(50_000_000, 350_000_000, 20_000_000)
#plt.plot(frq, fr)
#plt.axvline(frq[mmi])
#plt.axhline(mm)
#plt.show()
#z.reset()
##z.set_freq_range(1_000_000, 2_000_000.5)
##z.set_freq_span(1_000_000, 10_000)
z.set_freq_range(25_750_000, 75_250_000)
plt.scatter(*(z.get_data()))
z.reload_calibration()
#z.set_freq_span(220_000_000, 50_000_000)
plt.scatter(*(z.get_data()))
plt.show()
#Ns = np.linspace(3, 1000, 100).astype(int)
#ts = []
#for N in Ns:
# st = time.time()
# freqs, data = z.get_data(N)
# et = time.time()
# dt = (et-st)
# print(f'got data, {dt/N} ({dt})')
# ts += [dt]
#
#plt.scatter(Ns, ts)
#plt.show()
#plt.scatter(Ns, np.array(ts)/np.array(Ns))
#plt.show()
#input()
#plt.plot(*z.get_data(averaging_passes=1), alpha=0.3)
#plt.plot(*z.get_data(averaging_passes=64), alpha=0.3)
#plt.show()
input()