Visitar URL original
Resurrect `chemical_potential` and associated functions by JaydenR2305 · Pull Request #1678 · PlasmaPy/PlasmaPy · GitHub
Skip to content

Resurrect chemical_potential and associated functions - #1678

Merged
StanczakDominik merged 6 commits into
PlasmaPy:mainfrom
JaydenR2305:fix-chemical-potential
Aug 23, 2022
Merged

StanczakDominik merged 6 commits into
PlasmaPy:mainfrom
JaydenR2305:fix-chemical-potential

Conversation

@JaydenR2305

@JaydenR2305 JaydenR2305 commented Aug 18, 2022 •

Copy link
Copy Markdown
Member

Resolves #726

Floating point errors associated with the chemical_potential function seem to have silently been corrected

  • I have added a changelog entry for this pull request.
  • If adding new functionality, I have added tests and
    docstrings.
  • I have fixed any newly failing tests.

@github-actions github-actions Bot added plasmapy.formulary Related to the plasmapy.formulary subpackage plasmapy.formulary.quantum Related to the plasmapy.formulary.quantum module labels Aug 18, 2022
@JaydenR2305
JaydenR2305 marked this pull request as ready for review August 18, 2022 15:12
@codecov

codecov Bot commented Aug 18, 2022 •

Copy link
Copy Markdown

Codecov Report

Merging #1678 (c992ca4) into main (3f01e25) will increase coverage by 0.38%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1678      +/-   ##
==========================================
+ Coverage   97.22%   97.61%   +0.38%     
==========================================
  Files          85       85              
  Lines        8013     8018       +5     
==========================================
+ Hits         7791     7827      +36     
+ Misses        222      191      -31     
Impacted Files Coverage Δ
plasmapy/formulary/collisions.py 99.49% <100.00%> (+2.52%) ⬆️
plasmapy/formulary/quantum.py 100.00% <100.00%> (+29.54%) ⬆️
plasmapy/analysis/swept_langmuir/helpers.py 100.00% <0.00%> (ø)
plasmapy/analysis/swept_langmuir/__init__.py 100.00% <0.00%> (ø)
...mapy/analysis/swept_langmuir/floating_potential.py 100.00% <0.00%> (ø)
.../analysis/swept_langmuir/ion_saturation_current.py 100.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@JaydenR2305 JaydenR2305 changed the title Resurrect chemical_potential Resurrect chemical_potential and associated functions Aug 19, 2022
*Allow tolerance for floating point errors in evaluating Fermi integral
  * Floating point inaccuracies arising in the evaluation of the Fermi integral can result in a complex number with a very small imaginary component. So long as this component remains within a tolerance, the value is valid and the real component can be used.
@pheuer
pheuer requested a review from StanczakDominik August 22, 2022 20:44

@StanczakDominik StanczakDominik left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Huh! Fascinating that this works again. I don't exactly have anything to validate this against, but the changes look reasonable and I think we can try it out in main :) Thanks, @JaydenR2305 !

@StanczakDominik
StanczakDominik merged commit 8a19c6e into PlasmaPy:main Aug 23, 2022
@JaydenR2305
JaydenR2305 deleted the fix-chemical-potential branch August 23, 2022 17:18
namurphy added a commit to namurphy/PlasmaPy that referenced this pull request Oct 25, 2022
namurphy added a commit to namurphy/PlasmaPy that referenced this pull request Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plasmapy.formulary.quantum Related to the plasmapy.formulary.quantum module plasmapy.formulary Related to the plasmapy.formulary subpackage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

plasmapy.formulary.quantum.chemical_potential bug with powers

2 participants