xray_lines output's keys as siegbahn_symbol though docstring says iupac
wholden opened this issue · 4 comments
Minor issue in documentation for the xray_lines function.
Since the xray_edges returns keys as IUPAC, maybe it would be best to make it consistent between them. Perhaps a conversion function between IUPAC and Siegbahn would be useful, as they're always tricky to go back and forth.
If it's worth changing, I could probably figure out how to make the pull request, but I haven't done much github collaboration.
In xray_lines definition:
Documentation:
(596) Returns:
(597) dictionary: keys of lines (iupac symbol), values of Xray Lines
Code:
(632-634)
for r in row.all():
out[str(r.siegbahn_symbol)] = XrayLine(r.emission_energy, r.intensity,
r.initial_level, r.final_level)
After I commented, I think I realized that it was done that way since the IUPAC requires specification of initial and final level. Perhaps just change the docstring then. The inital and final levels are easily accessible from the output.
@wholden I'm definitely in favor of consistent documentation!
For whether to prefer IUPAC or Siegbahn notation, I don't have a strong preference. IUPAC is definitely clearer, but I don't anyone who says "L-M4,5" in place of "L alpha". If the xray_lines
result uses Siegbahn symbol as the key but includes initial and final levels in the value, maybe it's OK (after the docstring is corrected)? It's so little data that maybe xray_lines
could include both Siegbahn and IUPAC keys, giving twice as many entries?
A Siegbahn<->IUPAC conversion tool would be very nice.
If you're up for making any of these changes, that would be great. If not, let me know and I'll try to do it.