Opened 18 months ago

Last modified 4 months ago

#1067 new enhancement

multiple scattering

Reported by: pkienzle Owned by:
Priority: major Milestone: SasView 5.0.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

sasmodels/explore/multiscat.py demonstrates how to do a multiple scattering calculation with an FFT.

This code is not ready to go into sasview.

(1) There needs to be some code clean up in sasview/sasmodels before this can apply. I set up the calculation as a resolution function, but background needs careful handling. True background needs to be moved out of the I(q) calculation. "Background" due to incoherent scattering in the sample _is_ subject to multiple scattering, and will need to be applied beforehand. The instrumental resolution will apply after the multiple scattering calculation, so resolutions need to stack. This will require a reorganization of resolution and q-samples is sasmodels (#717 and others). Oriented USANS (#610) will be easy to implement after reorg.

(2) The calculation is slow (1.5 s for multiple scattering vs. 0.001 s for single scattering in cylinder model). There should be lots of room for speedup using GPUs. I put some code into multiscat.py which shows how this might be implemented, but didn't try to make it run.

(3) Rather than moving data back and forth between the GPU for calculating the model then calculating the resolution, we can rearrange the code so that it stays there the whole time. The reorganization in (1) should be done with this in mind. The existing resolution functions will need to be updated to make use of the GPU, including SESANS.

Change History (4)

comment:1 Changed 18 months ago by richardh

Thank you Paul (K) this looks very interesting. Any chance you could render the docs to a page on the trac wiki to make them easier to read.

How reliable is the method ? e.g. will it deal well with sharp Bragg peaks on top of a relatively smooth SANS pattern.

Would be good to make sure that we save the raw I(Q) before the multiple scatter smearing.

comment:2 Changed 17 months ago by smk78

Grethe Jensen noted that the coefficients for the different scattering orders needed modifying.

comment:3 Changed 17 months ago by smk78

From: pkienzle
Sent: 08 February 2018

I added Grethe's corrections for the weights for the individual scattering powers. It is now available from

github.com/SasView/sasmodels/blob/master/explore/multiscat.py

I reshuffled the code somewhat and changed the calculation for the max scattering term. I quick check of the cylinder model shows that it is computing the same result.

comment:4 Changed 4 months ago by pkienzle

SESANS could is now using a log-space hankel transform. Could those ideas be used to speed up the 1-D case?

Note: See TracTickets for help on using tickets.