50 lines
1.1 KiB
Python
50 lines
1.1 KiB
Python
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() |