Fix marginplot variable assignment for >5 phase margins#1056
Merged
Conversation
The block that limits the displayed phase margins to the 5 smallest mistakenly assigned to `wgm`/`gm` (the gain-margin display variables) instead of `wpm`/`pm`, overwriting the gain-margin data with phase-margin data whenever `length(pm) > 5`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
This is an automated message.
|
|
This is an automated message.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1056 +/- ##
=======================================
Coverage 91.61% 91.61%
=======================================
Files 42 42
Lines 5653 5653
=======================================
Hits 5179 5179
Misses 474 474 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.












✔️
Summary
When a system has more than 5 phase margins, the code that filters to the 5 smallest assigned the filtered values to
wgm/gm(the gain-margin display variables) instead ofwpm/pm. This silently overwrote gain-margin data with phase-margin data on the plot.Likely copy-paste from the analogous block immediately above (which correctly filters gain margins).
Test plan
marginplotfor a system with more than 5 phase margins and verify the gain-margin annotations are now correct.test_plots.jlstill passes.🤖 Generated with Claude Code