From 2253a6f79a6dfb845d335d8f42df184bd2c100f7 Mon Sep 17 00:00:00 2001 From: Nomos11 <82180697+Nomos11@users.noreply.github.com> Date: Thu, 20 Nov 2025 20:09:18 +0100 Subject: [PATCH 1/2] 1=2 --- qupulse/hardware/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qupulse/hardware/util.py b/qupulse/hardware/util.py index ec1a91eae..35dcd01d8 100644 --- a/qupulse/hardware/util.py +++ b/qupulse/hardware/util.py @@ -250,7 +250,7 @@ def check_invalid_values(ch_data): if ch2 is None: ch2 = np.zeros(size) else: - check_invalid_values(ch1) + check_invalid_values(ch2) marker_data = np.zeros(size, dtype=np.uint16) for idx, marker in enumerate(markers): if marker is not None: From 46035a528f61a8f97f42b57717b216eb6a4dc6b5 Mon Sep 17 00:00:00 2001 From: Nomos11 <82180697+Nomos11@users.noreply.github.com> Date: Thu, 20 Nov 2025 20:11:24 +0100 Subject: [PATCH 2/2] also test for ch2 --- tests/hardware/util_tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/hardware/util_tests.py b/tests/hardware/util_tests.py index 9b983c28f..7693ca3cb 100644 --- a/tests/hardware/util_tests.py +++ b/tests/hardware/util_tests.py @@ -98,6 +98,8 @@ def test_size_exception(self): def test_range_exception(self): with self.assertRaisesRegex(ValueError, "invalid"): zhinst_voltage_to_uint16(2.*np.ones(192), None, (None, None, None, None)) + with self.assertRaisesRegex(ValueError, "invalid"): + zhinst_voltage_to_uint16(None, 2.*np.ones(192), (None, None, None, None)) # this should work zhinst_voltage_to_uint16(None, None, (2. * np.ones(192), None, None, None))