Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Remove upsampling mode for LFFEMAnalogOutputPort #76

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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