-
Notifications
You must be signed in to change notification settings - Fork 321
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
Alazar: refactor AcquisitionInterface
out of AcquisitionController
#1694
Alazar: refactor AcquisitionInterface
out of AcquisitionController
#1694
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1694 +/- ##
==========================================
+ Coverage 67.23% 67.25% +0.02%
==========================================
Files 145 145
Lines 17939 17949 +10
==========================================
+ Hits 12061 12072 +11
+ Misses 5878 5877 -1 |
super().__init__(name, **kwargs) | ||
self._alazar = self.find_instrument(alazar_name, | ||
instrument_class=AlazarTech_ATS) | ||
def __init__(self, *args, **kwargs): |
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.
this is not needed, right?
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 think it might be, when using the interface as a mixin.
@@ -889,38 +889,23 @@ class AcquisitionController(Instrument): | |||
_alazar: a reference to the alazar instrument driver |
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.
should be removed as the interface doesn't have this attribute
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.
One should not document private attributes anyway
The Alazar
AcquistionController
is an interface for the alazar ats instrument, that takes care of handling the buffer data. In the current implementation this interface is a qcodes instrument.In my opinion this is an unnecessary coupling between pure number crunching code and qcodes instruments. I therefore suggest to refactor an
AcquisitionInterface
out of theAcquisitionController
, which only contains the interface methods.By letting the
AcquistionController
inherit fromAcquistionInterface
andInstrument
the original functionality should stay untouched.Additionally I removed the
NotImplementedError
s from some of the methods, which don't need to be implemented.