Changeset 41b1edd in sasmodels


Ignore:
Timestamp:
Dec 20, 2016 4:50:50 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
8c92abb
Parents:
e9b0ef3
Message:

round to nearest number of layers; tweak equation layout and docs

Location:
sasmodels/models
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/multilayer_vesicle.c

    r3a48772 r41b1edd  
    77          double sld_solvent, 
    88          double sld, 
    9           double n_pairs) 
     9          int n_pairs) 
    1010{ 
    1111    //calculate with a loop, two shells at a time 
     
    4747          double sld_solvent, 
    4848          double sld, 
    49           double n_pairs) 
     49          double fp_n_pairs) 
    5050{ 
     51    int n_pairs = (int)(fp_n_pairs + 0.5); 
    5152    return multilayer_vesicle_kernel(q, 
    5253           volfraction, 
  • sasmodels/models/multilayer_vesicle.py

    r041bc75 r41b1edd  
    1919 
    2020.. math:: 
     21    P(q) = \text{scale} \cdot \frac{V_f}{V_t} F^2(q) + \text{background} 
    2122 
    22     P(q) = \frac{\text{scale.volfraction}}{V_t} F^2(q) + \text{background} 
    23  
    24 where 
     23for 
    2524 
    2625.. math:: 
     26    F(q) = (\rho_\text{shell}-\rho_\text{solv}) \sum_{i=1}^{n_\text{pairs}} 
     27        \left[ 
     28          3V(R_i)\frac{\sin(qR_i)-qR_i\cos(qR_i)}{(qR_i)^3} \\ 
     29          - 3V(R_i+t_s)\frac{\sin(q(R_i+t_s))-q(R_i+t_s)\cos(q(R_i+t_s))}{(q(R_i+t_s))^3} 
     30        \right] 
    2731 
    28      F(q) = (\rho_{shell}-\rho_{solv}) \sum_{i=1}^{n\_pairs} \left[ 
    29      3V(R_i)\frac{\sin(qR_i)-qR_i\cos(qR_i)}{(qR_i)^3} \\ 
    30       - 3V(R_i+t_s)\frac{\sin(q(R_i+t_s))-q(R_i+t_s)\cos(q(R_i+t_s))}{(q(R_i+t_s))^3} 
    31      \right] 
     32and 
    3233 
     34.. math:: 
     35     R_i = r_c + (i-1)(t_s + t_w) 
    3336 
    34 where $R_i = r_c + (i-1)(t_s + t_w)$ 
    35     
    36 where $V_t$ is the volume of the whole particle, $V(R)$ is the volume of a sphere 
    37 of radius $R$, $r_c$ is the radius of the core, $\rho_{shell}$ is the scattering length  
    38 density of a shell, $\rho_{solv}$ is the scattering length density of the solvent. 
     37where $V_f$ is the volume fraction of particles, $V_t$ is the volume of the 
     38whole particle, $V(r)$ is the volume of a sphere of radius $r$, $r_c$ is the 
     39radius of the core, $\rho_\text{shell}$ is the scattering length density of a 
     40shell, $\rho_\text{solv}$ is the scattering length density of the solvent. 
    3941 
     42The outer most radius, $r_o = R_n + t_s$, is used for both the volume fraction 
     43normalization and for the effective radius for *S(Q)* when $P(Q) * S(Q)$ 
     44is applied. 
    4045 
    4146The 2D scattering intensity is the same as 1D, regardless of the orientation 
     
    4550 
    4651    q = \sqrt{q_x^2 + q_y^2} 
    47  
    48  
    49 The outer most radius 
    50  
    51 $radius + n\_pairs * thick\_shell + (n\_pairs- 1) * thick\_solvent$ 
    52  
    53 is used for both the volume fraction normalization and for the  
    54 effective radius for *S(Q)* when $P(Q) * S(Q)$ is applied. 
    5552 
    5653For information about polarised and magnetic scattering, see 
     
    7067**Author:** NIST IGOR/DANSE **on:** pre 2010 
    7168 
    72 **Last Modified by:** Piotr Rozyczko**on:** Feb 24, 2016 
     69**Last Modified by:** Piotr Rozyczko **on:** Feb 24, 2016 
    7370 
    7471**Last Reviewed by:** Paul Butler **on:** March 20, 2016 
     
    109106source = ["lib/sph_j1c.c", "multilayer_vesicle.c"] 
    110107 
     108# TODO: the following line does nothing 
    111109polydispersity = ["radius", "n_pairs"] 
    112110 
Note: See TracChangeset for help on using the changeset viewer.