-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from qua-platform/feat/set-dc-offset
Feat/set dc offset for channels
- Loading branch information
Showing
3 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import pytest | ||
from quam.components import IQChannel | ||
|
||
|
||
def test_IQ_channel_set_dc_offset(mocker): | ||
mocker.patch("quam.components.channels.set_dc_offset") | ||
|
||
channel = IQChannel( | ||
id="channel", | ||
opx_output_I=("con1", 1), | ||
opx_output_Q=("con1", 2), | ||
frequency_converter_up=None, | ||
) | ||
|
||
with pytest.raises(TypeError): | ||
channel.set_dc_offset(0.5) | ||
|
||
with pytest.raises(ValueError): | ||
channel.set_dc_offset(0.5, "X") | ||
|
||
channel.set_dc_offset(0.5, "I") | ||
|
||
from quam.components.channels import set_dc_offset | ||
|
||
set_dc_offset.assert_called_once_with( | ||
element="channel", element_input="I", offset=0.5 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters