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

Create class to represent MHD normalizations #1029

Draft
wants to merge 72 commits into
base: main
Choose a base branch
from

Conversation

namurphy
Copy link
Member

This PR will add a class that represents a particular system of normalizations that is commonly used for the equations of MHD, in particular for simulations and theory where we can't be bothered to deal with units. I'm just getting started on this, but will probably use some commits that I had temporarily had in #859, though I ultimately decided to reduce the scope of that PR to an abstract base class. This partially addresses #808, but there are other common normalizations that will need to be added (hence the abstract base class).

At the moment I'm thinking that it would be good to allow the inputs to be Quantity instances with the value of the normalization coefficient, Unit instances (for example if we want to normalize length to 1 * u.mm, or a ParticleLike object (since the choice of ion matters when going between mass density and number density). It'd also be good to be flexible in what inputs the user may provide. I usually set L, n, and B, but others might normalize to different things. I'm also wondering if there would be a good way to allow users to specify that the function to normalize length to would be, e.g., the ion inertial length or gyroradius.

@codecov
Copy link

codecov bot commented Feb 22, 2021

Codecov Report

Attention: Patch coverage is 75.89286% with 27 lines in your changes are missing coverage. Please review.

Project coverage is 94.96%. Comparing base (2a6cf7f) to head (85b1a92).

Files Patch % Lines
src/plasmapy/simulation/normalizations.py 74.52% 24 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1029      +/-   ##
==========================================
- Coverage   95.18%   94.96%   -0.23%     
==========================================
  Files         103      104       +1     
  Lines        9412     9524     +112     
  Branches     2153     2182      +29     
==========================================
+ Hits         8959     9044      +85     
- Misses        276      300      +24     
- Partials      177      180       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@namurphy namurphy added this to the 0.8.0 milestone Jul 13, 2021
@namurphy namurphy mentioned this pull request Oct 20, 2021
10 tasks
@namurphy namurphy modified the milestones: 0.8.0, 0.9.0 May 25, 2022
@github-actions github-actions bot added the docs PlasmaPy Docs at http:https://docs.plasmapy.org label Aug 21, 2022
@github-actions
Copy link

Thank you for contributing to PlasmaPy! The project's future depends deeply on contributors like you, so we deeply appreciate it! 🌱 The following checklist will be used by the code reviewer to help guide the code review process.

  • Overall
    • Does the PR do what it intends to do?
    • Except for very minor changes, is a changelog entry included and consistent with the changelog guide?
    • Are the continuous integration checks passing? (Most linter problems can be automagically fixed by commenting on this PR with pre-commit.ci autofix.)
  • Code
    • Is new/updated code understandable and consistent with the coding guide?
    • Are there ways to greatly simplify the implementation?
    • Are there any large functions that should be split up into shorter functions?
  • Tests
    • Are tests added/updated as required, and consistent with the testing guide?
    • Are the tests understandable?
    • Do the tests cover all important cases?
  • Docs
    • Are docs added/updated as required, and consistent with the doc guide?
    • Are the docs understandable?
    • Do the docs show up correctly in the preview, including Jupyter notebooks?

@namurphy namurphy added size: very large ≥500 lines changed and removed status: dormant PRs that are stalled labels May 26, 2023
@namurphy namurphy modified the milestones: 2023.10.0, v2024.1.0 Oct 22, 2023
@namurphy namurphy added this to the v2024.9.0 milestone Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs PlasmaPy Docs at http:https://docs.plasmapy.org plasmapy.simulation Related to the plasmapy.simulation subpackage size: very large ≥500 lines changed status: in progress testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant