SpectroscoPyx icon indicating copy to clipboard operation
SpectroscoPyx copied to clipboard

physics symbols

Open lemmatum opened this issue 8 years ago • 5 comments

Include a dictionary of common physics symbols. This includes Greek letters, and other symbols, such as Angstrom.

There is currently no easy way to print these symbols (in contrast to rendering LaTeX equations via matplotlib). Yet, they are all accessible by Unicode, so just need to collect them into a dictionary and associate them with LaTeX-like keys (e.g., 'alpha' and 'Alpha' for lower case and upper case alpha respectively)

lemmatum avatar Dec 09 '17 11:12 lemmatum

SymPy kind of does some of this, with pretty printing and rendering. Perhaps it would make sense to have the dictionary link to SymPy objects.

Also, do you think this should be located in SpectroscoPy or PlasmaPy?

StanczakDominik avatar Dec 09 '17 11:12 StanczakDominik

I remember having some issues with sympy printing for some use cases, though that may just be due to my ignorance. Is it possible to print things like alpha = 0.856 using sympy?

Not sure, we could stick it in plasmapy if people are interested. I just know that I'd like to have this for my own uses as I keep running into this issue.

lemmatum avatar Dec 09 '17 11:12 lemmatum

Yeah, Sympy is all right for this kind of thing. See the attached gist.

StanczakDominik avatar Dec 09 '17 11:12 StanczakDominik

Let PlasmaPy handle this and then import to avoid duplication (if possible).

lemmatum avatar Dec 16 '17 08:12 lemmatum

PlasmaPy will probably use SymPy, so we should do so as well.

lemmatum avatar Dec 21 '17 16:12 lemmatum