diffsims
diffsims copied to clipboard
Simplify getting atomic scattering parameters
Is your feature request related to a problem? Please describe. There are now multiple parametrizations of atomic scattering parameters in the code:
- Doyle-Turner: https://github.com/pyxem/diffsims/blob/master/diffsims/structure_factor/atomic_scattering_parameters.py#L39
- International Tables (xtables): https://github.com/pyxem/diffsims/blob/master/diffsims/utils/atomic_scattering_params.py#L22
- Lobato: https://github.com/pyxem/diffsims/blob/master/diffsims/utils/lobato_scattering_params.py#L25
- Peng: https://github.com/pyxem/diffsims/blob/master/diffsims/utils/discretise_utils.py#L907
- Kirkland: https://github.com/pyxem/diffsims/blob/master/diffsims/utils/scattering_params.py#L30
Describe the solution you'd like
- All parametrizations should be placed in one (it's own?) module (directory).
- The module's location should probably be in the
diffsims.structure_factor
module, which makes most sense? - The module should have one public function taking in preferably a diffpy.structure.Atom with an element ID in
Atom.element
(like "H", "Ni", etc.), a string or an integer, and which parametrization of the above to use. The parameters are returned.
Got no time for this unfortunately, hopefully someone else can pick this up.
@hakonanes any thoughts on this? I was going to add in ionic scattering parameters (I guess why not right) and figured I should go all the way if I'm doing that.
I was thinking that we set up each table in the form of a nested dict with:
{element:
{a=[a1,a2, ..., an],
b=[b1,b2,...., bn],
z= Atomic Number,
charge = ionic charge}
This would obviously be an improvement to the API, but unless somebody needs it urgently I think we should deprioritise it (at least until #201 and it's support PR are in). Obviously if @CSSFrancis is using ionic scattering day-to-day we should pick it back up.
@pc494 I'm not using them and I should probably focus my efforts a bit more so I'll leave this at I'll come back to it unless someone else needs it.
Releasing a 1.0.0 version of pyxem is already looking pretty daunting but we see getting there slowly.