Closed OdoctorG closed 6 months ago
This also seems to be true when using a stream and taking the next value of the generator provided by the stream:
worker = NanoVNAWorker(verbose=False)
worker.set_sweep(2.95e9,3.05e9,1,11)
datafile = False # Set this to a path if you want to play a previously recorded file.
stream = worker.stream_data(datafile)
while(True):
data = next(stream)
print(data[0])
will print the same data everytime. Here the fix is the same, you have to copy data.
As in the provided example, use for data in stream: print(data[0])
This works for streams.
Will look into single sweeps and while loop support in future, expect a patch in dist 0.0.7.
This seems to have been fixed in some distribution of pynanovna. Issue should be resolved by upgrading pynanovna to the latest version. Please run pip install pynanovna --upgrade If that does not resolve it, please run pip install pynanovna --force-reinstall
If you run singe_sweep() you get the same data everytime, example:
There is however a fix, you simply copy the data object everytime, eg.