Skip to content

Minor sesans revisions - #1

Closed
rprospero wants to merge 0 commit into
SasView:masterfrom
rprospero:master
Closed

Minor sesans revisions#1
rprospero wants to merge 0 commit into
SasView:masterfrom
rprospero:master

Conversation

@rprospero

Copy link
Copy Markdown
Contributor

This patch makes two minor changes. First, the sesansfit example is updated to pull from sascalc, instead of directly from sas. This is just to match the other updates from the cleanup.

The second patch is a vectorisation of the Hankel transform via numpy that gives a nice speedup at the cost of a bit more memory for intermediate values.

@pkienzle

Copy link
Copy Markdown
Contributor

sesansdemo.py should eventually be removed, though presumably after the cosine transform has been incorporated.

Have you tested that inner/outer is faster or slower than before? Outer creates a large matrix and inner collapses it again. For large matrices I've found that the loop can be faster.

@rprospero

Copy link
Copy Markdown
Contributor Author

I've run some tests on the matrix version of the SESANS code versus the for
loop version. With our example data sets, the vector code runs about 60%
faster.

Now, if I increase our maximum feature size by a couple of orders of
magnitude, going beyond what can be measured on any real instrument, the
two methods run at the same speed, within a percent or two of each other.
If we want a guaranteed speed improvement, I have a modified version of the
vector code that performs the Bessel function calculation in place and has
been strictly faster on every test that I've thrown at it. I can submit a
new pull request with the modified code.

On Wed, Mar 16, 2016 at 10:37 PM, Paul Kienzle notifications@github.com
wrote:

sesansdemo.py should eventually be removed, though presumably after the
cosine transform has been incorporated.

Have you tested that inner/outer is faster or slower than before? Outer
creates a large matrix and inner collapses it again. For large matrices
I've found that the loop can be faster.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#1 (comment)

@pkienzle

Copy link
Copy Markdown
Contributor

Let me know when you are ready for me to pull.

@rprospero rprospero closed this Mar 18, 2016
butlerpd pushed a commit that referenced this pull request Jul 5, 2026
…-functionality

Copilot checked it using formula of the paper.
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