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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ repos:
- id: check-yaml
- id: debug-statements
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 25.12.0
rev: 26.1.0
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
Expand Down
1 change: 0 additions & 1 deletion doc/examples/ex_qubitekkcc_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import instruments as ik
import instruments.units as u


if __name__ == "__main__":
# open connection to coincidence counter. If you are using Windows, this will be a com port. On linux, it will show
# up in /dev/ttyusb
Expand Down
1 change: 0 additions & 1 deletion doc/examples/qubitekk/ex_qubitekk_mc1.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from instruments.qubitekk import MC1
import instruments.units as u


if __name__ == "__main__":
mc1 = MC1.open_serial(vid=1027, pid=24577, baud=9600, timeout=1)
mc1.step_size = 25 * u.ms
Expand Down
1 change: 0 additions & 1 deletion src/instruments/abstract_instruments/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Module containing instrument abstract base classes and communication layers
"""


from .instrument import Instrument
from .electrometer import Electrometer
from .function_generator import FunctionGenerator
Expand Down
1 change: 0 additions & 1 deletion src/instruments/abstract_instruments/comm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Module containing communication layers
"""


from .abstract_comm import AbstractCommunicator

from .file_communicator import FileCommunicator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from instruments.abstract_instruments.comm import SerialCommunicator


# GLOBALS #####################################################################

# We want to only *weakly* hold references to serial ports, to allow for them
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Module containing signal generator abstract base classes
"""


from .signal_generator import SignalGenerator
from .single_channel_sg import SingleChannelSG
from .channel import SGChannel
1 change: 0 additions & 1 deletion src/instruments/agilent/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
Module containing Agilent instruments
"""


from instruments.agilent.agilent33220a import Agilent33220a
from instruments.agilent.agilent34410a import Agilent34410a
1 change: 0 additions & 1 deletion src/instruments/agilent/agilent33220a.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
assume_units,
)


# CLASSES #####################################################################


Expand Down
1 change: 0 additions & 1 deletion src/instruments/aimtti/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Module containing Aim-TTi power supplies
"""


from .aimttiel302p import AimTTiEL302P
1 change: 0 additions & 1 deletion src/instruments/fluke/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Module containing Fluke instruments
"""


from .fluke3000 import Fluke3000
1 change: 0 additions & 1 deletion src/instruments/generic_scpi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Module containing generic SCPI instruments
"""


from .scpi_instrument import SCPIInstrument
from .scpi_multimeter import SCPIMultimeter
from .scpi_function_generator import SCPIFunctionGenerator
1 change: 0 additions & 1 deletion src/instruments/glassman/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Module containing Glassman power supplies
"""


from .glassmanfr import GlassmanFR
3 changes: 2 additions & 1 deletion src/instruments/glassman/glassmanfr.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
An unrestricted license has been provided to the maintainers of the Instrument
Kit project.
"""

# IMPORTS #####################################################################

from struct import unpack
Expand Down Expand Up @@ -385,7 +386,7 @@ def _parse_response(self, response):

:rtype: `dict`
"""
(voltage, current, monitors) = unpack("@3s3s3x1c2x", bytes(response, "utf-8"))
voltage, current, monitors = unpack("@3s3s3x1c2x", bytes(response, "utf-8"))

try:
voltage = self._parse_voltage(voltage)
Expand Down
1 change: 0 additions & 1 deletion src/instruments/hcp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
Module containing HC Photonics instruments
"""


from .tc038 import TC038
from .tc038d import TC038D
1 change: 0 additions & 1 deletion src/instruments/hcp/tc038.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Provides support for the TC038 AC crystal oven by HC Photonics.
"""


# IMPORTS #####################################################################


Expand Down
2 changes: 0 additions & 2 deletions src/instruments/hcp/tc038d.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Provides support for the TC038 AC crystal oven by HC Photonics.
"""


# IMPORTS #####################################################################


Expand All @@ -12,7 +11,6 @@
from instruments.abstract_instruments.instrument import Instrument
from instruments.util_fns import assume_units


# CLASSES #####################################################################


Expand Down
1 change: 0 additions & 1 deletion src/instruments/holzworth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Module containing Holzworth instruments
"""


from .holzworth_hs9000 import HS9000
1 change: 0 additions & 1 deletion src/instruments/hp/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Module containing HP instruments
"""


from .hp3325a import HP3325a
from .hp3456a import HP3456a
from .hp6624a import HP6624a
Expand Down
1 change: 0 additions & 1 deletion src/instruments/hp/hp3325a.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
from instruments.units import ureg as u
from instruments.util_fns import enum_property, unitful_property, bool_property


# CLASSES #####################################################################


Expand Down
1 change: 0 additions & 1 deletion src/instruments/hp/hp6652a.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from instruments.abstract_instruments import PowerSupply
from instruments.util_fns import unitful_property, bool_property


# CLASSES #####################################################################


Expand Down
1 change: 0 additions & 1 deletion src/instruments/keithley/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Module containing Keithley instruments
"""


from .keithley195 import Keithley195
from .keithley485 import Keithley485
from .keithley580 import Keithley580
Expand Down
2 changes: 1 addition & 1 deletion src/instruments/keithley/keithley485.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def _parse_measurement(self, measurement):

