sisotool small visual cleanup, new feature to show step response of different input-output than loop#531
Merged
bnavigator merged 7 commits intopython-control:masterfrom Feb 7, 2021
Conversation
…sys) by providing a 2-input, 2-output system; some visual cleanup
Contributor
|
👍
|
…ng wrong step response
Contributor
Author
Contributor
|
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
bnavigator
reviewed
Feb 5, 2021
Comment on lines
124
to
137
|
|
||
| # 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) | ||
|
|
Contributor
There was a problem hiding this comment.
I would move these to separate tests.
Contributor
Author
There was a problem hiding this comment.
sure, thanks for the suggestions. still getting the hang of best practices for testing
bnavigator
reviewed
Feb 5, 2021
control/tests/sisotool_test.py
Outdated
| ax_step.lines[0].get_data()[1][:10], step_response_moved, 4) | ||
|
|
||
| # test supply tvect | ||
| sisotool(sys, tvect=np.arange(0, 1, .1)) |
Contributor
There was a problem hiding this comment.
This still does not cover https://coveralls.io/builds/36911686/source?filename=control%2Fsisotool.py#L168
tvect is not passed through to _SisotoolUpdate
Contributor
Author
There was a problem hiding this comment.
Let's see if that works
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.