Use new qcodes syntax for adding parameters
Description
Use the new syntax for adding parameters to an instrument. Excerpt from https://qcodes.github.io/Qcodes/examples/writing_drivers/Creating-Instrument-Drivers.html#What's-a-Parameter?
class Weinschel8320(VisaInstrument):
def __init__(self, name, address, **kwargs):
super().__init__(name, address, terminator="\r", **kwargs)
self.attenuation = Parameter(
"attenuation",
instrument=self,
)
To Do: This might also work with submodules, but the qcodes documentation on the subject is very thin. So this needs to be investigated.
Motivation
In contrast to the option of using add_parameter
, this works with static code checkers and auto completion. It is also much more readable.
You can also find us on Slack. For reference, the issues workflow is described in the contribution guidelines.