wtbarnes / fiasco

Python interface to the CHIANTI atomic database
http://fiasco.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
21 stars 16 forks source link

Clarity on atomic notation #10

Closed wtbarnes closed 5 years ago

wtbarnes commented 6 years ago

From @namurphy, copied from a separate thread:

One thing I was wondering about was how fiasco would handle atomic notation. I'm not so much a fan of notation like "fe_16" or "Fe XVI" since the off-by-one difference from the charge state always confuses me. I personally much prefer something like "Fe 16+" since that has the charge state built right in. At the same time, most astronomers are used to "Fe XVI". Anyway, separate question, but just thought I'd mention it.

The issue then is how exactly to denote/specify an ion?

Currently, in the IonBase class (and all derivative classes), an ion is instantiated using the notation '{atomic symbol}_{ionization stage}', e.g. 'fe_16' for Fe XVI, Fe 15+. Then, several attributes are set in the following manner,

So we store both the charge state (the physical charge on the ion in units +e) and what I've called the "ionization stage" (charge state +1). The CHIANTI database still denotes all ions using the ionization stage rather than the charge state so I think it is important to keep that notation around (although I agree it is confusing).

Thinking about it a bit more, perhaps the most ideal case would be if wee could instantiate ion objects using one notation or the other, e.g.

>>> ion1 = IonBase('Fe 15+')
>>> ion2 = IonBase('Fe XVI')

This way, the use of Roman numerals versus Arabic numerals clearly denotes the difference between the two systems (as opposed to using Arabic for both the ionization stage and charge state). We could then continue to use the ionization stage variable internally (but sparingly) where needed (e.g. when reading from the database), but the user would not be exposed to this confusion.

wtbarnes commented 5 years ago

fiasco now supports ion creation through either charge state (e.g. +15 for Fe 16) or spectroscopic (e.g. 16 for Fe 16) notation. Support for roman numerals is still a TODO, but is covered by #19.