Changeset 54a5024 in sasmodels


Ignore:
Timestamp:
Feb 8, 2018 3:17:59 PM (6 years ago)
Author:
Paul Kienzle <pkienzle@…>
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
Added
Removed
  • explore/multiscat.py

    ra09d55d r54a5024  
    170170 
    171171def scattering_power(Iq, n): 
     172    """ 
     173    Calculate the nth scattering power as a distribution.  To get the 
     174    weighted contribution, scale by $\lambda^k e^{-\lambda}/k!$. 
     175    """ 
    172176    scale = np.sum(Iq) 
    173177    F = _forward_fft(Iq/scale) 
    174     result = scale * _inverse_fft(F**n) 
     178    result = _inverse_fft(F**n) 
    175179    return result 
    176180 
     
    181185    Given a probability p of scattering with the thickness, the expected 
    182186    number of scattering events, $\lambda$ is $-\log(1 - p)$, giving a 
    183     Poisson weighted sum of single, double, triple, ... scattering patterns. 
    184     The number of patterns used is based on coverage (default 99%).  If 
    185     return_poi 
     187    Poisson weighted sum of single, double, triple, etc. scattering patterns. 
     188    The number of patterns used is based on coverage (default 99%). 
    186189    """ 
    187190    L = -np.log(1-p) 
Note: See TracChangeset for help on using the changeset viewer.