diff --git a/CHANGELOG.md b/CHANGELOG.md index b51d8639..1815d37d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,10 @@ Things to be included in the next release go here. - Updated the `get_model_series()` function to only warn the user if the model is not found in the `SupportedModels` enumeration. This also eliminates false warnings during unit tests. +### Fixed + +- Updated the measurement source selection command for the MDO3K, MDO4K, MSO4K and DPO4K models to work properly. + ______________________________________________________________________ ## v1.2.1 (2024-02-27) diff --git a/src/tm_devices/commands/_1l5u97_mdomsodpo/__init__.py b/src/tm_devices/commands/_1l5u97_mdomsodpo/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/src/tm_devices/commands/_1l5u97_mdomsodpo/measurement.py b/src/tm_devices/commands/_1mlt9u_mdomsodpo/measurement.py similarity index 97% rename from src/tm_devices/commands/_1l5u97_mdomsodpo/measurement.py rename to src/tm_devices/commands/_1mlt9u_mdomsodpo/measurement.py index 51d6357b..5d981457 100644 --- a/src/tm_devices/commands/_1l5u97_mdomsodpo/measurement.py +++ b/src/tm_devices/commands/_1mlt9u_mdomsodpo/measurement.py @@ -3,7 +3,7 @@ """The measurement commands module. These commands are used in the following models: -DPO4K, DPO4KB, MDO3K, MSO4K, MSO4KB +DPO4K, DPO4KB, MDO3K, MDO4K, MDO4KB, MDO4KC, MSO4K, MSO4KB THIS FILE IS AUTO-GENERATED, IT SHOULD NOT BE MANUALLY MODIFIED. @@ -44,6 +44,8 @@ - MEASUrement:MEAS:MAXimum? - MEASUrement:MEAS:MEAN? - MEASUrement:MEAS:MINImum? + - MEASUrement:MEAS:SOUrce1 {CH|MATH|R|D|HIStogram|RF_AMPlitude|RF_FREQuency|RF_PHASe} + - MEASUrement:MEAS:SOUrce1? - MEASUrement:MEAS:STATE {OFF|ON|} - MEASUrement:MEAS:STATE? - MEASUrement:MEAS:STDdev? @@ -2370,6 +2372,45 @@ class MeasurementMeasItemState(SCPICmdWrite, SCPICmdRead): """ +class MeasurementMeasItemSource1(SCPICmdWrite, SCPICmdRead): + """The ``MEASUrement:MEAS:SOUrce1`` command. + + **Description:** + - This command sets or queries the measurement source. The measurement number + and source are specified by x. For delay or phase measurements, This command + specifies the waveform to measure 'from'. This is equivalent to setting the + 'From:' waveform in the 'Measure Delay' side menu or the 'Measure Phase' side menu. + + **Usage:** + - Using the ``.query()`` method will send the ``MEASUrement:MEAS:SOUrce1?`` query. + - Using the ``.verify(value)`` method will send the ``MEASUrement:MEAS:SOUrce1?`` query + and raise an AssertionError if the returned value does not match ``value``. + - Using the ``.write(value)`` method will send the ``MEASUrement:MEAS:SOUrce1 value`` + command. + + **SCPI Syntax:** + + :: + + - MEASUrement:MEAS:SOUrce1 {CH|MATH|R|D|HIStogram|RF_AMPlitude|RF_FREQuency|RF_PHASe} + - MEASUrement:MEAS:SOUrce1? + + **Info:** + - ``CH`` is an analog channel to use as the source waveform. x has a minimum of 1 and a + maximum of 4. + - ``MATH`` is the math waveform. + - ``REF`` is a reference waveform to use as the source waveform. x has a minimum of 1 and + a maximum of 4. + - ``D`` is a digital channel to use as the source waveform. (MSO/MDO4000/B models only as + well as MDO3000 and MDO400C models with option MDO3MSO or MDO4MSO installed.) x has a + minimum of 0 and a maximum of 15. + - ``HIStogram`` indicates the histogram is the object to be measured. + - ``RF_AMPlitude`` are the RF time domain traces. (MDO4000/B/C models only.). + - ``RF_FREQuency`` are the RF time domain traces. (MDO4000/B/C models only.). + - ``RF_PHASe`` are the RF time domain traces. (MDO4000/B/C models only.). + """ # noqa: E501 + + class MeasurementMeasItemMinimum(SCPICmdRead): """The ``MEASUrement:MEAS:MINImum`` command. @@ -2637,6 +2678,7 @@ class MeasurementMeasItem(ValidatedDynamicNumberCmd, SCPICmdRead): - ``.maximum``: The ``MEASUrement:MEAS:MAXimum`` command. - ``.mean``: The ``MEASUrement:MEAS:MEAN`` command. - ``.minimum``: The ``MEASUrement:MEAS:MINImum`` command. + - ``.source1``: The ``MEASUrement:MEAS:SOUrce1`` command. - ``.state``: The ``MEASUrement:MEAS:STATE`` command. - ``.stddev``: The ``MEASUrement:MEAS:STDdev`` command. - ``.type``: The ``MEASUrement:MEAS:TYPe`` command. @@ -2651,6 +2693,7 @@ def __init__(self, device: Optional["PIDevice"], cmd_syntax: str) -> None: self._maximum = MeasurementMeasItemMaximum(device, f"{self._cmd_syntax}:MAXimum") self._mean = MeasurementMeasItemMean(device, f"{self._cmd_syntax}:MEAN") self._minimum = MeasurementMeasItemMinimum(device, f"{self._cmd_syntax}:MINImum") + self._source1 = MeasurementMeasItemSource1(device, f"{self._cmd_syntax}:SOUrce1") self._state = MeasurementMeasItemState(device, f"{self._cmd_syntax}:STATE") self._stddev = MeasurementMeasItemStddev(device, f"{self._cmd_syntax}:STDdev") self._type = MeasurementMeasItemType(device, f"{self._cmd_syntax}:TYPe") @@ -2767,6 +2810,46 @@ def minimum(self) -> MeasurementMeasItemMinimum: """ return self._minimum + @property + def source1(self) -> MeasurementMeasItemSource1: + """Return the ``MEASUrement:MEAS:SOUrce1`` command. + + **Description:** + - This command sets or queries the measurement source. The measurement number + and source are specified by x. For delay or phase measurements, This command + specifies the waveform to measure 'from'. This is equivalent to setting the + 'From:' waveform in the 'Measure Delay' side menu or the 'Measure Phase' side menu. + + **Usage:** + - Using the ``.query()`` method will send the ``MEASUrement:MEAS:SOUrce1?`` query. + - Using the ``.verify(value)`` method will send the ``MEASUrement:MEAS:SOUrce1?`` + query and raise an AssertionError if the returned value does not match ``value``. + - Using the ``.write(value)`` method will send the ``MEASUrement:MEAS:SOUrce1 value`` + command. + + **SCPI Syntax:** + + :: + + - MEASUrement:MEAS:SOUrce1 {CH|MATH|R|D|HIStogram|RF_AMPlitude|RF_FREQuency|RF_PHASe} + - MEASUrement:MEAS:SOUrce1? + + **Info:** + - ``CH`` is an analog channel to use as the source waveform. x has a minimum of 1 and + a maximum of 4. + - ``MATH`` is the math waveform. + - ``REF`` is a reference waveform to use as the source waveform. x has a minimum of 1 + and a maximum of 4. + - ``D`` is a digital channel to use as the source waveform. (MSO/MDO4000/B models + only as well as MDO3000 and MDO400C models with option MDO3MSO or MDO4MSO installed.) + x has a minimum of 0 and a maximum of 15. + - ``HIStogram`` indicates the histogram is the object to be measured. + - ``RF_AMPlitude`` are the RF time domain traces. (MDO4000/B/C models only.). + - ``RF_FREQuency`` are the RF time domain traces. (MDO4000/B/C models only.). + - ``RF_PHASe`` are the RF time domain traces. (MDO4000/B/C models only.). + """ # noqa: E501 + return self._source1 + @property def state(self) -> MeasurementMeasItemState: """Return the ``MEASUrement:MEAS:STATE`` command. @@ -3417,13 +3500,10 @@ class MeasurementImmedSource1(SCPICmdWrite, SCPICmdRead): """The ``MEASUrement:IMMed:SOUrce1`` command. **Description:** - - For SOURce1: This command specifies the source for all single channel measurements. For + - This command specifies the source for all single channel measurements. For delay or phase measurements, this command specifies the waveform to measure 'from'. This is equivalent to setting the 'From:' waveform in the 'Measure Delay' side menu or the - 'Measure Phase' side menu. SOUrce is equivalent to SOURCE1. For SOUrce2: This command - specifies the waveform to measure 'to' when taking a delay measurement or phase - measurement. This is equivalent to setting the 'To:' waveform in the 'Measure Delay' side - menu or the 'Measure Phase' side menu. + 'Measure Phase' side menu. **Usage:** - Using the ``.query()`` method will send the ``MEASUrement:IMMed:SOUrce1?`` query. @@ -3445,8 +3525,7 @@ class MeasurementImmedSource1(SCPICmdWrite, SCPICmdRead): - ``MATH`` is the math waveform. - ``D0 - D15`` is the digital waveform to use as the source waveform. (On models with option 3-MSO installed.). - - ``HIStogram`` indicates the histogram as the object to be measured. HIStogram only applies - to SOUrce1; it is not available for SOUrce2. + - ``HIStogram`` indicates the histogram as the object to be measured. """ @@ -3665,13 +3744,10 @@ def source1(self) -> MeasurementImmedSource1: """Return the ``MEASUrement:IMMed:SOUrce1`` command. **Description:** - - For SOURce1: This command specifies the source for all single channel measurements. + - This command specifies the source for all single channel measurements. For delay or phase measurements, this command specifies the waveform to measure 'from'. This is equivalent to setting the 'From:' waveform in the 'Measure Delay' side - menu or the 'Measure Phase' side menu. SOUrce is equivalent to SOURCE1. For SOUrce2: - This command specifies the waveform to measure 'to' when taking a delay measurement or - phase measurement. This is equivalent to setting the 'To:' waveform in the 'Measure - Delay' side menu or the 'Measure Phase' side menu. + menu or the 'Measure Phase' side menu. **Usage:** - Using the ``.query()`` method will send the ``MEASUrement:IMMed:SOUrce1?`` query. @@ -3693,8 +3769,7 @@ def source1(self) -> MeasurementImmedSource1: - ``MATH`` is the math waveform. - ``D0 - D15`` is the digital waveform to use as the source waveform. (On models with option 3-MSO installed.). - - ``HIStogram`` indicates the histogram as the object to be measured. HIStogram only - applies to SOUrce1; it is not available for SOUrce2. + - ``HIStogram`` indicates the histogram as the object to be measured. """ # noqa: E501 return self._source1 @@ -4082,6 +4157,7 @@ def meas(self) -> Dict[int, MeasurementMeasItem]: - ``.maximum``: The ``MEASUrement:MEAS:MAXimum`` command. - ``.mean``: The ``MEASUrement:MEAS:MEAN`` command. - ``.minimum``: The ``MEASUrement:MEAS:MINImum`` command. + - ``.source1``: The ``MEASUrement:MEAS:SOUrce1`` command. - ``.state``: The ``MEASUrement:MEAS:STATE`` command. - ``.stddev``: The ``MEASUrement:MEAS:STDdev`` command. - ``.type``: The ``MEASUrement:MEAS:TYPe`` command. diff --git a/src/tm_devices/commands/_dpo4k_commands.py b/src/tm_devices/commands/_dpo4k_commands.py index 6e6114ff..db938c3f 100644 --- a/src/tm_devices/commands/_dpo4k_commands.py +++ b/src/tm_devices/commands/_dpo4k_commands.py @@ -13,7 +13,6 @@ from ._1jzp7o_mdodpo.trigger import Trigger from ._1kozfv_dpo.search import Search -from ._1l5u97_mdomsodpo.measurement import Measurement from ._1lcv3a_msodpomdo.message import Message from ._1lcv3a_msodpomdo.setup_1 import SetupItem from ._1ltpwt_mdomsodpo.actonevent import Actonevent @@ -59,6 +58,7 @@ from ._1mlt9u_mdomsodpo.deskew import Deskew from ._1mlt9u_mdomsodpo.display import Display from ._1mlt9u_mdomsodpo.mask import Mask +from ._1mlt9u_mdomsodpo.measurement import Measurement from ._1mlt9u_mdomsodpo.recall import Recall from ._1mlt9u_mdomsodpo.select import Select from ._1mq0z9_msodpo.rf import Rf diff --git a/src/tm_devices/commands/_dpo4kb_commands.py b/src/tm_devices/commands/_dpo4kb_commands.py index 2daa9521..dc5777db 100644 --- a/src/tm_devices/commands/_dpo4kb_commands.py +++ b/src/tm_devices/commands/_dpo4kb_commands.py @@ -11,7 +11,6 @@ from tm_devices.drivers.pi.pi_device import PIDevice -from ._1l5u97_mdomsodpo.measurement import Measurement from ._1la1ym_msomdodpo.trigger import Trigger from ._1lcv3a_msodpomdo.message import Message from ._1lcv3a_msodpomdo.setup_1 import SetupItem @@ -59,6 +58,7 @@ from ._1mlt9u_mdomsodpo.deskew import Deskew from ._1mlt9u_mdomsodpo.display import Display from ._1mlt9u_mdomsodpo.mask import Mask +from ._1mlt9u_mdomsodpo.measurement import Measurement from ._1mlt9u_mdomsodpo.recall import Recall from ._1mlt9u_mdomsodpo.select import Select from ._1mq0z9_msodpo.rf import Rf diff --git a/src/tm_devices/commands/_mdo3k_commands.py b/src/tm_devices/commands/_mdo3k_commands.py index 5e2f47a8..e3e914f0 100644 --- a/src/tm_devices/commands/_mdo3k_commands.py +++ b/src/tm_devices/commands/_mdo3k_commands.py @@ -12,7 +12,6 @@ from tm_devices.drivers.pi.pi_device import PIDevice from ._1l4fot_mdomso.cursor import Cursor -from ._1l5u97_mdomsodpo.measurement import Measurement from ._1lcv3a_msodpomdo.message import Message from ._1lcv3a_msodpomdo.setup_1 import SetupItem from ._1ltpwt_mdomsodpo.actonevent import Actonevent @@ -57,6 +56,7 @@ from ._1mlt9u_mdomsodpo.deskew import Deskew from ._1mlt9u_mdomsodpo.display import Display from ._1mlt9u_mdomsodpo.mask import Mask +from ._1mlt9u_mdomsodpo.measurement import Measurement from ._1mlt9u_mdomsodpo.recall import Recall from ._1mlt9u_mdomsodpo.select import Select from ._1nmc1o_msodpomdo.clearmenu import Clearmenu diff --git a/src/tm_devices/commands/_mdo4k_commands.py b/src/tm_devices/commands/_mdo4k_commands.py index ecd8ace7..359caa05 100644 --- a/src/tm_devices/commands/_mdo4k_commands.py +++ b/src/tm_devices/commands/_mdo4k_commands.py @@ -11,7 +11,6 @@ from tm_devices.drivers.pi.pi_device import PIDevice -from ._1kjd62_mdo.measurement import Measurement from ._1kjd62_mdo.rf import Rf from ._1la1ym_msomdodpo.trigger import Trigger from ._1lcv3a_msodpomdo.message import Message @@ -59,6 +58,7 @@ from ._1mlt9u_mdomsodpo.deskew import Deskew from ._1mlt9u_mdomsodpo.display import Display from ._1mlt9u_mdomsodpo.mask import Mask +from ._1mlt9u_mdomsodpo.measurement import Measurement from ._1mlt9u_mdomsodpo.recall import Recall from ._1mlt9u_mdomsodpo.select import Select from ._1nmc1o_msodpomdo.clearmenu import Clearmenu diff --git a/src/tm_devices/commands/_mdo4kb_commands.py b/src/tm_devices/commands/_mdo4kb_commands.py index 56f70cab..033ae514 100644 --- a/src/tm_devices/commands/_mdo4kb_commands.py +++ b/src/tm_devices/commands/_mdo4kb_commands.py @@ -12,7 +12,6 @@ from tm_devices.drivers.pi.pi_device import PIDevice from ._1jzp7o_mdodpo.trigger import Trigger -from ._1kjd62_mdo.measurement import Measurement from ._1kjd62_mdo.rf import Rf from ._1l4fot_mdomso.cursor import Cursor from ._1lcv3a_msodpomdo.message import Message @@ -59,6 +58,7 @@ from ._1mlt9u_mdomsodpo.deskew import Deskew from ._1mlt9u_mdomsodpo.display import Display from ._1mlt9u_mdomsodpo.mask import Mask +from ._1mlt9u_mdomsodpo.measurement import Measurement from ._1mlt9u_mdomsodpo.recall import Recall from ._1mlt9u_mdomsodpo.select import Select from ._1nmc1o_msodpomdo.clearmenu import Clearmenu diff --git a/src/tm_devices/commands/_mdo4kc_commands.py b/src/tm_devices/commands/_mdo4kc_commands.py index b166e347..e54621d2 100644 --- a/src/tm_devices/commands/_mdo4kc_commands.py +++ b/src/tm_devices/commands/_mdo4kc_commands.py @@ -13,7 +13,6 @@ from ._1kdqwg_mdo.search import Search from ._1kdqwg_mdo.trigger import Trigger -from ._1kjd62_mdo.measurement import Measurement from ._1kjd62_mdo.rf import Rf from ._1l4fot_mdomso.cursor import Cursor from ._1lcv3a_msodpomdo.message import Message @@ -60,6 +59,7 @@ from ._1mlt9u_mdomsodpo.deskew import Deskew from ._1mlt9u_mdomsodpo.display import Display from ._1mlt9u_mdomsodpo.mask import Mask +from ._1mlt9u_mdomsodpo.measurement import Measurement from ._1mlt9u_mdomsodpo.recall import Recall from ._1mlt9u_mdomsodpo.select import Select from ._1nmc1o_msodpomdo.clearmenu import Clearmenu diff --git a/src/tm_devices/commands/_mso4k_commands.py b/src/tm_devices/commands/_mso4k_commands.py index b5188d15..b8de844f 100644 --- a/src/tm_devices/commands/_mso4k_commands.py +++ b/src/tm_devices/commands/_mso4k_commands.py @@ -11,7 +11,6 @@ from tm_devices.drivers.pi.pi_device import PIDevice -from ._1l5u97_mdomsodpo.measurement import Measurement from ._1la1ym_msomdodpo.trigger import Trigger from ._1lcv3a_msodpomdo.message import Message from ._1lcv3a_msodpomdo.setup_1 import SetupItem @@ -59,6 +58,7 @@ from ._1mlt9u_mdomsodpo.deskew import Deskew from ._1mlt9u_mdomsodpo.display import Display from ._1mlt9u_mdomsodpo.mask import Mask +from ._1mlt9u_mdomsodpo.measurement import Measurement from ._1mlt9u_mdomsodpo.recall import Recall from ._1mlt9u_mdomsodpo.select import Select from ._1mq0z9_msodpo.rf import Rf diff --git a/src/tm_devices/commands/_mso4kb_commands.py b/src/tm_devices/commands/_mso4kb_commands.py index 4e80b5d4..d3c73721 100644 --- a/src/tm_devices/commands/_mso4kb_commands.py +++ b/src/tm_devices/commands/_mso4kb_commands.py @@ -12,7 +12,6 @@ from tm_devices.drivers.pi.pi_device import PIDevice from ._1l4fot_mdomso.cursor import Cursor -from ._1l5u97_mdomsodpo.measurement import Measurement from ._1la1ym_msomdodpo.trigger import Trigger from ._1lcv3a_msodpomdo.message import Message from ._1lcv3a_msodpomdo.setup_1 import SetupItem @@ -59,6 +58,7 @@ from ._1mlt9u_mdomsodpo.deskew import Deskew from ._1mlt9u_mdomsodpo.display import Display from ._1mlt9u_mdomsodpo.mask import Mask +from ._1mlt9u_mdomsodpo.measurement import Measurement from ._1mlt9u_mdomsodpo.recall import Recall from ._1mlt9u_mdomsodpo.select import Select from ._1mq0z9_msodpo.rf import Rf