scikit-beam / XrayDB

[ARCHIVED] Atomic data compiled by Elam, Ravel and Sieber. Check https://github.com/xraypy/XrayDB
9 stars 6 forks source link

xray_lines output's keys as siegbahn_symbol though docstring says iupac #17

Closed wholden closed 6 years ago

wholden commented 6 years ago

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)

wholden commented 6 years ago

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.

newville commented 6 years ago

@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.

wholden commented 6 years ago

@newville I'd be up for incorporating these changes. I'll fix the docstring, and sort out the functionality like we discussed and put it in a pull request.

PS I'll be visiting APS in a couple weeks for a beamrun. I'll send you an email and maybe I could drop by and say hi.

newville commented 6 years ago

@wholden Great! Yeah, drop by any time!