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

Add aliases attribute for Particle class #1042

Open
namurphy opened this issue Feb 25, 2021 · 1 comment
Open

Add aliases attribute for Particle class #1042

namurphy opened this issue Feb 25, 2021 · 1 comment
Labels
plasmapy.particles Related to the plasmapy.particles subpackage

Comments

@namurphy
Copy link
Member

There are a lot of ways to represent particles in plasmapy.particles. Like...an electron can be "electron", "e-" ,"e", "β-", and so on. Documenting all of the special cases would be difficult and the chance of an omission is rather likely. I was thinking it'd be helpful to have add Particle.aliases as a tuple that would contain the valid aliases for a particular particle.

If we add a way for users to define new particle aliases, akin to #1040, then we'd probably be better off with something mutable like a list.

Doing this might also give us a chance to clean up some of the code that handles particle aliases too.

@namurphy namurphy added the plasmapy.particles Related to the plasmapy.particles subpackage label Feb 25, 2021
@StanczakDominik
Copy link
Member

Sounds like a lovely idea, decently simple and a good refactor!

@github-actions github-actions bot added the Stale Dormant issues & PRs which will be automatically closed if the label is not removed. label Jul 22, 2021
@namurphy namurphy removed the Stale Dormant issues & PRs which will be automatically closed if the label is not removed. label May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plasmapy.particles Related to the plasmapy.particles subpackage
Projects
None yet
Development

No branches or pull requests

2 participants