Skip to content

Commit

Permalink
Merge pull request #76 from qua-platform/fix/remove-lf-fem-sampling_mode
Browse files Browse the repository at this point in the history
Fix: Remove upsampling mode for LFFEMAnalogOutputPort
  • Loading branch information
nulinspiratie authored Sep 19, 2024
2 parents f5970b1 + 88d520d commit 4d7435e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quam/components/ports/analog_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ class LFFEMAnalogOutputPort(LFAnalogOutputPort, FEMPort):
def get_port_properties(self) -> Dict[str, Any]:
port_properties = super().get_port_properties()
port_properties["sampling_rate"] = self.sampling_rate
port_properties["upsampling_mode"] = self.upsampling_mode
if self.sampling_rate == 1e9:
port_properties["upsampling_mode"] = self.upsampling_mode
port_properties["output_mode"] = self.output_mode
return port_properties

Expand Down
10 changes: 10 additions & 0 deletions tests/components/ports/test_lf_fem_analog_ports.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ def test_lf_fem_analog_output_port():
"offset": 0.1,
}

port.sampling_rate = 2e9

assert port.get_port_properties() == {
"delay": 0,
"shareable": False,
"output_mode": "direct",
"sampling_rate": 2e9,
"offset": 0.1,
}


def test_lf_fem_analog_input_port():
with pytest.raises(TypeError):
Expand Down

0 comments on commit 4d7435e

Please sign in to comment.