-
Notifications
You must be signed in to change notification settings - Fork 18
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
♻️ Refactor/calc doas with irf #839
Conversation
🔧 Add debug plotting code to evaluate doas matrix calculation Some temporary debug plotting code to evaluate the changes in implementation during the evolution of the code during the refactor.
To accommodate time-reversed oscillations the sqwidth constant is manipulated so that negative rates have a -1 sign causing a flip of the erf when this constant is used in the calculation of 'b'. Co-authored-by: Ivo <ism200@users.noreply.github.com> Co-authored-by: Sebastian Weigand <s.weigand.phy@gmail.com>
Results of refactoring so far; 2 iterations, same stating values: 1. 🤔 Start - Starting cost: 6.3345e+04 - End cost: 6.3345e+04 - rmse: 9.75e-01 - variable `a` going up to 1e106 - variable `osc` going up to 1e106 2. 🩹 Fix for reversed osciallations - Starting cost: 3.0537e+04 - End cost: 3.0006e+04 - rmse: 7.02e-01 - variable `osc` bounded to [-2, 2] - variable `a` going up to 1e106 3. 👌 More numerically stable and efficient calculation of a and b - Starting cost: 3.0537e+04 - End cost: 3.0006e+04 - rmse: 7.02e-01 - variable `osc` bounded to [-2, 2] - variable `a` bounded to [-1.5, 1.1]
Used in frequency conversion
Codecov Report
@@ Coverage Diff @@
## main #839 +/- ##
=====================================
Coverage 84.8% 84.9%
=====================================
Files 77 77
Lines 4366 4373 +7
Branches 787 786 -1
=====================================
+ Hits 3705 3713 +8
Misses 521 521
+ Partials 140 139 -1
Continue to review full report at Codecov.
|
Benchmark is done. Checkout the benchmark result page. Benchmark diff v0.4.1 vs. mainParametrized benchmark signatures: BenchmarkOptimize.time_optimize(index_dependent, grouped, weight)
Benchmark diff main vs. PRParametrized benchmark signatures: BenchmarkOptimize.time_optimize(index_dependent, grouped, weight)
|
parameter, parameter, parameter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
This code wasn't touched by this PR, but will clean up the code for the future.
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 3.61%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm
Refactor and fix
calculate_damped_oscillation_matrix_gaussian_irf
indamped_oscillation_megacomplex.py
Change summary
Checklist
Related issues:
For code related to this feature see: