aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-17 21:43:24 -0400
committerEugeniy E. Mikhailov <evgmik@gmail.com>2024-07-17 21:43:24 -0400
commit52f246c6e507e5d49972aed55ca502eafd3a728c (patch)
treec9f3fa8a55e6ab185394a5be91eafc6700c4bf5e
parentd6b16ea2f97c4869e84afaa13f5d8586a1357653 (diff)
downloadqolab-52f246c6e507e5d49972aed55ca502eafd3a728c.tar.gz
qolab-52f246c6e507e5d49972aed55ca502eafd3a728c.zip
simplify DAQ loading
-rw-r--r--qolab/hardware/daq/__init__.py16
-rw-r--r--qolab/hardware/daq/_basic.py17
-rw-r--r--qolab/hardware/daq/labjack_ue9.py2
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