# Changeset 54a5024 in sasmodels

Ignore:
Timestamp:
Feb 8, 2018 3:17:59 PM (6 years ago)
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
e309e23
Parents:
a09d55d
Message:

multiscat: use correct weightings for the multiscattering contributions

File:
1 edited

### Legend:

Unmodified
 ra09d55d def scattering_power(Iq, n): """ Calculate the nth scattering power as a distribution.  To get the weighted contribution, scale by $\lambda^k e^{-\lambda}/k!$. """ scale = np.sum(Iq) F = _forward_fft(Iq/scale) result = scale * _inverse_fft(F**n) result = _inverse_fft(F**n) return result Given a probability p of scattering with the thickness, the expected number of scattering events, $\lambda$ is $-\log(1 - p)$, giving a Poisson weighted sum of single, double, triple, ... scattering patterns. The number of patterns used is based on coverage (default 99%).  If return_poi Poisson weighted sum of single, double, triple, etc. scattering patterns. The number of patterns used is based on coverage (default 99%). """ L = -np.log(1-p)