-
Notifications
You must be signed in to change notification settings - Fork 86
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
Add HP 4194A and 4395A Instruments #387
base: main
Are you sure you want to change the base?
Conversation
from qcodes.instrument import ParameterWithSetpoints, VisaInstrument | ||
from qcodes.instrument.parameter import Parameter # , invert_val_mapping | ||
from qcodes.utils.helpers import create_on_off_val_mapping | ||
from qcodes.utils.validators import Enum, Ints, Numbers, Arrays # , Lists, |
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.
Similar to your other pr could you update these prs to fiit the official definitions from qcodes
|
||
from private.bit_name_mapper import BitNameMapper | ||
from private.interdependent_parameter import interdependent_parameter_factory | ||
from private.reset_value_parameter import reset_value_parameter_factory |
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 will not work in an installed package. It should either be a relative path starting with .
or the full absolute path
qcodes_contrib_drivers.HP.private....
I think I would prefer the later
# terminator: str = None, | ||
timeout: int = 10, | ||
# timeout: int = 100000, | ||
**kwargs: Any |
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 recommend using VisaInstrumentKWArgs as a type here. See examples in qcodes visa drivers.
https://microsoft.github.io/Qcodes/api/instrument/index.html#qcodes.instrument.VisaInstrumentKWArgs
|
||
from private.bit_name_mapper import BitNameMapper | ||
from private.interdependent_parameter import interdependent_parameter_factory | ||
|
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.
Similar changes as above
6: 'RQS', | ||
}) | ||
|
||
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.
If you assign the return value of these to an attribute you will get a driver where the parameters are known statically and can be prechecked and autocompleted in an ide.
You might want to consider running qcodes-refactor tool to do this automatically https://microsoft.github.io/Qcodes/examples/writing_drivers/Creating-Instrument-Drivers.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.
Paused on working on this,
i plan to continiue depending on which direction Qcodes PR 6731 is going.
No description provided.