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

Simplified interface for computing I(q,dq) #563

Merged
merged 6 commits into from
Jun 27, 2023

Conversation

pkienzle
Copy link
Contributor

@pkienzle pkienzle commented Mar 30, 2023

The PR provides a calculator for computing I(q), I(qx, qy) and sesans G(ξ)-G(0).

To include support for single-point calculations a number of other pieces of code needed to change, including the resolution calculators and the SESANS calculator. These are on the SasView code path so need to be checked carefully.

The sasmodels internal data shim was modified to allow initialization with lists rather than numpy arrays. This does not affect SasView calculations.

The warning for invalid arcsin in SESANS was removed, and the mask updated to handle NaN values. This may affect the results of some SESANS calculations since the previous code did not exclude unreachable q values.

While debugging I noticed that the call to the calculator ignored misnamed model parameters. I modified the call to check that all parameters are used. This broke the hardsphere model tests since radius_effective is not a polydisperse parameter (PR#562). The tests will fail until that PR is pulled into master.

The call checks will not affect sasview, which goes through the SasviewModel code path to call the calculation kernel, but those using sasmodels directly with bumps may see errors popping up in their models if they have misnamed parameters.

@butlerpd
Copy link
Member

butlerpd commented Apr 5, 2023

need somebody with sesans interest/knowledge to take a look - note the detailed writeup referenced in #564 ... @rmdalgliesh?

sasmodels/data.py Outdated Show resolved Hide resolved
sasmodels/resolution.py Show resolved Hide resolved
sasmodels/direct_model.py Show resolved Hide resolved
sasmodels/direct_model.py Outdated Show resolved Hide resolved
sasmodels/direct_model.py Outdated Show resolved Hide resolved
sasmodels/direct_model.py Outdated Show resolved Hide resolved
sasmodels/direct_model.py Outdated Show resolved Hide resolved
sasmodels/direct_model.py Outdated Show resolved Hide resolved
sasmodels/direct_model.py Show resolved Hide resolved
Copy link
Contributor

@caitwolf caitwolf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the infinite slit cases and the code worked as expected. It no longer ignored the slit resolution if only one of the length and width was provided.

@caitwolf caitwolf merged commit 366f9b3 into master Jun 27, 2023
24 checks passed
@caitwolf caitwolf deleted the pr-simplified-Iq-interface branch June 27, 2023 15:35
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.

None yet

4 participants