Changeset b9f4c26 in sasmodels


Ignore:
Timestamp:
Mar 20, 2016 11:33:53 AM (9 years ago)
Author:
richardh
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
6ad0e87, 45330ed
Parents:
b8954d7 (diff), 2c1bbcdd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of https://github.com/SasView/sasmodels

Location:
sasmodels
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/raspberry.py

    r5745f0b r2c1bbcdd  
    33---------- 
    44 
    5 The figure below shows a schematic of a large droplet surrounded by several smaller particles 
    6 forming a structure similar to that of Pickering emulsions. 
     5The figure below shows a schematic of a large droplet surrounded by several 
     6smaller particles forming a structure similar to that of Pickering emulsions. 
    77 
    88.. figure:: img/raspberry_geometry.jpg 
     
    1010    Schematic of the raspberry model 
    1111 
    12 In order to calculate the form factor of the entire complex, the self-correlation of the large droplet, 
    13 the self-correlation of the particles, the correlation terms between different particles 
    14 and the cross terms between large droplet and small particles all need to be calculated. 
     12In order to calculate the form factor of the entire complex, the self- 
     13correlation of the large droplet, the self-correlation of the particles, the 
     14correlation terms between different particles and the cross terms between large 
     15droplet and small particles all need to be calculated. 
    1516 
    16 Consider two infinitely thin shells of radii R2 and R2 separated by distance r. The general 
    17 structure of the equation is then the form factor of the two shells multiplied by the phase 
    18 factor that accounts for the separation of their centers. 
     17Consider two infinitely thin shells of radii R1 and R2 separated by distance r. 
     18The general structure of the equation is then the form factor of the two shells 
     19multiplied by the phase factor that accounts for the separation of their 
     20centers. 
    1921 
    2022.. math:: 
     
    2224    S(q) = \frac{sin(qR_1)}{qR_1}\frac{sin(qR_2)}{qR_2}\frac{sin(qr)}{qr} 
    2325 
    24 In this case, the large droplet and small particles are solid spheres rather than thin shells. Thus 
    25 the two terms must be integrated over $R_L$ and $R_S$ respectively using the weighting function of 
    26 a sphere. We then obtain the functions for the form of the two spheres: 
     26In this case, the large droplet and small particles are solid spheres rather 
     27than thin shells. Thus the two terms must be integrated over $R_L$ and $R_S$ 
     28respectively using the weighting function of a sphere. We then obtain the 
     29functions for the form of the two spheres: 
    2730 
    2831.. math:: 
    2932 
    30     \Psi_L = \int_0^{R_L}(4\pi R^2_L)\frac{sin(qR_L)}{qR_L}dR_L = \frac{3[sin(qR_L)-qR_Lcos(qR_L)]}{(qR_L)^2} 
     33    \Psi_L = \int_0^{R_L}(4\pi R^2_L)\frac{sin(qR_L)}{qR_L}dR_L =  
     34    \frac{3[sin(qR_L)-qR_Lcos(qR_L)]}{(qR_L)^2} 
    3135 
    3236.. math:: 
    3337 
    34     \Psi_S = \int_0^{R_S}(4\pi R^2_S)\frac{sin(qR_S)}{qR_S}dR_S = \frac{3[sin(qR_S)-qR_Lcos(qR_S)]}{(qR_S)^2} 
     38    \Psi_S = \int_0^{R_S}(4\pi R^2_S)\frac{sin(qR_S)}{qR_S}dR_S = 
     39    \frac{3[sin(qR_S)-qR_Lcos(qR_S)]}{(qR_S)^2} 
    3540 
    3641The cross term between the large droplet and small particles is given by: 
     
    4247 
    4348.. math:: 
    44     S_{SS} = \Psi_S^2\bigl[\frac{sin(q(R_L+\delta R_S))}{q(R_L+\delta\ R_S)}\bigr]^2 
     49    S_{SS} = \Psi_S^2\biggl[\frac{sin(q(R_L+\delta R_S))}{q(R_L+\delta\ R_S)} 
     50    \biggr]^2 
    4551 
    4652The number of small particles per large droplet, $N_p$, is given by: 
     
    5056    N_p = \frac{\phi_S\phi_{surface}V_L}{\phi_L V_S} 
    5157 
    52 where $\phi_S$ is the volume fraction of small particles in the sample, $\phi_{surface}$ is the 
    53 fraction of the small particles that are adsorbed to the large droplets, $\phi_L$ is the volume fraction 
    54 of large droplets in the sample, and $V_S$ and $V_L$ are the volumes of individual small particles and 
     58where $\phi_S$ is the volume fraction of small particles in the sample, 
     59$\phi_{surface}$ is the fraction of the small particles that are adsorbed to 
     60the large droplets, $\phi_L$ is the volume fraction of large droplets in the 
     61sample, and $V_S$ and $V_L$ are the volumes of individual small particles and 
    5562large droplets respectively. 
    5663 
    57 The form factor of the entire complex can now be calculated including the excess scattering length 
    58 densities of the components $\Delta\rho_L$ and $\Delta\rho_S$, where $\Delta\rho_x = |\rho_x-\rho_{solvent}|$ : 
     64The form factor of the entire complex can now be calculated including the excess 
     65scattering length densities of the components $\Delta\rho_L$ and $\Delta\rho_S$, 
     66where $\Delta\rho_x = |\rho_x-\rho_{solvent}|$ : 
    5967 
    6068.. math:: 
    6169 
    62     P_{LS} = \frac{1}{M^2}\bigl[(\Delta\rho_L)^2V_L^2\Psi_L^2+N_p(\Delta\rho_S)^2V_S^2\Psi_S^2 
    63                 + N_p(1-N_p)(\Delta\rho_S)^2V_S^2S_{SS} + 2N_p\Delta\rho_L\Delta\rho_SV_LV_SS_{LS} 
     70    P_{LS} = \frac{1}{M^2}\bigl[(\Delta\rho_L)^2V_L^2\Psi_L^2 
     71                +N_p(\Delta\rho_S)^2V_S^2\Psi_S^2 
     72                + N_p(1-N_p)(\Delta\rho_S)^2V_S^2S_{SS} 
     73                + 2N_p\Delta\rho_L\Delta\rho_SV_LV_SS_{LS}\bigr] 
    6474 
    6575where M is the total scattering length of the whole complex : 
     
    6878    M = \Delta\rho_LV_L + N_p\Delta\rho_SV_S 
    6979 
    70 In a real system, there will ususally be an excess of small particles such that some fraction remain unbound. 
    71 Therefore the overall scattering intensity is given by: 
     80In a real system, there will ususally be an excess of small particles such that 
     81some fraction remain unbound. Therefore the overall scattering intensity is 
     82given by: 
    7283 
    7384.. math:: 
    74     I(Q) = I_{LS}(Q) + I_S(Q) = (\phi_L(\Delta\rho_L)^2V_L + \phi_S\phi_{surface}N_p(\Delta\rho_S)^2V_S)P_{LS} 
     85    I(Q) = I_{LS}(Q) + I_S(Q) = (\phi_L(\Delta\rho_L)^2V_L +  
     86            \phi_S\phi_{surface}N_p(\Delta\rho_S)^2V_S)P_{LS} 
    7587            + \phi_S(1-\phi_{surface})(\Delta\rho_S)^2V_S\Psi_S^2 
    7688 
    77 A useful parameter to extract is the fraction of the surface area of the large droplets that is covered by small 
    78 particles. This can be calculated from the model parameters as: 
     89A useful parameter to extract is the fraction of the surface area of the large 
     90droplets that is covered by small particles. This can be calculated from the 
     91model parameters as: 
    7992 
    8093.. math:: 
     
    8598---------- 
    8699 
    87 K Larson-Smith, A Jackson, and D C Pozzo, *Small angle scattering model for Pickering emulsions and raspberry* 
    88 *particles*, *Journal of Colloid and Interface Science*, 343(1) (2010) 36-41 
     100K Larson-Smith, A Jackson, and D C Pozzo, *Small angle scattering model for 
     101Pickering emulsions and raspberry particles*, *Journal of Colloid and Interface 
     102Science*, 343(1) (2010) 36-41 
    89103 
    90104**Author:** Andrew Jackson **on:** 2008 
  • sasmodels/sesans.py

    rd459d4e ra154ad16  
    2626    q_max is determined by the acceptance angle of the SESANS instrument. 
    2727    """ 
     28    from sas.sascalc.data_util.nxsunit import Converter 
     29 
    2830    q_min = dq = 0.1 * 2*pi / Rmax 
    29     return np.arange(q_min, q_max, dq) 
     31    return np.arange(q_min, Converter("1/A")(q_max[0], units=q_max[1]), dq) 
    3032     
    3133def make_all_q(data): 
  • sasmodels/models/gauss_lorentz_gel.py

    raa2edb2 rb8954d7  
    22This model calculates the scattering from a gel structure, 
    33but typically a physical rather than chemical network. 
    4 It is modeled as a sum of a low-q exponential decay plus 
    5 a lorentzian at higher-q values. 
     4It is modeled as a sum of a low-q exponential decay (which happens to 
     5give a functional form similar to Guinier scattering, so interpret with  
     6care) plus a Lorentzian at higher-q values. See also the gel_fit model. 
    67 
    78Definition 
     
    1617$\Xi$ is the length scale of the static correlations in the gel, 
    1718which can be attributed to the "frozen-in" crosslinks. 
    18 $\xi is the dynamic correlation length, which can be attributed to the 
     19\ |xi|\ is the dynamic correlation length, which can be attributed to the 
    1920fluctuating polymer chains between crosslinks. 
    20 $IG(0)$ and $IL(0)$ are the scaling factors for each of these structures. 
     21$I_G(0)$ and $I_L(0)$ are the scaling factors for each of these structures. 
    2122Think carefully about how these map to your particular system! 
    2223 
  • sasmodels/models/gel_fit.py

    raa2edb2 rb8954d7  
    88and a longer distance (denoted here as $a2$ ) needed to account for the static 
    99accumulations of polymer pinned down by junction points or clusters of such 
    10 points. The latter is derived from a simple Guinier function. 
     10points. The latter is derived from a simple Guinier function. Compare also the  
     11gauss_lorentz_gel model. 
    1112 
    1213 
     
    3334 
    3435 
    35 Reference 
    36 --------- 
     36References 
     37---------- 
    3738 
    3839Mitsuhiro Shibayama, Toyoichi Tanaka, Charles C Han, 
     
    6061# pylint: disable=bad-whitespace, line-too-long 
    6162#             ["name", "units", default, [lower, upper], "type","description"], 
    62 parameters = [["guinier_scale",    "cm^{-1}",   1.7, [-inf, inf], "", "Guinier length scale"], 
    63               ["lorentzian_scale", "cm^{-1}",   3.5, [-inf, inf], "", "Lorentzian length scale"], 
     63parameters = [["guinier_scale",    "cm^-1",   1.7, [-inf, inf], "", "Guinier length scale"], 
     64              ["lorentzian_scale", "cm^-1",   3.5, [-inf, inf], "", "Lorentzian length scale"], 
    6465              ["gyration_radius",  "Ang",     104.0, [2, inf],    "", "Radius of gyration"], 
    6566              ["fractal_exp",      "",          2.0, [0, inf],    "", "Fractal exponent"], 
Note: See TracChangeset for help on using the changeset viewer.