From f6f52cf469452f1cd878fd532d29d075d02175cc Mon Sep 17 00:00:00 2001 From: daquintero Date: Mon, 29 Jul 2024 14:23:08 +0100 Subject: [PATCH] :construction: Add some DC devices --- piel/experimental/models/__init__.py | 10 +++-- piel/experimental/models/multimeter.py | 38 +++++++++++++++++++ piel/experimental/models/oscilloscope.py | 21 +++++++++- piel/experimental/models/sourcemeter.py | 38 +++++++++++++++++++ piel/experimental/models/vna.py | 5 ++- .../experimental/models/waveform_generator.py | 1 + piel/experimental/types/__init__.py | 15 +++++--- piel/experimental/types/dc.py | 31 +++++++++++++++ piel/experimental/types/device.py | 5 +++ 9 files changed, 152 insertions(+), 12 deletions(-) create mode 100644 piel/experimental/models/multimeter.py create mode 100644 piel/experimental/models/sourcemeter.py create mode 100644 piel/experimental/types/dc.py diff --git a/piel/experimental/models/__init__.py b/piel/experimental/models/__init__.py index 5b56d7aa..2c43bad0 100644 --- a/piel/experimental/models/__init__.py +++ b/piel/experimental/models/__init__.py @@ -1,7 +1,5 @@ -# use experimental/__init__.py to import all the necessary modules and functions. from .cables import rg164 -from .oscilloscope import create_two_port_oscilloscope, DPO73304 -from .waveform_generator import create_one_port_square_wave_waveform_generator, AWG70001A +from .multimeter import DMM6500 from .rf_passives import create_power_splitter_1to2 from .rf_calibration import ( open_82052D, @@ -9,4 +7,10 @@ load_85052D, through_85052D, ) +from .sourcemeter import SMU2450 +from .oscilloscope import create_two_port_oscilloscope, DPO73304 +from .waveform_generator import ( + create_one_port_square_wave_waveform_generator, + AWG70001A, +) from .vna import E8364A diff --git a/piel/experimental/models/multimeter.py b/piel/experimental/models/multimeter.py new file mode 100644 index 00000000..eb6e21bc --- /dev/null +++ b/piel/experimental/models/multimeter.py @@ -0,0 +1,38 @@ +from ...types import PhysicalPort +from ..types import Multimeter + + +def DMM6500() -> Multimeter: + ports = [ + PhysicalPort( + name="INPUTHI", + domain="DC", + connector="Banana", + ), + PhysicalPort( + name="INPUTLO", + domain="DC", + connector="Banana", + ), + PhysicalPort( + name="SENSEHI", + domain="DC", + connector="Banana", + ), + PhysicalPort( + name="SENSELO", + domain="DC", + connector="Banana", + ), + PhysicalPort( + name="MANIFOLDGND", + domain="DC", + connector="Banana", + ), + ] + + return Multimeter( + name="DMM6500", + ports=ports, + manufacturer="Keithley", + ) diff --git a/piel/experimental/models/oscilloscope.py b/piel/experimental/models/oscilloscope.py index 82012d57..c4119eca 100644 --- a/piel/experimental/models/oscilloscope.py +++ b/piel/experimental/models/oscilloscope.py @@ -22,5 +22,22 @@ def create_two_port_oscilloscope() -> Oscilloscope: ) -def DPO73304(): - pass +def DPO73304() -> Oscilloscope: + ports = [ + PhysicalPort( + name="CH1", + domain="RF", + connector="SMA", + ), + PhysicalPort( + name="CH2", + domain="RF", + connector="SMA", + ), + ] + + return Oscilloscope( + name="DPO73304", + ports=ports, + manufacturer="Tektronix", + ) diff --git a/piel/experimental/models/sourcemeter.py b/piel/experimental/models/sourcemeter.py new file mode 100644 index 00000000..ba53bb3d --- /dev/null +++ b/piel/experimental/models/sourcemeter.py @@ -0,0 +1,38 @@ +from ...types import PhysicalPort +from ..types import Sourcemeter + + +def SMU2450() -> Sourcemeter: + ports = [ + PhysicalPort( + name="FORCEHI", + domain="DC", + connector="Banana", + ), + PhysicalPort( + name="FORCELO", + domain="DC", + connector="Banana", + ), + PhysicalPort( + name="SENSEHI", + domain="DC", + connector="Banana", + ), + PhysicalPort( + name="SENSELO", + domain="DC", + connector="Banana", + ), + PhysicalPort( + name="MANIFOLDGND", + domain="DC", + connector="Banana", + ), + ] + + return Sourcemeter( + name="SMU2450", + manufacturer="Keithley", + ports=ports, + ) diff --git a/piel/experimental/models/vna.py b/piel/experimental/models/vna.py index e10d79b9..1fd14906 100644 --- a/piel/experimental/models/vna.py +++ b/piel/experimental/models/vna.py @@ -2,4 +2,7 @@ def E8364A() -> pe.types.VNA: - return pe.types.VNA(name="E8364A") + return pe.types.VNA( + name="E8364A", + manufacturer="Agilent", + ) diff --git a/piel/experimental/models/waveform_generator.py b/piel/experimental/models/waveform_generator.py index 64c535b9..ea6ae53c 100644 --- a/piel/experimental/models/waveform_generator.py +++ b/piel/experimental/models/waveform_generator.py @@ -38,6 +38,7 @@ def create_one_port_square_wave_waveform_generator( name="two_port_oscilloscope", ports=ports, configuration=configuration, + manufacturer="Tektronix", ) diff --git a/piel/experimental/types/__init__.py b/piel/experimental/types/__init__.py index a67f9159..f916851c 100644 --- a/piel/experimental/types/__init__.py +++ b/piel/experimental/types/__init__.py @@ -1,5 +1,12 @@ from .frequency import VNA, VNAConfiguration, VNAMeasurement +from .dc import ( + Sourcemeter, + SourcemeterConfiguration, + Multimeter, + MultimeterConfiguration, +) + from .device import ( Device, DeviceConfiguration, @@ -13,16 +20,12 @@ from .measurements.propagation import ( PropagationDelayMeasurement, - PropagationDelayMeasurementSweep -) - -from .measurements.data.core import ( - ExperimentInstance + PropagationDelayMeasurementSweep, ) from .measurements.data.propagation import ( PropagationDelayMeasurementData, - PropagationDelayMeasurementSweepData + PropagationDelayMeasurementSweepData, ) from .time import ( diff --git a/piel/experimental/types/dc.py b/piel/experimental/types/dc.py new file mode 100644 index 00000000..4b9d6208 --- /dev/null +++ b/piel/experimental/types/dc.py @@ -0,0 +1,31 @@ +from .device import Device, DeviceConfiguration + + +class SourcemeterConfiguration(DeviceConfiguration): + """ + This class corresponds to the configuration of data which is just inherent to the Sourcemeter connectivity and configuration, + not the experimental setup connectivity. + """ + + current_limit_A: float + voltage_limit_V: float + + +class Sourcemeter(Device): + """ + Represents a sourcemeter. + """ + + configuration: SourcemeterConfiguration + + +class MultimeterConfiguration(DeviceConfiguration): + """ + This class corresponds to the configuration of data which is just inherent to the Multimeter connectivity and configuration, + """ + + +class Multimeter(Device): + """ + Represents a multimeter. + """ diff --git a/piel/experimental/types/device.py b/piel/experimental/types/device.py index 9d3140c9..6b5f3171 100644 --- a/piel/experimental/types/device.py +++ b/piel/experimental/types/device.py @@ -26,6 +26,11 @@ class Device(PhysicalComponent): configuration: Optional[DeviceConfiguration] = None + manufacturer: Optional[str] = None + """ + The manufacturer of the device. + """ + class MeasurementDevice(Device): measurement: Optional[DeviceMeasurement] = None