Skip to content
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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

DCEM
Copy link

@DCEM DCEM commented Nov 27, 2024

No description provided.

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,
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Collaborator

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

Copy link
Collaborator

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(
Copy link
Collaborator

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

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants