-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6089 from jenshnielsen/refactor_agilent
Refactor Agilent drivers
- Loading branch information
Showing
9 changed files
with
158 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
The Agilent drivers shipping with QCoDeS have been updated to ensure all Parameters are set as static | ||
attributes that are documented and can be type checked. The docs for the Agilent drivers have been | ||
updated to not document inherited members. This makes the documentation significantly more readable | ||
as it focuses on specific members for a given instrument. The documentation now also links superclasses. | ||
Please consult these for inherited members. It is the plan to make the same change to all drivers shipping | ||
with QCoDeS in the near future. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ Agilent Drivers | |
|
||
.. automodule:: qcodes.instrument_drivers.agilent | ||
:autosummary: | ||
:no-inherited-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,34 @@ | ||
from ._Agilent_344xxA import _Agilent344xxA | ||
from typing import TYPE_CHECKING | ||
|
||
from qcodes.instrument import VisaInstrumentKWArgs | ||
from qcodes.validators import Strings | ||
|
||
class Agilent34401A(_Agilent344xxA): | ||
from ._Agilent_344xxA import Agilent344xxA | ||
|
||
if TYPE_CHECKING: | ||
from typing_extensions import Unpack | ||
|
||
from qcodes.instrument import VisaInstrumentKWArgs | ||
from qcodes.parameters import Parameter | ||
|
||
|
||
class Agilent34401A(Agilent344xxA): | ||
""" | ||
This is the QCoDeS driver for the Agilent 34401A DMM. | ||
""" | ||
|
||
pass | ||
def __init__( | ||
self, | ||
name: str, | ||
address: str, | ||
**kwargs: "Unpack[VisaInstrumentKWArgs]", | ||
) -> None: | ||
super().__init__(name, address, **kwargs) | ||
|
||
self.display_text: Parameter = self.add_parameter( | ||
"display_text", | ||
get_cmd="DISP:TEXT?", | ||
set_cmd='DISP:TEXT "{}"', | ||
vals=Strings(), | ||
) | ||
"""Parameter display_text""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,42 @@ | ||
from ._Agilent_344xxA import _Agilent344xxA | ||
from typing import TYPE_CHECKING | ||
|
||
from qcodes.instrument import VisaInstrumentKWArgs | ||
from qcodes.validators import Strings | ||
|
||
class Agilent34410A(_Agilent344xxA): | ||
from ._Agilent_344xxA import Agilent344xxA | ||
|
||
if TYPE_CHECKING: | ||
from typing_extensions import Unpack | ||
|
||
from qcodes.instrument import VisaInstrumentKWArgs | ||
from qcodes.parameters import Parameter | ||
|
||
|
||
class Agilent34410A(Agilent344xxA): | ||
""" | ||
This is the QCoDeS driver for the Agilent 34410A DMM. | ||
""" | ||
|
||
pass | ||
def __init__( | ||
self, | ||
name: str, | ||
address: str, | ||
**kwargs: "Unpack[VisaInstrumentKWArgs]", | ||
) -> None: | ||
super().__init__(name, address, **kwargs) | ||
|
||
self.display_text: Parameter = self.add_parameter( | ||
"display_text", | ||
get_cmd="DISP:WIND1:TEXT?", | ||
set_cmd='DISP:WIND1:TEXT "{}"', | ||
vals=Strings(), | ||
) | ||
"""Parameter display_text""" | ||
|
||
self.display_text_2: Parameter = self.add_parameter( | ||
"display_text_2", | ||
get_cmd="DISP:WIND2:TEXT?", | ||
set_cmd='DISP:WIND2:TEXT "{}"', | ||
vals=Strings(), | ||
) | ||
"""Parameter display_text_2""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,42 @@ | ||
from ._Agilent_344xxA import _Agilent344xxA | ||
from typing import TYPE_CHECKING | ||
|
||
from qcodes.instrument import VisaInstrumentKWArgs | ||
from qcodes.validators import Strings | ||
|
||
class Agilent34411A(_Agilent344xxA): | ||
from ._Agilent_344xxA import Agilent344xxA | ||
|
||
if TYPE_CHECKING: | ||
from typing_extensions import Unpack | ||
|
||
from qcodes.instrument import VisaInstrumentKWArgs | ||
from qcodes.parameters import Parameter | ||
|
||
|
||
class Agilent34411A(Agilent344xxA): | ||
""" | ||
This is the QCoDeS driver for the Agilent 34411A DMM. | ||
""" | ||
|
||
pass | ||
def __init__( | ||
self, | ||
name: str, | ||
address: str, | ||
**kwargs: "Unpack[VisaInstrumentKWArgs]", | ||
) -> None: | ||
super().__init__(name, address, **kwargs) | ||
|
||
self.display_text: Parameter = self.add_parameter( | ||
"display_text", | ||
get_cmd="DISP:WIND1:TEXT?", | ||
set_cmd='DISP:WIND1:TEXT "{}"', | ||
vals=Strings(), | ||
) | ||
"""Parameter display_text""" | ||
|
||
self.display_text_2: Parameter = self.add_parameter( | ||
"display_text_2", | ||
get_cmd="DISP:WIND2:TEXT?", | ||
set_cmd='DISP:WIND2:TEXT "{}"', | ||
vals=Strings(), | ||
) | ||
"""Parameter display_text_2""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.