Changeset bef029d in sasmodels for sasmodels/models


Ignore:
Timestamp:
Sep 12, 2017 9:01:49 PM (7 years ago)
Author:
butler
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
2ba5ba5
Parents:
5da1ac8 (diff), b18e650 (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.git

Location:
sasmodels/models
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/binary_hard_sphere.py

    r8f04da4 r30b60d2  
    2323    :nowrap: 
    2424 
    25     \begin{align} 
     25    \begin{align*} 
    2626    x &= \frac{(\phi_2 / \phi)\alpha^3}{(1-(\phi_2/\phi) + (\phi_2/\phi) 
    2727    \alpha^3)} \\ 
    2828    \phi &= \phi_1 + \phi_2 = \text{total volume fraction} \\ 
    2929    \alpha &= R_1/R_2 = \text{size ratio} 
    30     \end{align} 
     30    \end{align*} 
    3131 
    3232The 2D scattering intensity is the same as 1D, regardless of the orientation of 
  • sasmodels/models/core_shell_bicelle.py

    ra151caa r30b60d2  
    4141 
    4242    I(Q,\alpha) = \frac{\text{scale}}{V_t} \cdot 
    43         F(Q,\alpha)^2.sin(\alpha) + \text{background} 
     43        F(Q,\alpha)^2 \cdot sin(\alpha) + \text{background} 
    4444 
    4545where 
    4646 
    4747.. math:: 
     48    :nowrap: 
    4849 
    49     \begin{align} 
     50    \begin{align*} 
    5051    F(Q,\alpha) = &\bigg[ 
    5152    (\rho_c - \rho_f) V_c \frac{2J_1(QRsin \alpha)}{QRsin\alpha}\frac{sin(QLcos\alpha/2)}{Q(L/2)cos\alpha} \\ 
     
    5354    &+(\rho_r - \rho_s) V_t \frac{2J_1(Q(R+t_r)sin\alpha)}{Q(R+t_r)sin\alpha}\frac{sin(Q(L/2+t_f)cos\alpha)}{Q(L/2+t_f)cos\alpha} 
    5455    \bigg] 
    55     \end{align} 
     56    \end{align*} 
    5657 
    5758where $V_t$ is the total volume of the bicelle, $V_c$ the volume of the core, 
  • sasmodels/models/core_shell_bicelle_elliptical.py

    r8f04da4 r30b60d2  
    4242 
    4343    I(Q,\alpha,\psi) = \frac{\text{scale}}{V_t} \cdot 
    44         F(Q,\alpha, \psi)^2.sin(\alpha) + \text{background} 
     44        F(Q,\alpha, \psi)^2 \cdot sin(\alpha) + \text{background} 
    4545 
    46 where a numerical integration of $F(Q,\alpha, \psi)^2.sin(\alpha)$ is carried out over \alpha and \psi for: 
     46where a numerical integration of $F(Q,\alpha, \psi)^2 \cdot sin(\alpha)$ is carried out over \alpha and \psi for: 
    4747 
    4848.. math:: 
     49    :nowrap: 
    4950 
    50         \begin{align} 
     51    \begin{align*} 
    5152    F(Q,\alpha,\psi) = &\bigg[ 
    5253    (\rho_c - \rho_f) V_c \frac{2J_1(QR'sin \alpha)}{QR'sin\alpha}\frac{sin(QLcos\alpha/2)}{Q(L/2)cos\alpha} \\ 
     
    5455    &+(\rho_r - \rho_s) V_t \frac{2J_1(Q(R'+t_r)sin\alpha)}{Q(R'+t_r)sin\alpha}\frac{sin(Q(L/2+t_f)cos\alpha)}{Q(L/2+t_f)cos\alpha} 
    5556    \bigg] 
    56     \end{align} 
     57    \end{align*} 
    5758 
    5859where 
  • sasmodels/models/core_shell_ellipsoid.py

    r9f6823b r30b60d2  
    4444 
    4545.. math:: 
    46     \begin{align} 
     46    :nowrap: 
     47 
     48    \begin{align*} 
    4749    F(q,\alpha) = &f(q,radius\_equat\_core,radius\_equat\_core.x\_core,\alpha) \\ 
    4850    &+ f(q,radius\_equat\_core + thick\_shell,radius\_equat\_core.x\_core + thick\_shell.x\_polar\_shell,\alpha) 
    49     \end{align} 
     51    \end{align*} 
    5052 
    5153where 
  • sasmodels/models/fractal_core_shell.py

    r8f04da4 r64eecf7  
    3131$\rho_{solv}$ are the scattering length densities of the core, shell, and 
    3232solvent respectively, $r_c$ and $r_s$ are the radius of the core and the radius 
    33 of the whole particle respectively, $D_f$ is the fractal dimension, and |xi| the 
     33of the whole particle respectively, $D_f$ is the fractal dimension, and $\xi$ the 
    3434correlation length. 
    3535 
  • sasmodels/models/hollow_rectangular_prism.py

    r8f04da4 r30b60d2  
    3131  :nowrap: 
    3232 
    33   \begin{align} 
     33  \begin{align*} 
    3434  A_{P\Delta}(q) & =  A B C 
    3535    \left[\frac{\sin \bigl( q \frac{C}{2} \cos\theta \bigr)} 
     
    4747    \left[ \frac{\sin \bigl[ q \bigl(\frac{B}{2}-\Delta\bigr) \sin\theta \cos\phi \bigr]} 
    4848    {q \bigl(\frac{B}{2}-\Delta\bigr) \sin\theta \cos\phi} \right] 
    49   \end{align} 
     49  \end{align*} 
    5050 
    5151where $A$, $B$ and $C$ are the external sides of the parallelepiped fulfilling 
  • sasmodels/models/multilayer_vesicle.py

    r142a8e2 r64eecf7  
    3333.. math:: 
    3434 
    35      r_i &= r_c + (i-1)(t_s + t_w) && \text{ solvent radius before shell } i \\ 
    36      R_i &= r_i + t_s && \text{ shell radius for shell } i 
     35     r_i &= r_c + (i-1)(t_s + t_w) \text{ solvent radius before shell } i \\ 
     36     R_i &= r_i + t_s \text{ shell radius for shell } i 
    3737 
    3838$\phi$ is the volume fraction of particles, $V(r)$ is the volume of a sphere 
  • sasmodels/models/parallelepiped.py

    r8f04da4 r30b60d2  
    2020   Parallelepiped with the corresponding definition of sides. 
    2121 
    22 .. note:: 
    23  
    24 The three dimensions of the parallelepiped (strictly here a cuboid) may be given in 
    25 $any$ size order. To avoid multiple fit solutions, especially 
    26 with Monte-Carlo fit methods, it may be advisable to restrict their ranges. There may 
    27 be a number of closely similar "best fits", so some trial and error, or fixing of some 
    28 dimensions at expected values, may help. 
     22The three dimensions of the parallelepiped (strictly here a cuboid) may be 
     23given in *any* size order. To avoid multiple fit solutions, especially 
     24with Monte-Carlo fit methods, it may be advisable to restrict their ranges. 
     25There may be a number of closely similar "best fits", so some trial and 
     26error, or fixing of some dimensions at expected values, may help. 
    2927 
    3028The 1D scattering intensity $I(q)$ is calculated as: 
  • sasmodels/models/rpa.py

    r4f9e288 r30b60d2  
    3030    These case numbers are different from those in the NIST SANS package! 
    3131 
    32 The models are based on the papers by Akcasu et al. [#Akcasu]_ and by 
    33 Hammouda [#Hammouda]_ assuming the polymer follows Gaussian statistics such 
     32The models are based on the papers by Akcasu *et al.* and by 
     33Hammouda assuming the polymer follows Gaussian statistics such 
    3434that $R_g^2 = n b^2/6$ where $b$ is the statistical segment length and $n$ is 
    3535the number of statistical segment lengths. A nice tutorial on how these are 
    3636constructed and implemented can be found in chapters 28 and 39 of Boualem 
    37 Hammouda's 'SANS Toolbox'[#toolbox]_. 
     37Hammouda's 'SANS Toolbox'. 
    3838 
    3939In brief the macroscopic cross sections are derived from the general forms 
     
    4949  are calculated with respect to component D).** So the scattering contrast 
    5050  for a C/D blend = [SLD(component C) - SLD(component D)]\ :sup:`2`. 
    51 * Depending on which case is being used, the number of fitting parameters can  
     51* Depending on which case is being used, the number of fitting parameters can 
    5252  vary. 
    5353 
     
    5757      component are obtained from other methods and held fixed while The *scale* 
    5858      parameter should be held equal to unity. 
    59     * The variables are normally the segment lengths (b\ :sub:`a`, b\ :sub:`b`, 
    60       etc) and $\chi$ parameters (K\ :sub:`ab`, K\ :sub:`ac`, etc). 
    61  
     59    * The variables are normally the segment lengths ($b_a$, $b_b$, 
     60      etc.) and $\chi$ parameters ($K_{ab}$, $K_{ac}$, etc). 
    6261 
    6362References 
    6463---------- 
    6564 
    66 .. [#Akcasu] A Z Akcasu, R Klein and B Hammouda, *Macromolecules*, 26 (1993) 
    67    4136. 
    68 .. [#Hammouda] B. Hammouda, *Advances in Polymer Science* 106 (1993) 87. 
    69 .. [#toolbox] https://www.ncnr.nist.gov/staff/hammouda/the_sans_toolbox.pdf 
     65A Z Akcasu, R Klein and B Hammouda, *Macromolecules*, 26 (1993) 4136. 
     66 
     67B. Hammouda, *Advances in Polymer Science* 106 (1993) 87. 
     68 
     69B. Hammouda, *SANS Toolbox* 
     70https://www.ncnr.nist.gov/staff/hammouda/the_sans_toolbox.pdf. 
    7071 
    7172Authorship and Verification 
  • sasmodels/models/spherical_sld.py

    r63a7fe8 r2ad5d30  
    1818Interface shapes are as follows:: 
    1919 
    20     0: erf(|nu|*z) 
    21     1: Rpow(z^|nu|) 
    22     2: Lpow(z^|nu|) 
    23     3: Rexp(-|nu|z) 
    24     4: Lexp(-|nu|z) 
     20    0: erf($\nu z$) 
     21    1: Rpow($z^\nu$) 
     22    2: Lpow($z^\nu$) 
     23    3: Rexp($-\nu z$) 
     24    4: Lexp($-\nu z$) 
    2525 
    2626Definition 
  • sasmodels/models/star_polymer.py

    r5da1ac8 rbef029d  
    77emanating from a common central (in the case of this model) point.  It is 
    88derived as a special case of on the Benoit model for general branched 
    9 polymers\ [#CITBenoit]_ as also used by Richter ''et. al.''\ [#CITRichter]_ 
     9polymers\ [#CITBenoit]_ as also used by Richter *et al.*\ [#CITRichter]_ 
    1010 
    1111For a star with $f$ arms the scattering intensity $I(q)$ is calculated as 
  • sasmodels/models/surface_fractal.py

    r48462b0 r30b60d2  
    99 
    1010.. math:: 
     11    :nowrap: 
    1112 
     13    \begin{align*} 
    1214    I(q) &= \text{scale} \times P(q)S(q) + \text{background} \\ 
    1315    P(q) &= F(qR)^2 \\ 
     
    1517    S(q) &= \Gamma(5-D_S)\xi^{\,5-D_S}\left[1+(q\xi)^2 \right]^{-(5-D_S)/2} 
    1618            \sin\left[-(5-D_S) \tan^{-1}(q\xi) \right] q^{-1} \\ 
    17     \text{scale} &= \text{scale_factor}\, N V^2(\rho_\text{particle} - \rho_\text{solvent})^2 \\ 
     19    \text{scale} &= \text{scale factor}\, N V^1(\rho_\text{particle} - \rho_\text{solvent})^2 \\ 
    1820    V &= \frac{4}{3}\pi R^3 
     21    \end{align*} 
    1922 
    2023where $R$ is the radius of the building block, $D_S$ is the **surface** fractal 
Note: See TracChangeset for help on using the changeset viewer.