-
Notifications
You must be signed in to change notification settings - Fork 438
sisotool small visual cleanup, new feature to show step response of different input-output than loop #531
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
Conversation
…sys) by providing a 2-input, 2-output system; some visual cleanup
👍
|
…ng wrong step response
Nice. Let's go all the way and cover these two lines as well: https://coveralls.io/builds/36884037/source?filename=control%2Fsisotool.py#L170 |
…atibility with matplotlib 1 released 10 years ago
control/tests/sisotool_test.py
Outdated
|
||
# test supply tvect | ||
sisotool(sys, tvect=np.arange(0, 1, .1)) | ||
|
||
# test discrete-time | ||
sisotool(sysdt, tvect=5) | ||
|
||
# test MIMO compatibility | ||
# sys must be siso or 2 input, 2 output | ||
with pytest.raises(ControlMIMONotImplemented): | ||
sisotool(sys221) | ||
# does not raise an error: | ||
sisotool(sys222) | ||
|
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.
I would move these to separate tests.
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.
sure, thanks for the suggestions. still getting the hang of best practices for testing
control/tests/sisotool_test.py
Outdated
assert_array_almost_equal( | ||
ax_step.lines[0].get_data()[1][:10], step_response_moved, 4) | ||
|
||
# test supply tvect | ||
sisotool(sys, tvect=np.arange(0, 1, .1)) |
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.
This still does not cover https://coveralls.io/builds/36911686/source?filename=control%2Fsisotool.py#L168
tvect
is not passed through to _SisotoolUpdate
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.
Let's see if that works
This PR adds a new feature to sisotool that allows it to show the step response of a system that is not the loop transfer function L. Some visual cleanup including reducing oversized axis tick labels.