-
Notifications
You must be signed in to change notification settings - Fork 320
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
Driver/keithley s46 #1409
Driver/keithley s46 #1409
Conversation
…t does not belong to you
Codecov Report
@@ Coverage Diff @@
## master #1409 +/- ##
=======================================
Coverage 74.13% 74.13%
=======================================
Files 85 85
Lines 9822 9822
=======================================
Hits 7282 7282
Misses 2540 2540 |
… driver/keithley_s46
Looks good, Rather than using your own caching i think you should consider using the caching build in to the parameter already via the get_latest function. If you look at the QDac driver https://github.com/QCoDeS/Qcodes/blob/master/qcodes/instrument_drivers/QDev/QDac_channels.py you can see that this has a similar function that returns the full status of all the channels. This is called in |
""" | ||
Please do not write ':OPEN ALL' to the instrument as this will | ||
circumvent the lock. | ||
""" |
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.
Is this slow compared to :OPEN ALL
? Is that an issue or perhaps it doesn't matter?
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.
Its probably slower, but I do not think it matters.
super().__init__(*args, **kwargs) | ||
|
||
def ask(self, cmd: str): | ||
self._ask_log.append(cmd) |
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.
You could probably do this with the existing logging in the instrument and pytests log capturing functions
…g. A1, B2, etc) 2) Use the caching functions of the parameters instead of rolling your own 3) Use the visa logger in the test to verify that ":CLOS ?" is called only once.
""" | ||
A four channel-per-relay instrument | ||
""" | ||
io_stream = StringIO() |
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.
I still think it's cleaner to use pytests log capturing rather than rolling our you own https://docs.pytest.org/en/latest/logging.html
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 good. You might want to consider overwriting the snapshot function too like the qdac does. Once the instrument is added to the qcodes station is will do the equivalent of a inst.snapshot(update=True)
which I think might still be slow?
…it and use caplog for this
… driver/keithley_s46
Merge: 1483359 86be1ff Author: sohail chatoor <[email protected]> Merge pull request #1409 from sohailc/driver/keithley_s64
Adds a driver for the S46 RF switch