Skip to content

Commit

Permalink
Add kwargs passthrough to iv_curve()
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianJKoopman committed Dec 13, 2023
1 parent 0f48f3f commit 65e8746
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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

0 comments on commit 65e8746

Please sign in to comment.