scikit-beam / XrayDB

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

ENH/API: Use namedtuples more. #2

Closed danielballan closed 8 years ago

danielballan commented 8 years ago

Examples:

In [26]: x.xray_lines('Na')
Out[26]:
{'Ka1': Line(emission_energy=1040.3, intensity=0.66569, initial_level='K',
final_level='L3'),
 'Ka2': Line(emission_energy=1040.4, intensity=0.334176, initial_level='K',
 final_level='L2'),
  'Ka3': Line(emission_energy=1007.3, intensity=0.000134003, initial_level='K',
  final_level='L1')}

In [27]: x.corehole_width('Hg', 'O2')
Out[27]: [CoreHoleWidth(atomic_number=80, edge='O2', width=0.1)]

Note: This breaks the API of XrayDB.corehole_width.

newville commented 8 years ago

Great!