Update nyquist_plot to call nyquist_response correctly#1096
Merged
murrayrm merged 2 commits intopython-control:mainfrom Jan 16, 2025
Merged
Update nyquist_plot to call nyquist_response correctly#1096murrayrm merged 2 commits intopython-control:mainfrom
murrayrm merged 2 commits intopython-control:mainfrom
Conversation
slivingston
reviewed
Jan 15, 2025
Member
slivingston
left a comment
There was a problem hiding this comment.
Confirmed that this fixes the error and the test catches it. I found a couple of small misprints; else, this is good to merge.
control/tests/response_test.py
Outdated
| # processed by _response(), then we need to make sure that arguments are | ||
| # properly passed from _plot() to _response(). The unit tests in this file | ||
| # make sure that this functionality is implemented properly across all | ||
| # *relevan* _response/_map/plot pairs. |
Member
There was a problem hiding this comment.
Suggested change
| # *relevan* _response/_map/plot pairs. | |
| # *relevant* _response/_map/plot pairs. |
control/tests/response_test.py
Outdated
| # input_output_response time_response_plot no passthru args | ||
| # nyquist_response nyquist_plot included below | ||
| # pole_zero_map pole_zero_plot no passthru args | ||
| # root_locus_map pole_zero_plot included below |
Member
There was a problem hiding this comment.
Suggested change
| # root_locus_map pole_zero_plot included below | |
| # root_locus_map root_locus_plot included below |
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 addresses issue #1095, where some arguments to
nyquist_plotwere not being processed correctly. The issue was that not all arguments tonyquist_plotthat needed to be passed through for processing innyquist_responsewere listed. The fix was to pass a dictionary of keywords tonyquist_responsein a way that it could pop elements off of the dictionary that it processed, leaving only those thatnyquist_plotneeds to handle.I also added some unit tests that expose this bug and also check to make sure that all of other relevant response/plot function pairs pass on arguments correctly.