From 1f0e1b3d94717088c67dc61e5bc42730195037af Mon Sep 17 00:00:00 2001 From: Serwan Asaad Date: Mon, 12 Aug 2024 18:54:29 +0200 Subject: [PATCH] Fix: Set default LO_source for Octave RF input 2 to "external" --- CHANGELOG.md | 2 ++ quam/components/octave.py | 5 ++++- tests/components/test_octave.py | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4cdac359..e23488a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ ### Changed - Allow `QuamBase.get_reference(attr)` to return a reference of one of its attributes +- Octave RF input 2 has `LO_source = "external"` by default ### Fixed - Fix quam object instantiation error when a parameter type uses pipe operator @@ -15,6 +16,7 @@ - Fix filter_fir/iir_taps being passed as QuamList when generating config, resulting in an error due to parent reassignment + ## [0.3.3] ### Added - Added the following parameters to `IQChannel`: `RF_frequency`, `LO_frequency`, `intermediate_frequency` diff --git a/quam/components/octave.py b/quam/components/octave.py index 76dfc6c4..f27e8e3b 100644 --- a/quam/components/octave.py +++ b/quam/components/octave.py @@ -97,7 +97,10 @@ def initialize_frequency_converters(self): ) for idx in range(1, 3): - self.RF_inputs[idx] = OctaveDownConverter(id=idx, LO_frequency=None) + LO_source = "internal" if idx == 1 else "external" + self.RF_inputs[idx] = OctaveDownConverter( + id=idx, LO_frequency=None, LO_source=LO_source + ) def get_octave_config(self) -> QmOctaveConfig: """Return a QmOctaveConfig object with the current Octave configuration.""" diff --git a/tests/components/test_octave.py b/tests/components/test_octave.py index fc6af6b4..5ac5d45c 100644 --- a/tests/components/test_octave.py +++ b/tests/components/test_octave.py @@ -329,7 +329,7 @@ def test_load_octave(octave): d_expected = { "__class__": "test_octave.OctaveQuAM", "octave": { - "RF_inputs": {1: {"id": 1}, 2: {"id": 2}}, + "RF_inputs": {1: {"id": 1}, 2: {"id": 2, "LO_source": "external"}}, "RF_outputs": { 1: {"id": 1}, 2: {"id": 2},