Skip to content
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

Merged
merged 5 commits into from
Feb 21, 2024
Merged

Conversation

jl-wynen
Copy link
Member

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.

- ``bound_coherent_scattering_cross_section``
- ``bound_incoherent_scattering_cross_section``
- ``total_bound_scattering_cross_section``
- ``absorption_cross_section``
Copy link
Member

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

Copy link
Member Author

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

Copy link
Member Author

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.

Copy link
Member

@YooSunYoung YooSunYoung left a 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.

@jl-wynen
Copy link
Member Author

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 NeutronAtom class.

@jl-wynen jl-wynen merged commit a3745da into main Feb 21, 2024
6 checks passed
@jl-wynen jl-wynen deleted the scattering-table branch February 21, 2024 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants