Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ genapi:
../qcodes/instrument_drivers/AimTTi \
../qcodes/instrument_drivers/keysight \
../qcodes/instrument_drivers/QuantumDesign/DynaCoolPPMS/private/* \
../qcodes/instrument_drivers/stanford_research/*
../qcodes/instrument_drivers/stanford_research/* \
../qcodes/instrument_drivers/weinschel/*
mkdir -p api/generated/
cp _auto/qcodes.instrument_drivers.* api/generated/

Expand Down
7 changes: 7 additions & 0 deletions docs/drivers_api/Weinschel.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _weinschel_api :

Weinschel Drivers
=================

.. automodule:: qcodes.instrument_drivers.weinschel
:autosummary:
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@
"\n",
"# instantiating and using this instrument (commented out because I can't actually do it!)\n",
"#\n",
"# from qcodes.instrument_drivers.weinschel.Weinschel_8320 import Weinschel_8320\n",
"# weinschel = Weinschel_8320('w8320_1', 'TCPIP0::172.20.2.212::inst0::INSTR')\n",
"# from qcodes.instrument_drivers.weinschel.Weinschel_8320 import Weinschel8320\n",
"# weinschel = Weinschel8320('w8320_1', 'TCPIP0::172.20.2.212::inst0::INSTR')\n",
"# weinschel.attenuation(40)"
]
},
Expand Down Expand Up @@ -792,7 +792,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.13"
"version": "3.8.12"
},
"toc": {
"base_numbering": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example: Weinschel_8320\n",
"## Example: Weinschel8320\n",
"\n",
"The Weinschel 8320 is a very simple driver."
]
Expand All @@ -55,7 +55,7 @@
"import numpy as np\n",
"\n",
"\n",
"class Weinschel_8320(VisaInstrument):\n",
"class Weinschel8320(VisaInstrument):\n",
" \"\"\"\n",
" QCoDeS driver for the stepped attenuator\n",
" Weinschel is formerly known as Aeroflex/Weinschel\n",
Expand Down Expand Up @@ -140,7 +140,7 @@
"# path to the .yaml file containing the simulated instrument\n",
"visalib = sims.__file__.replace('__init__.py', 'Weinschel_8320.yaml@sim')\n",
"\n",
"wein_sim = Weinschel_8320('wein_sim',\n",
"wein_sim = Weinschel8320('wein_sim',\n",
" address='GPIB::1::INSTR', # This matches the address in the .yaml file\n",
" visalib=visalib\n",
" )"
Expand All @@ -167,7 +167,7 @@
"outputs": [],
"source": [
"import pytest\n",
"from qcodes.instrument_drivers.weinschel.Weinschel_8320 import Weinschel_8320\n",
"from qcodes.instrument_drivers.weinschel.Weinschel_8320 import Weinschel8320\n",
"import qcodes.instrument.sims as sims\n",
"visalib = sims.__file__.replace('__init__.py', 'Weinschel_8320.yaml@sim')\n",
"\n",
Expand All @@ -176,7 +176,7 @@
"# available to all the functions in this module\n",
"@pytest.fixture(scope='function')\n",
"def driver():\n",
" wein_sim = Weinschel_8320('wein_sim',\n",
" wein_sim = Weinschel8320('wein_sim',\n",
" address='GPIB::1::65535::INSTR', \n",
" visalib=visalib\n",
" )\n",
Expand Down Expand Up @@ -311,7 +311,7 @@
"# available to all the functions in this module\n",
"@pytest.fixture(scope='function')\n",
"def driver():\n",
" wein_sim = Weinschel_8320('wein_sim',\n",
" wein_sim = Weinschel8320('wein_sim',\n",
" address='GPIB::1::INSTR', \n",
" visalib=visalib\n",
" )\n",
Expand Down Expand Up @@ -385,7 +385,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.0"
"version": "3.8.12"
},
"nbsphinx": {
"execute": "never"
Expand Down
3 changes: 2 additions & 1 deletion docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ sphinx-apidoc -o _auto -d 10 ..\qcodes ^
..\qcodes\instrument_drivers\AimTTi ^
..\qcodes\instrument_drivers\QuantumDesign\DynaCoolPPMS\private\*
..\qcodes\instrument_drivers\QuantumDesign\DynaCoolPPMS\private\* ^
..\qcodes\instrument_drivers\stanford_research\*
..\qcodes\instrument_drivers\stanford_research\* ^
..\qcodes\instrument_drivers\weinschel\*
mkdir api\generated\
copy _auto\qcodes.instrument_drivers.* api\generated\

Expand Down
11 changes: 9 additions & 2 deletions qcodes/instrument_drivers/weinschel/Weinschel_8320.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
from qcodes.parameters import Parameter


class Weinschel_8320(VisaInstrument):
class Weinschel8320(VisaInstrument):
"""
QCodes driver for the stepped attenuator
QCodes driver for the Weinschel 8320 stepped attenuator.

Weinschel is formerly known as Aeroflex/Weinschel
"""

Expand All @@ -27,3 +28,9 @@ def __init__(self, name: str, address: str, **kwargs: Any):
"""Control the attenuation"""

self.connect_message()


class Weinschel_8320(Weinschel8320):
"""
Alias for Weinschel8320 will eventually be deprecated and removed.
"""
3 changes: 3 additions & 0 deletions qcodes/instrument_drivers/weinschel/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .Weinschel_8320 import Weinschel8320

__all__ = ["Weinschel8320"]
11 changes: 6 additions & 5 deletions qcodes/tests/drivers/test_weinchel.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
from qcodes.instrument_drivers.test import DriverTestCase
from qcodes.instrument_drivers.weinschel.Weinschel_8320 import Weinschel_8320
from qcodes.instrument_drivers.weinschel import Weinschel8320


class TestWeinschel_8320(DriverTestCase):
'''
class TestWeinschel8320(DriverTestCase):
"""
This is a test suite for testing the weinschel/aeroflex stepped attenuator.
It is designed to provide a test function for each function as well as for
general things such as testing if the com s are working.
'''
driver = Weinschel_8320
"""

driver = Weinschel8320

def test_firmware_version(self):
v = self.instrument.IDN.get()
Expand Down