Title: fix rlocus timeout due to inefficient _default_wn calculation by murrayrm · Pull Request #527 · python-control/python-control · GitHub
Open Graph Title: fix rlocus timeout due to inefficient _default_wn calculation by murrayrm · Pull Request #527 · python-control/python-control
X Title: fix rlocus timeout due to inefficient _default_wn calculation by murrayrm · Pull Request #527 · python-control/python-control
Description: This PR fixes an obscure bug that got pointed out to me a year ago in e-mail from a colleague in Costa Rica: I have a piece of code that I run for my students. I downloaded the latest control module and it does not print the root locus any more. I think it gets stuck in an iterative process. Nothing changed in the code. I suppose something in the updated version is causing the problem. Has anybody else made a complaint about the root locus? Turns out that the problem was that he had a very unusual pole/zero pattern in which the algorithm for computing the default natural frequencies to use in plotting the grid was introduced in PR #138. The code essentially used the x-axis major ticks as the starting point for the natural frequencies and then added additional ticks to "complete" the frequencies on the y axis. The problem was that if the x-axis had tick marks that were orders of magnitude different that the y-axis, this could generate a lot of additional natural frequencies (which were subsequently removed a later point in the code). I didn't want to spend a lot of time on this fix, so I basically put in a check to see when you might end up generating an excessive number of ticks based on this heuristic and switched things so that if that happens, you use the y-axis ticks as the starting point. There's a unit test to make sure it is working right (that also covers the new code).
Open Graph Description: This PR fixes an obscure bug that got pointed out to me a year ago in e-mail from a colleague in Costa Rica: I have a piece of code that I run for my students. I downloaded the latest control modu...
X Description: This PR fixes an obscure bug that got pointed out to me a year ago in e-mail from a colleague in Costa Rica: I have a piece of code that I run for my students. I downloaded the latest control modu...
Opengraph URL: https://github.com/python-control/python-control/pull/527
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1042c91c-142b-2982-f1bc-dd08ac79d263 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A318:18EDB3:729D39B:950F4EA:697E5E35 |
| html-safe-nonce | 274788aeb71ffc19911c627e76e2e9ae8598e4c2fcb92fae2ed12a88b032f0b5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMzE4OjE4RURCMzo3MjlEMzlCOjk1MEY0RUE6Njk3RTVFMzUiLCJ2aXNpdG9yX2lkIjoiNDg0NTg5MzI1ODMxNzgxNTM0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5738465633bcba0e712387671f4a3406eb8ed59d04e7e138551fc59978bd038c |
| hovercard-subject-tag | pull_request:564516586 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-control/python-control/pull/527/files |
| twitter:image | https://avatars.githubusercontent.com/u/293362?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/293362?s=400&v=4 |
| og:image:alt | This PR fixes an obscure bug that got pointed out to me a year ago in e-mail from a colleague in Costa Rica: I have a piece of code that I run for my students. I downloaded the latest control modu... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 60279d4097367e16897439d16d6bbe4180663db828c666eeed2656988ffe59f6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python-control/python-control git https://github.com/python-control/python-control.git |
| octolytics-dimension-user_id | 2285872 |
| octolytics-dimension-user_login | python-control |
| octolytics-dimension-repository_id | 22791752 |
| octolytics-dimension-repository_nwo | python-control/python-control |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22791752 |
| octolytics-dimension-repository_network_root_nwo | python-control/python-control |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7c85641c598ad130c74f7bcc27f58575cac69551 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width