-
Notifications
You must be signed in to change notification settings - Fork 344
Refactor Keithley 2600 driver to use ParameterWithSetpoints for fast sweep
#7851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Refactor Keithley 2600 driver to use ParameterWithSetpoints for fast sweep
#7851
Conversation
…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.87% 60.02% +0.14%
==========================================
Files 352 352
Lines 31872 31879 +7
==========================================
+ Hits 19083 19134 +51
+ Misses 12789 12745 -44 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…s://github.com/trlemon/Qcodes into trlemon/refactor-keithley2600-driver-fastsweep
astafan8
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks promising!
| log.debug(f"Reset channel {self.channel}. Updating settings...") | ||
| self.snapshot(update=True) | ||
|
|
||
| def doFastSweep(self, start: float, stop: float, steps: int, mode: str) -> DataSet: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is important to mention this breaking change in the changelog
| """Holds array of setpoints for doing a fastsweep. Can | ||
| be of units V or I depending on `Keithley2600Channel.fastsweep_mode`""" | ||
|
|
||
| self.fastsweep: LuaSweepParameter = self.add_parameter( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you update the example notebook for this driver to mention this new parameter and how to use it (no need to repeat the general artcile on how to use parameters with setpoints but good to mention specifics for this driver there) ?
| f"for index = 1, {steps} do", | ||
| " target = startX + (index-1)*dX", | ||
| f" {channel}.source.level{source} = target", | ||
| f" {channel}.measure.{meas}({channel}.nvbuffer1)", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
depending on the use cases for the measurements, perhaps it's useful to add a possibility of a delay between setting a target value and measuring a value? and add a parameter for it e.g. fastsweep_inter_delay, and if it's 0 then a line of lua code to sleep for that time does not even get added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there's a builtin .interval or something that we can expose as a qcodes parameter and then use in this lua script
WIP
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