ISISNeutronMuon / ISISNeutronMuon/abINS_lib
Extract labels to a separate metadata tag
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 47m
- Merged PRs (30d)
- 3
Description
The CSV IsotopeData implemention in Euphonic (which will generally be used for applying neutron cross-sections) accepts element symbols with a label following a colon, e.g. `H:2`, `H:D`, `H:my-deuterium` would all be valid and recognised as having Z=1. (A will be determined from the mass and is _hopefully_ 2 for those labels...)
It would be helpful if `abinslib` is also aware of this convention (which is taken from CASTEP) and splits metadata when it is found, i.e. given an input structure with symbols `["H", "H:2"]` the metadata of resulting spectra could have line data `[{"atom_symbol": "H"}, {"atom_symbol": "H", "label": "2"}]`. This would be _very_ convenient for user plotting as they can simply apply a tag to a group of atoms that they wish to plot separately, and then call (possibly indirectly through GUI/CLI) `.group_by("label")` to arrange the results on this basis.
*Duplicated from https://github.com/pace-neutrons/abinslib/issues/35*
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how abinslib converts input structure symbols into spectra metadata; the issue names no specific file or test. Verify handling of symbols such as H:2, H:D, and H:my-deuterium, and confirm that resulting metadata separates atom_symbol from label so grouping by label can distinguish tagged atoms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100