Skip to content

Fix the way pars is supplied to single resonator formulas#27

Open
SebastienJoly wants to merge 1 commit into
mainfrom
Fix_get_impedance()
Open

Fix the way pars is supplied to single resonator formulas#27
SebastienJoly wants to merge 1 commit into
mainfrom
Fix_get_impedance()

Conversation

@SebastienJoly

Copy link
Copy Markdown
Contributor

📝 Pull Request Summary

For a single resonator, the helper function get_impedance() uses:

impedance_data = imp.Resonator_longitudinal_imp(
    frequency_data, pars, wakelength
) 

However, it is not called the same way as the n resonators variant imp.n_Resonator_longitudinal_imp()
The individual Rs, Q, and f_resonant are passed instead of a pars array.

🔧 Changes Made

Thankfully, it can easily be fixed by using a starred expression, see:

impedance_data = imp.Resonator_longitudinal_imp(
    frequency_data, *pars, wakelength
) 

✅ Checklist

  • Code follows the project's style and guidelines
  • [] Added tests for new functionality
  • [] Updated documentation (mentioned in docs/ or included in examples/ and notebooks/)
  • Verified that changes do not break existing functionality (automatic tests passing)

📌 Related Issues / PRs

@SebastienJoly SebastienJoly added the bug Something isn't working label Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

🧪 Coverage Report

Name                                 Stmts   Miss  Cover
--------------------------------------------------------
iddefix/__init__.py                      7      0   100%
iddefix/_version.py                      1      0   100%
iddefix/framework.py                   345    156    55%
iddefix/objectiveFunctions.py           37     16    57%
iddefix/resonatorFormulas.py           202    142    30%
iddefix/smartBoundDetermination.py     103     14    86%
iddefix/solvers.py                      93     30    68%
iddefix/uncertainties.py                28      0   100%
iddefix/utils.py                       108     45    58%
--------------------------------------------------------
TOTAL                                  924    403    56%

Updated: 2026-07-01T13:30:51.025Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant