Changeset a151caa in sasmodels for sasmodels/models/core_shell_bicelle.py


Ignore:
Timestamp:
Jul 28, 2017 10:49:09 PM (7 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:
404ebbd
Parents:
0bdddc2
Message:

tuned random model generator for be_polyelectrolyte, barbell, core multishell, core-shell bicelle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/core_shell_bicelle.py

    r9802ab3 ra151caa  
    1717.. figure:: img/core_shell_bicelle_parameters.png 
    1818 
    19    Cross section of cylindrical symmetry model used here. Users will have  
    20    to decide how to distribute "heads" and "tails" between the rim, face  
     19   Cross section of cylindrical symmetry model used here. Users will have 
     20   to decide how to distribute "heads" and "tails" between the rim, face 
    2121   and core regions in order to estimate appropriate starting parameters. 
    2222 
     
    2727.. math:: 
    2828 
    29     \rho(r) =  
    30       \begin{cases}  
     29    \rho(r) = 
     30      \begin{cases} 
    3131      &\rho_c \text{ for } 0 \lt r \lt R; -L \lt z\lt L \\[1.5ex] 
    3232      &\rho_f \text{ for } 0 \lt r \lt R; -(L+2t) \lt z\lt -L; 
     
    4747.. math:: 
    4848 
    49     \begin{align}     
    50     F(Q,\alpha) = &\bigg[  
     49    \begin{align} 
     50    F(Q,\alpha) = &\bigg[ 
    5151    (\rho_c - \rho_f) V_c \frac{2J_1(QRsin \alpha)}{QRsin\alpha}\frac{sin(QLcos\alpha/2)}{Q(L/2)cos\alpha} \\ 
    5252    &+(\rho_f - \rho_r) V_{c+f} \frac{2J_1(QRsin\alpha)}{QRsin\alpha}\frac{sin(Q(L/2+t_f)cos\alpha)}{Q(L/2+t_f)cos\alpha} \\ 
    5353    &+(\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} 
    5454    \bigg] 
    55     \end{align}  
     55    \end{align} 
    5656 
    5757where $V_t$ is the total volume of the bicelle, $V_c$ the volume of the core, 
     
    6363cylinders is then given by integrating over all possible $\theta$ and $\phi$. 
    6464 
    65 For oriented bicelles the *theta*, and *phi* orientation parameters will appear when fitting 2D data,  
     65For oriented bicelles the *theta*, and *phi* orientation parameters will appear when fitting 2D data, 
    6666see the :ref:`cylinder` model for further information. 
    6767Our implementation of the scattering kernel and the 1D scattering intensity 
     
    9696title = "Circular cylinder with a core-shell scattering length density profile.." 
    9797description = """ 
    98     P(q,alpha)= (scale/Vs)*f(q)^(2) + bkg,  where:  
     98    P(q,alpha)= (scale/Vs)*f(q)^(2) + bkg,  where: 
    9999    f(q)= Vt(sld_rim - sld_solvent)* sin[qLt.cos(alpha)/2] 
    100100    /[qLt.cos(alpha)/2]*J1(qRout.sin(alpha)) 
     
    147147          "core_shell_bicelle.c"] 
    148148 
     149def random(): 
     150    import numpy as np 
     151    pars = dict( 
     152        radius=10**np.random.uniform(1.3, 3), 
     153        length=10**np.random.uniform(1.3, 4), 
     154        thick_rim=10**np.random.uniform(0, 1.7), 
     155        thick_face=10**np.random.uniform(0, 1.7), 
     156    ) 
     157    return pars 
     158 
    149159demo = dict(scale=1, background=0, 
    150160            radius=20.0, 
Note: See TracChangeset for help on using the changeset viewer.