Open pkienzle opened 5 years ago
Trac update at 2018/02/05 17:49:45
: richardh commented:
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.
Trac update at 2018/02/12 12:02:28
: smk78 commented:
Grethe Jensen noted that the coefficients for the different scattering orders needed modifying.
Trac update at 2018/02/12 12:03:39
: smk78 commented:
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.
Trac update at 2019/03/28 23:21:34
: pkienzle commented:
SESANS could is now using a log-space hankel transform. Could those ideas be used to speed up the 1-D case?
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 (#839 and others). Oriented USANS (#742) 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.
Migrated from http://trac.sasview.org/ticket/1067