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

Add kwargs passthrough to iv_curve() #114

Merged
merged 1 commit into from
Dec 13, 2023
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
7 changes: 5 additions & 2 deletions src/sorunlib/smurf.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,14 @@ def bias_step(tag=None, concurrent=True, settling_time=None):
tag=tag)


def iv_curve(tag=None, concurrent=True, settling_time=None):
def iv_curve(tag=None, iv_kwargs=None, concurrent=True, settling_time=None):
"""Perform an iv curve on all SMuRF Controllers.

Args:
tag (str, optional): Tag or comma-separated listed of tags to attach to
the operation.
iv_kwargs (dict, optional): Additional keyword arguments to pass to
``take_iv``.
concurrent (bool, optional): A bool which determines how the operation
is run across the active SMuRF controllers. It runs in parallel if
True, and in series if False.
Expand All @@ -153,7 +155,8 @@ def iv_curve(tag=None, concurrent=True, settling_time=None):
_run_op('take_iv',
concurrent=concurrent,
settling_time=settling_time,
tag=tag)
tag=tag,
kwargs=iv_kwargs)


def uxm_setup(concurrent=True, settling_time=0):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_smurf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_bias_step_failure_threshold(concurrent):
def test_iv_curve(concurrent):
smurf.iv_curve(concurrent=concurrent)
for client in smurf.run.CLIENTS['smurf']:
client.take_iv.start.assert_called_with(tag=None)
client.take_iv.start.assert_called_with(tag=None, kwargs=None)


@patch('sorunlib.smurf.time.sleep', MagicMock())
Expand Down