Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update nyquist_plot to call nyquist_response correctly #1096

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

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

murrayrm
Copy link
Member

This PR addresses issue #1095, where some arguments to nyquist_plot were not being processed correctly. The issue was that not all arguments to nyquist_plot that needed to be passed through for processing in nyquist_response were listed. The fix was to pass a dictionary of keywords to nyquist_response in a way that it could pop elements off of the dictionary that it processed, leaving only those that nyquist_plot needs 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.

@murrayrm murrayrm linked an issue Jan 14, 2025 that may be closed by this pull request
@coveralls
Copy link

coveralls commented Jan 14, 2025

Coverage Status

coverage: 94.687% (+0.001%) from 94.686%
when pulling 54c4fd9 on murrayrm:fix_nyquist_plot-13Jan2025
into ec7dc8a on python-control:main.

@slivingston slivingston self-requested a review January 14, 2025 06:47
Copy link
Member

@slivingston slivingston left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed that this fixes the error and the test catches it. I found a couple of small misprints; else, this is good to merge.

# 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.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# *relevan* _response/_map/plot pairs.
# *relevant* _response/_map/plot pairs.

# 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# root_locus_map pole_zero_plot included below
# root_locus_map root_locus_plot included below

@murrayrm murrayrm merged commit 0ff0452 into python-control:main Jan 16, 2025
22 checks passed
@murrayrm murrayrm added this to the 0.10.2 milestone Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nyquist plot indent direction doesn't seem to work
3 participants