DiCarloLab-Delft / PycQED_py3

Python3 version of PycQED using QCoDeS as backend
MIT License
67 stars 41 forks source link

Log file creation for debugging purposes and alternative data acquisition mode #631

Closed nielshaandbaek closed 3 years ago

nielshaandbaek commented 4 years ago

This pull request adds two features to the ZI drivers.

First, a new argument is introduced when creating the driver called logfile. If this argument is set (default is not to set it) then a text logfile will be generated where all commands sent to the device are logged. The file format is such that it can be executed in a Python notebook where the original objects are available. The goal is to assist with debugging.

Second a new acquisition mode is added which aims to resolve Git issue #146. The acquisition functions now take a new argument poll with a default value of True. With the default value the functionality is unchanged. If the parameter is set to False then the function will instead of polling for data wait for the AWG to finish and then manually read out the data. Note that the functions called by acquisition can also be used individually as it is done in the detector functions. By not subscribing to data and instead simply waiting until the AWG is done we avoid the warnings with the data server dropping data values.

Fixes https://github.com/DiCarloLab-Delft/QuSurf-IssueTracker/issues/146.

@antsr

Tests are not mandatory as this is generally hard to make for instruments that interact with hardware.