diff options
author | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-17 21:43:24 -0400 |
---|---|---|
committer | Eugeniy E. Mikhailov <evgmik@gmail.com> | 2024-07-17 21:43:24 -0400 |
commit | 52f246c6e507e5d49972aed55ca502eafd3a728c (patch) | |
tree | c9f3fa8a55e6ab185394a5be91eafc6700c4bf5e /qolab/hardware/daq | |
parent | d6b16ea2f97c4869e84afaa13f5d8586a1357653 (diff) | |
download | qolab-52f246c6e507e5d49972aed55ca502eafd3a728c.tar.gz qolab-52f246c6e507e5d49972aed55ca502eafd3a728c.zip |
simplify DAQ loading
Diffstat (limited to 'qolab/hardware/daq')
-rw-r--r-- | qolab/hardware/daq/__init__.py | 16 | ||||
-rw-r--r-- | qolab/hardware/daq/_basic.py | 17 | ||||
-rw-r--r-- | qolab/hardware/daq/labjack_ue9.py | 2 |
3 files changed, 21 insertions, 14 deletions
diff --git a/qolab/hardware/daq/__init__.py b/qolab/hardware/daq/__init__.py index 828dfb8..c8a26e2 100644 --- a/qolab/hardware/daq/__init__.py +++ b/qolab/hardware/daq/__init__.py @@ -1,15 +1,5 @@ -from qolab.hardware.basic import BasicInstrument +"""DAQ classes.""" +from .labjack_ue9 import LabJackUE9 -class DAQ(BasicInstrument): - # Minimal set of methods to be implemented by a RFGenerator - def __init__(self, *args, **kwds): - BasicInstrument.__init__(self, *args, **kwds) - self.config["Device type"] = "DAQ" - self.config["Device model"] = "Generic DAQ Without Hardware interface" - self.config["FnamePrefix"] = "daq" - self.deviceProperties.update({"AnalogInputsNum", "AnalogOutputsNum"}) - - # this is device dependent - self.AnalogInputsNum = 0 - self.AnalogOutputsNum = 0 +__all__ = ["LabJackUE9"] diff --git a/qolab/hardware/daq/_basic.py b/qolab/hardware/daq/_basic.py new file mode 100644 index 0000000..0eb0ca8 --- /dev/null +++ b/qolab/hardware/daq/_basic.py @@ -0,0 +1,17 @@ +"""Basic DAQ to be included into hardware aware classes.""" + +from qolab.hardware.basic import BasicInstrument + + +class DAQ(BasicInstrument): + # Minimal set of methods to be implemented by a RFGenerator + def __init__(self, *args, **kwds): + BasicInstrument.__init__(self, *args, **kwds) + self.config["Device type"] = "DAQ" + self.config["Device model"] = "Generic DAQ Without Hardware interface" + self.config["FnamePrefix"] = "daq" + self.deviceProperties.update({"AnalogInputsNum", "AnalogOutputsNum"}) + + # this is device dependent + self.AnalogInputsNum = 0 + self.AnalogOutputsNum = 0 diff --git a/qolab/hardware/daq/labjack_ue9.py b/qolab/hardware/daq/labjack_ue9.py index 1c0394d..960e2fb 100644 --- a/qolab/hardware/daq/labjack_ue9.py +++ b/qolab/hardware/daq/labjack_ue9.py @@ -1,4 +1,4 @@ -from qolab.hardware.daq import DAQ +from ._basic import DAQ import ue9 |