Refactor Keithley 2600 driver to use ParameterWithSetpoints for fast sweep#7851
Refactor Keithley 2600 driver to use ParameterWithSetpoints for fast sweep#7851trlemon wants to merge 35 commits intomicrosoft:mainfrom
ParameterWithSetpoints for fast sweep#7851Conversation
…s://github.com/trlemon/Qcodes into trlemon/refactor-keithley2600-driver-fastsweep
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #7851 +/- ##
==========================================
+ Coverage 59.94% 60.80% +0.85%
==========================================
Files 352 333 -19
Lines 31933 32368 +435
==========================================
+ Hits 19143 19680 +537
+ Misses 12790 12688 -102 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…s://github.com/trlemon/Qcodes into trlemon/refactor-keithley2600-driver-fastsweep
…s://github.com/trlemon/Qcodes into trlemon/refactor-keithley2600-driver-fastsweep
astafan8
left a comment
There was a problem hiding this comment.
is it ready for the final review, can it exit the draft mode? :)
| return np.linspace(self.outer_start, self.outer_stop, self.outer_npts) | ||
|
|
||
|
|
||
| def _make_setpoint_parameter( |
There was a problem hiding this comment.
I replaced the "built-in" setpoint parameters with a setpoint parameter factory function to avoid a bug where parameters are not successfully registered to datasets when using e.g., do0d with repeated calls to setup_fastsweep and fastsweep in the same experiment. The issue with having a single instance of the inner/outer setpoint parameters directly on the instrument class is that ParamSpec is never updated when setup_fastsweep is called with new parameter information as e.g., LinSweep objects. Instead of manually cleaning the ParamSpec data on every call to setup_fastsweep, I thought it would be cleaner to create new parameters each time so that we aren't "silently" manipulating the state of any persistent parameters on the instrument itself. This also simplifies the code a bit.
Could I get some feedback on this approach @jenshnielsen and/or @astafan8?
Background
The
doFastSweepmethod relies on "old" technology fromqcodes_loop, and it also returns a Qcodes dataset which may not be desirable for all applications. Instead, it would be better to useParameterWithSetpointsand return a numpy array.Summary of Changes
qcodes_loop