You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
{
"status": "new",
"changetime": "2019-03-28T23:21:34",
"_ts": "2019-03-28 23:21:34.268138+00:00",
"description": "{{{sasmodels/explore/multiscat.py}}} demonstrates how to do a multiple scattering calculation with an FFT.\n\nThis code is not ready to go into sasview.\n\n(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.\n\n(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.\n\n(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.\n",
"reporter": "pkienzle",
"cc": "",
"resolution": "",
"workpackage": "SasView Bug Fixing",
"time": "2018-01-31T21:51:45",
"component": "SasView",
"summary": "multiple scattering",
"priority": "major",
"keywords": "",
"milestone": "SasView 5.0.0",
"owner": "",
"type": "enhancement"
}
The text was updated successfully, but these errors were encountered:
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.
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
The text was updated successfully, but these errors were encountered: