PlasmaPy / SpectroscoPyx

A community developed python package for spectroscopy.
Other
43 stars 12 forks source link

physics symbols #19

Open lemmatum opened 6 years ago

lemmatum commented 6 years ago

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)

StanczakDominik commented 6 years ago

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?

lemmatum commented 6 years ago

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.

StanczakDominik commented 6 years ago

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

lemmatum commented 6 years ago

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

lemmatum commented 6 years ago

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