-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a function to access scattering parameters #497
Conversation
src/scippneutron/atoms/__init__.py
Outdated
- ``bound_coherent_scattering_cross_section`` | ||
- ``bound_incoherent_scattering_cross_section`` | ||
- ``total_bound_scattering_cross_section`` | ||
- ``absorption_cross_section`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why dict, not a dataclass...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question! Lazyness, I guess. Changing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed it. I changed the field names to be more concise because now we have a docstring to provider more info.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we also have to store similar things later...?
Cause, then we should probably name the module something more generic, like data
or references
.
I don't know. But 'data' is taken. TBH, the current name is motivated by Mantid's |
This will be needed for scipp/essdiffraction#22 and many other similar corrections.
I chose this particular implementation because most users will only need parameters for a handful elements at a time. So there is no need to load all of them or initialise all during import like in Mantid. Also, the format is simple, portable, and relatively compact.