:rtype: `~pint.Quantity`
"""
(status, function, base, current) = unpack(
status, function, base, current = unpack(
"@1c2s1c10s", bytes(measurement, "utf-8")
)

Expand Down
2 changes: 1 addition & 1 deletion src/instruments/keithley/keithley580.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def parse_measurement(measurement):

:rtype: `dict`
"""
(status, polarity, drycircuit, drive, resistance) = struct.unpack(
status, polarity, drycircuit, drive, resistance = struct.unpack(
"@4c11s", measurement
)

Expand Down
1 change: 0 additions & 1 deletion src/instruments/lakeshore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Module containing Lakeshore instruments
"""


from instruments.lakeshore.lakeshore336 import Lakeshore336
from instruments.lakeshore.lakeshore340 import Lakeshore340
from instruments.lakeshore.lakeshore370 import Lakeshore370
Expand Down
1 change: 1 addition & 0 deletions src/instruments/minghe/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
"""
Module containing MingHe instruments
"""

from .mhs5200a import MHS5200
1 change: 0 additions & 1 deletion src/instruments/newport/newportesp301.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from instruments.units import ureg as u
from instruments.util_fns import assume_units, ProxyList


# CLASSES #####################################################################


Expand Down
1 change: 1 addition & 0 deletions src/instruments/ondax/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
"""
Module containing Ondax Instruments
"""

from .lm import LM
1 change: 0 additions & 1 deletion src/instruments/oxford/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Module containing Oxford instruments
"""


from .oxforditc503 import OxfordITC503
1 change: 0 additions & 1 deletion src/instruments/pfeiffer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Module containing Pfeiffer instruments
"""


from .tpg36x import TPG36x
1 change: 0 additions & 1 deletion src/instruments/phasematrix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Module containing Phase Matrix instruments
"""


from .phasematrix_fsw0020 import PhaseMatrixFSW0020
1 change: 0 additions & 1 deletion src/instruments/picowatt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Module containing Picowatt instruments
"""


from .picowattavs47 import PicowattAVS47
1 change: 0 additions & 1 deletion src/instruments/qubitekk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
Module containing Qubitekk instruments
"""


from .cc1 import CC1
from .mc1 import MC1
1 change: 0 additions & 1 deletion src/instruments/rigol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Module containing Rigol instruments
"""


from .rigolds1000 import RigolDS1000Series
1 change: 0 additions & 1 deletion src/instruments/srs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Module containing Lakeshore instruments
"""


from .srs345 import SRS345
from .srs830 import SRS830
from .srsdg645 import SRSDG645
Expand Down
1 change: 0 additions & 1 deletion src/instruments/sunpower/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Module containing Sunpower instruments
"""


from .cryotel_gt import CryoTelGT
1 change: 0 additions & 1 deletion src/instruments/tektronix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Module containing Tektronix instruments
"""


from .tekdpo4104 import TekDPO4104
from .tekdpo70000 import TekDPO70000
from .tekawg2000 import TekAWG2000
Expand Down
1 change: 0 additions & 1 deletion src/instruments/tektronix/tektds224.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from instruments.util_fns import ProxyList
from instruments.units import ureg as u


# CLASSES #####################################################################


Expand Down
1 change: 0 additions & 1 deletion src/instruments/teledyne/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Module containing Teledyne instruments
"""


from .maui import MAUI
1 change: 0 additions & 1 deletion src/instruments/thorlabs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
Module containing Thorlabs instruments
"""


from .thorlabsapt import (
ThorLabsAPT,
APTPiezoInertiaActuator,
Expand Down
1 change: 0 additions & 1 deletion src/instruments/toptica/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@
Module containing Toptica instruments
"""


from .topmode import TopMode
1 change: 0 additions & 1 deletion src/instruments/yokogawa/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
Module containing Yokogawa instruments
"""


from .yokogawa6370 import Yokogawa6370
from .yokogawa7651 import Yokogawa7651
1 change: 0 additions & 1 deletion src/instruments/yokogawa/yokogawa6370.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
string_property,
)


# CLASSES #####################################################################


Expand Down
8 changes: 2 additions & 6 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,13 @@ def expected_protocol(ins_class, host_to_ins, ins_to_host, sep="\n", repeat=1):

yield ins_class.open_test(stdin, stdout)

assert (
stdout.getvalue() == host_to_ins
), """Expected:
assert stdout.getvalue() == host_to_ins, """Expected:

{}

Got:

{}""".format(
repr(host_to_ins), repr(stdout.getvalue())
)
{}""".format(repr(host_to_ins), repr(stdout.getvalue()))

# current = stdin.tell()
# stdin.seek(0, 2)
Expand Down
1 change: 0 additions & 1 deletion tests/test_abstract_inst/test_electrometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import instruments as ik
from tests import expected_protocol


# TESTS ######################################################################


Expand Down
1 change: 0 additions & 1 deletion tests/test_abstract_inst/test_function_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import instruments as ik
from tests import expected_protocol, unit_eq


# TESTS ######################################################################

# pylint: disable=missing-function-docstring,redefined-outer-name,protected-access
Expand Down
1 change: 0 additions & 1 deletion tests/test_abstract_inst/test_multimeter.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import instruments as ik
from tests import expected_protocol


# TESTS ######################################################################


Expand Down
1 change: 0 additions & 1 deletion tests/test_abstract_inst/test_optical_spectrum_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import instruments as ik
from tests import expected_protocol


# TESTS ######################################################################


Expand Down
1 change: 0 additions & 1 deletion tests/test_abstract_inst/test_oscilloscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import instruments as ik
from tests import expected_protocol


# TESTS ######################################################################


Expand Down
1 change: 0 additions & 1 deletion tests/test_abstract_inst/test_power_supply.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import instruments as ik
from tests import expected_protocol


# TESTS ######################################################################


Expand Down
Loading
Loading