-
Notifications
You must be signed in to change notification settings - Fork 322
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
AMI430 driver setting set point despite being outside safe region #1162
AMI430 driver setting set point despite being outside safe region #1162
Conversation
…ments and then update _set_point. 2) get rid of "_set_x", "_set_y", etc. Instead have a single "_set_setpoints" method 3) Make the "test_ramp_down_first" more robust by not checking time stamps any more 4) In the test which tests field limits assert that the set point is not set when an error is raised.
Codecov Report
@@ Coverage Diff @@
## master #1162 +/- ##
==========================================
+ Coverage 79.71% 79.78% +0.06%
==========================================
Files 48 48
Lines 6686 6662 -24
==========================================
- Hits 5330 5315 -15
+ Misses 1356 1347 -9 |
@@ -570,90 +570,88 @@ def __init__(self, name, instrument_x, instrument_y, | |||
# Get and set parameters for the set points of the coordinates | |||
self.add_parameter( | |||
'cartesian', | |||
get_cmd=partial(self._get_setpoints, 'x', 'y', 'z'), | |||
set_cmd=self._set_cartesian, | |||
get_cmd=partial(self._get_setpoints, ['x', 'y', 'z']), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mutable default arguments to functions always makes me slightly nervous. These are never modified so you could make them tuples right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mutable defaults? Where do you see that? I guess I can change that to a tuple without problems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or will partial create a function with a list as default arguments? I did not think of that... :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sohailc yes that's my thinking, It's a small issue for sure since this never modified the input arg
…i_invalid_field_limits_set
…/sohailc/Qcodes into fix/ami_invalid_field_limits_set
…i_invalid_field_limits_set
…ults 2) Cleaned up field vector
Merge: 16568f4 73306cf Author: sohail chatoor <[email protected]> Merge pull request #1162 from sohailc/fix/ami_invalid_field_limits_set
Solves issue #1143
The problem was that the set point vector was adjusted before testing that the set point was safe.