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 latex_str attribute to Particle #2640

Open
namurphy opened this issue Apr 16, 2024 · 0 comments · May be fixed by #2642
Open

Add latex_str attribute to Particle #2640

namurphy opened this issue Apr 16, 2024 · 0 comments · May be fixed by #2642
Labels
plasmapy.particles Related to the plasmapy.particles subpackage

Comments

@namurphy
Copy link
Member

We should add a Particle.latex_str attribute to have a LaTeX representation of particle symbols. For example, Particle("p") could return something like r"p$^+$".

We should make sure that we do this consistently with other latex_str attributes in PlasmaPy, such as for the fit functions.

This issue is partially a prerequisite for #2639.

We might consider adding a CustomParticle.latex_str in there too, probably defaulting to CustomParticle.symbol, whilst letting it be overridden by users.

@namurphy namurphy added the plasmapy.particles Related to the plasmapy.particles subpackage label Apr 16, 2024
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

Successfully merging a pull request may close this issue.

1 participant