Skip to content
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

Verify correctness of two methods in MaxwellianCollisionFrequencies #2333

Closed
namurphy opened this issue Sep 8, 2023 · 2 comments · Fixed by #2614
Closed

Verify correctness of two methods in MaxwellianCollisionFrequencies #2333

namurphy opened this issue Sep 8, 2023 · 2 comments · Fixed by #2614
Labels
bug: needs more info Bug descriptions that require more information for maintainers to reproduce or fix effort: low Requiring perhaps a few hours, but less than a day good first issue Good first contributions for new contributors Plasma Lv2 | Intermediate Issues that require an intermediate knowledge of plasma physics priority: low Issues & PRs of low urgency and importance that may be deferred until later Python Lv2 | Intermediate Issues that require a medium amount of knowledge of Python
Milestone

Comments

@namurphy
Copy link
Member

namurphy commented Sep 8, 2023

After a recent update of pytest that fixed a test collection bug (see pytest-dev/pytest#11237), a couple of doctests started failing in plasmapy.formulary.collisions.frequencies.MaxwellianCollisionFrequencies (see below). Essentially, these doctests were not being run before the pytest update.

It turns out that there is a discrepancy for two properties of MaxwellianCollisionFrequencies in plasmapy.formulary.collisions: Maxwellian_avg_ei_collision_freq and Maxwellian_avg_ii_collision_freq. I'm updating the docstrings in #2332 to be consistent with the new calculated values.

However, because of this discrepancy, it would be worthwhile to double check that these two properties are giving correct results.

The new doctest errors were:

_______________________________ [doctest] plasmapy.formulary.collisions.frequencies.MaxwellianCollisionFrequencies.Maxwellian_avg_ei_collision_freq _______________________________
[gw0] win32 -- Python 3.10.11 D:\a\PlasmaPy\PlasmaPy\.tox\py310-cov-all\Scripts\python.EXE
EXAMPLE LOCATION UNKNOWN, not showing all tests of that example
??? >>> electron_ion_collisions.Maxwellian_avg_ei_collision_freq
Expected:
    <Quantity 2906316911556553.5 Hz>
Got:
    <Quantity 2.80530783e+15 Hz>

D:\a\PlasmaPy\PlasmaPy\plasmapy\formulary\collisions\frequencies.py:None: DocTestFailure
_______________________________ [doctest] plasmapy.formulary.collisions.frequencies.MaxwellianCollisionFrequencies.Maxwellian_avg_ii_collision_freq _______________________________
[gw0] win32 -- Python 3.10.11 D:\a\PlasmaPy\PlasmaPy\.tox\py310-cov-all\Scripts\python.EXE
EXAMPLE LOCATION UNKNOWN, not showing all tests of that example
??? >>> ion_ion_collisions.Maxwellian_avg_ii_collision_freq
Expected:
    <Quantity 79364412.21510696 Hz>
Got:
    <Quantity 1.12238228e+08 Hz>

D:\a\PlasmaPy\PlasmaPy\plasmapy\formulary\collisions\frequencies.py:None: DocTestFailure
@namurphy namurphy added effort: low Requiring perhaps a few hours, but less than a day good first issue Good first contributions for new contributors bug: needs more info Bug descriptions that require more information for maintainers to reproduce or fix Python Lv2 | Intermediate Issues that require a medium amount of knowledge of Python Plasma Lv2 | Intermediate Issues that require an intermediate knowledge of plasma physics labels Sep 8, 2023
@namurphy namurphy added this to the 2024.1.0 milestone Sep 8, 2023
@namurphy namurphy added the priority: low Issues & PRs of low urgency and importance that may be deferred until later label Sep 8, 2023
@namurphy namurphy modified the milestones: v2024.1.0, v2024.5.0 Jan 17, 2024
@daran9
Copy link
Contributor

daran9 commented Mar 31, 2024

Hello again @namurphy! I would like to work on this if it's available.

@namurphy
Copy link
Member Author

Yes, please feel free to!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug: needs more info Bug descriptions that require more information for maintainers to reproduce or fix effort: low Requiring perhaps a few hours, but less than a day good first issue Good first contributions for new contributors Plasma Lv2 | Intermediate Issues that require an intermediate knowledge of plasma physics priority: low Issues & PRs of low urgency and importance that may be deferred until later Python Lv2 | Intermediate Issues that require a medium amount of knowledge of Python
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants