-
Notifications
You must be signed in to change notification settings - Fork 30
Problem with slit smearing (Trac #312) #347
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
Comments
Trac update at
comparison of IGOR vs SasView slit smearing of ellipsoid model |
Trac update at
Igor generated slit smeared ellipsoid model data |
Trac update at
Paul Kienzle has identified a real problem. Somewhere along the line someone must have not understood something and removed the code tha extends the model far enough beyond the last data point to be able to properly compute the smeared value a that point. for slit smearing this is of course HUGE leading to the high q data (up to 1/2 of the data in fact depending on the model) of slit smeared data to be incorectely modeled. This should probably be addressed to zeroth order before a release.
|
Trac update at I compared both Igor and sasview to a direct implementation of the slit smearing integral using adaptive integration. Although neither is correct, the Igor implementation is much closer. Looking at the code in sasview, I do not see where the residual term is added. This is the power law approximation to the tail of the distribution from q_max to q_max + Delta q_vertical. Maybe that is enough to explain the difference. I implemented replacement resolution functions in sasmodels, though I do not yet use them in the fit. The basic idea is to continue to use a weight matrix, but allow it to be non-square, with calculated q values extrapolated to the full range of the resolution function. At least for the test problem (spheres of 6 micro radius), rectangular integration gets with 2.5% relative error for about the same number of evaluations. Trapezoid and Simpson’s rule don’t do any better. The attached file (slit_test.py) will let you explore the various implementations. It contains a python implementation of the sphere model so that it depends only on scipy, numpy and matplotlib. |
Trac update at |
Trac update at Made slit_test.py into a GIST so that we can edit it.
Things to try:
These can be tried independently or together. |
Trac update at |
Trac update at
The gross error has been removed from sasview, but we should still be able to do better with some of the ideas above. Moving the ticket to sasmodels for the next release.
|
Trac update at
|
Trac update at |
Reported by Matthew Wasbrough:
I have been playing with the beta of sasview, although this problem is also on the release version. If you create a model data set in Igor using the Uniform_Ellipsoid model then recreate the model in sasview using the EllipsoidModel, and using a custom slit smear in sasview of 0.117 the two models do not line up. I believe this is something in sasview and the way it calculates smearing.
This was something I found while at NIST and think I told you about, however getting Bumps running was more of a focus at the time. I wanted to make sure this was documented and you knew about it.
I have attached a test data set from Igor using the following parameters
background: 0
radius_a: 500
radius_b: 15000
scale: 0.05
sldEll: 1e-6
sldSolv: 6e-6
I also attach a pdf of the plot from sasview of the comparison between the two data sets.
Migrated from http://trac.sasview.org/ticket/312
The text was updated successfully, but these errors were encountered: