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

Support ion object creation with roman numeral notation #19

Closed
wtbarnes opened this issue Feb 26, 2018 · 2 comments · Fixed by #123
Closed

Support ion object creation with roman numeral notation #19

wtbarnes opened this issue Feb 26, 2018 · 2 comments · Fixed by #123

Comments

@wtbarnes
Copy link
Owner

Currently, ion objects can only be created using Arabic numerals, e.g.

import fiasco
fiasco.IonBase('Fe 5')
fiasco.IonBase('Fe +4')

Given that ions are commonly denoted using roman numerals, i.e. Fe V is Fe 5 or Fe +4, it would be nice to be able create ions as

fiasco.IonBase('Fe V')
@namurphy
Copy link
Contributor

namurphy commented Apr 9, 2018

We recently added this capability for Particle class instances in PlasmaPy, so we can now do things like:

>>> from plasmapy.atomic import Particle
>>> O_VI = Particle("O VI")
>>> O_VI.ionic_symbol
'O 5+'

This was implemented using the roman package in PlasmaPy/PlasmaPy#290, in case you'd like to take a look.

@wtbarnes
Copy link
Owner Author

wtbarnes commented Apr 9, 2018

Oh that is neat. Thanks for the heads up! I actually already use the plasmapy.atomic module to handle all of the different ways to create an ion or element with a string representation (see the ion Base class) so presumably this new functionality would be easy to pull in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants