Changeset 785cbec in sasmodels


Ignore:
Timestamp:
Aug 5, 2016 1:03:19 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
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:
c8de1bd
Parents:
e187b25
Message:

doc fixes

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • doc/conf.py

    r39674a0 r785cbec  
    3636              #'only_directives', 
    3737              #'matplotlib.sphinxext.mathmpl', 
    38               'matplotlib.sphinxext.only_directives', 
     38              #'matplotlib.sphinxext.only_directives', 
    3939              'matplotlib.sphinxext.plot_directive', 
    4040              'dollarmath', 
  • sasmodels/generate.py

    r0f00d95 r785cbec  
    145145 
    146146:func:`load_kernel_module` loads the model definition file and 
    147 :modelinfo:`make_model_info` parses it. :func:`make_source` 
     147:func:`modelinfo.make_model_info` parses it. :func:`make_source` 
    148148converts C-based model definitions to C source code, including the 
    149149polydispersity integral.  :func:`model_sources` returns the list of 
  • sasmodels/list_pars.py

    r6d6508e r785cbec  
    1313import sys 
    1414 
    15 from .core import load_model_info 
    16 from .compare import MODELS, columnize 
     15from .core import load_model_info, list_models 
     16from .compare import columnize 
    1717 
    1818def find_pars(): 
     
    2323    """ 
    2424    partable = {} 
    25     for name in sorted(MODELS): 
     25    for name in list_models(): 
    2626        model_info = load_model_info(name) 
    2727        for p in model_info.parameters.kernel_parameters: 
  • sasmodels/models/fractal.py

    r42356c8 r785cbec  
    77.. math:: 
    88 
    9     I(q) &=& \phi\ V_{block} (\rho_{block} - \rho_{solvent})^2 P(q)S(q) 
    10     + background 
     9    I(q) = \phi\ V_\text{block} (\rho_\text{block} 
     10          - \rho_\text{solvent})^2 P(q)S(q) + \text{background} 
    1111 
    1212where $\phi$ is The volume fraction of the spherical "building block" particles 
     
    2020.. math:: 
    2121 
    22     \begin{eqnarray} 
    23     P(q)&=& F(qR_0)^2 \\ 
    24     F(q)&=& \frac{3 (sinx - x cosx)}{x^3} \\ 
    25     V_{particle} &=& \frac{4}{3}\ \pi R_0 \\ 
    26     S(q) &=& 1 + \frac{D_f\  \Gamma\!(D_f-1)}{[1+1/(q \xi)^2\  ]^{(D_f -1)/2}} 
    27     \frac{sin[(D_f-1) \tan^{-1}(q \xi) ]}{(q R_0)^{D_f}} 
    28     \end{eqnarray} 
     22    P(q)&= F(qR_0)^2 
     23 
     24    F(q)&= \frac{3 (\sin x - x \cos x)}{x^3} 
     25 
     26    V_\text{particle} &= \frac{4}{3}\ \pi R_0 
     27 
     28    S(q) &= 1 + \frac{D_f\  \Gamma\!(D_f-1)}{[1+1/(q \xi)^2\  ]^{(D_f -1)/2}} 
     29    \frac{\sin[(D_f-1) \tan^{-1}(q \xi) ]}{(q R_0)^{D_f}} 
    2930 
    3031where $\xi$ is the correlation length representing the cluster size and $D_f$ 
  • sasmodels/models/onion.py

    re187b25 r785cbec  
    3636 
    3737    \begin{align*} 
    38  
    3938    f_\text{core} 
    4039        &= 4\pi\int_0^{r_\text{core}} \rho_\text{core} 
     
    7574thickness of the $k^\text{th}$ shell in the equation above, respectively. 
    7675 
    77 For $A \gt 0$, 
    78  
    79 .. math:: 
    80     :nowrap: 
    81  
    82     \begin{align*} 
     76For $A > 0$, 
     77 
     78.. math:: 
     79 
    8380    f_\text{shell} &= 4 \pi \int_{r_{\text{shell}-1}}^{r_\text{shell}} 
    8481        \left[ B\exp 
    8582            \left(A (r - r_{\text{shell}-1}) / \Delta t_\text{shell} \right) + C 
    86         \right] \frac{\sin(qr)}{qr}\,r^2\,\mathrm{d}r \\ 
     83        \right] \frac{\sin(qr)}{qr}\,r^2\,\mathrm{d}r 
     84 
    8785    &= 3BV(r_\text{shell}) e^A h(\alpha_\text{out},\beta_\text{out}) 
    8886        - 3BV(r_{\text{shell}-1}) h(\alpha_\text{in},\beta_\text{in}) 
    8987        + 3CV(r_{\text{shell}}) \frac{j_1(\beta_\text{out})}{\beta_\text{out}} 
    9088        - 3CV(r_{\text{shell}-1}) \frac{j_1(\beta_\text{in})}{\beta_\text{in}} 
    91     \end{align*} 
    9289 
    9390for 
     
    10299         &\alpha_\text{out} &= A\frac{r_\text{shell}}{\Delta t_\text{shell}} \\ 
    103100    \beta_\text{in} &= qr_{\text{shell}-1} 
    104         &\beta_\text{out} &= qr_\text{shell} 
     101        &\beta_\text{out} &= qr_\text{shell} \\ 
    105102    \end{align*} 
    106103 
  • sasmodels/models/spherical_sld.py

    r50ec515 r785cbec  
    4646 
    4747.. math:: 
    48     f_\text{core} = 4 \pi \int_{0}^{r_\text{core}} \rho_\text{core} 
     48 
     49    f_\text{core} &= 4 \pi \int_{0}^{r_\text{core}} \rho_\text{core} 
    4950    \frac{\sin(qr)} {qr} r^2 dr = 
    5051    3 \rho_\text{core} V(r_\text{core}) 
     
    5253    {qr_\text{core}^3} \Big] 
    5354 
    54     f_{\text{inter}_i} = 4 \pi \int_{\Delta t_{ \text{inter}_i } } 
     55    f_{\text{inter}_i} &= 4 \pi \int_{\Delta t_{ \text{inter}_i } } 
    5556    \rho_{ \text{inter}_i } \frac{\sin(qr)} {qr} r^2 dr 
    5657 
    57     f_{\text{shell}_i} = 4 \pi \int_{\Delta t_{ \text{inter}_i } } 
     58    f_{\text{shell}_i} &= 4 \pi \int_{\Delta t_{ \text{inter}_i } } 
    5859    \rho_{ \text{flat}_i } \frac{\sin(qr)} {qr} r^2 dr = 
    5960    3 \rho_{ \text{flat}_i } V ( r_{ \text{inter}_i } + 
     
    6768    \cos(qr_{\text{inter}_i}) } {qr_{\text{inter}_i}^3} \Big] 
    6869 
    69     f_\text{solvent} = 4 \pi \int_{r_N}^{\infty} \rho_\text{solvent} 
     70    f_\text{solvent} &= 4 \pi \int_{r_N}^{\infty} \rho_\text{solvent} 
    7071    \frac{\sin(qr)} {qr} r^2 dr = 
    7172    3 \rho_\text{solvent} V(r_N) 
     
    8081 
    8182.. math:: 
    82     \rho_{{inter}_i} (r) = \begin{cases} 
     83 
     84    \rho_{{inter}_i} (r) &= \begin{cases} 
    8385    B \exp\Big( \frac {\pm A(r - r_{\text{flat}_i})} 
    84     {\Delta t_{ \text{inter}_i }} \Big) +C  & \text{for} A \neq 0 \\ 
     86    {\Delta t_{ \text{inter}_i }} \Big) +C  & \mbox{for } A \neq 0 \\ 
    8587    B \Big( \frac {(r - r_{\text{flat}_i})} 
    86     {\Delta t_{ \text{inter}_i }} \Big) +C  & \text{for} A = 0 \\ 
     88    {\Delta t_{ \text{inter}_i }} \Big) +C  & \mbox{for } A = 0 \\ 
    8789    \end{cases} 
    8890 
     
    9092 
    9193.. math:: 
    92     \rho_{{inter}_i} (r) = \begin{cases} 
     94 
     95    \rho_{{inter}_i} (r) &= \begin{cases} 
    9396    \pm B \Big( \frac {(r - r_{\text{flat}_i} )} {\Delta t_{ \text{inter}_i }} 
    94     \Big) ^A  +C  & \text{for} A \neq 0 \\ 
    95     \rho_{\text{flat}_{i+1}}  & \text{for} A = 0 \\ 
     97    \Big) ^A  +C  & \mbox{for } A \neq 0 \\ 
     98    \rho_{\text{flat}_{i+1}}  & \mbox{for } A = 0 \\ 
    9699    \end{cases} 
    97100 
     
    101104    \rho_{{inter}_i} (r) = \begin{cases} 
    102105    B \text{erf} \Big( \frac { A(r - r_{\text{flat}_i})} 
    103     {\sqrt{2} \Delta t_{ \text{inter}_i }} \Big) +C  & \text{for} A \neq 0 \\ 
     106    {\sqrt{2} \Delta t_{ \text{inter}_i }} \Big) +C  & \mbox{for } A \neq 0 \\ 
    104107    B \Big( \frac {(r - r_{\text{flat}_i} )} {\Delta t_{ \text{inter}_i }} 
    105     \Big)  +C  & \text{for} A = 0 \\ 
     108    \Big)  +C  & \mbox{for } A = 0 \\ 
    106109    \end{cases} 
    107110 
     
    114117 
    115118.. math:: 
    116     f_{\text{inter}_i} = 4 \pi \int_{\Delta t_{ \text{inter}_i } } 
     119 
     120    f_{\text{inter}_i} &= 4 \pi \int_{\Delta t_{ \text{inter}_i } } 
    117121    \rho_{ \text{inter}_i } \frac{\sin(qr)} {qr} r^2 dr = 
    118     4 \pi \sum_{j=0}^{npts_{\text{inter}_i} -1 } 
     122    4 \pi \sum_{j=1}^{n_\text{steps}} 
    119123    \int_{r_j}^{r_{j+1}} \rho_{ \text{inter}_i } (r_j) 
    120     \frac{\sin(qr)} {qr} r^2 dr \approx 
    121  
    122     4 \pi \sum_{j=0}^{npts_{\text{inter}_i} -1 } \Big[ 
     124    \frac{\sin(qr)} {qr} r^2 dr 
     125 
     126    &\approx 4 \pi \sum_{j=1}^{n_\text{steps}} \Big[ 
    123127    3 ( \rho_{ \text{inter}_i } ( r_{j+1} ) - \rho_{ \text{inter}_i } 
    124     ( r_{j} ) V ( r_{ \text{subshell}_j } ) 
     128    ( r_{j} ) V (r_j) 
    125129    \Big[ \frac {r_j^2 \beta_\text{out}^2 \sin(\beta_\text{out}) 
    126130    - (\beta_\text{out}^2-2) \cos(\beta_\text{out}) } 
    127131    {\beta_\text{out}^4 } \Big] 
    128132 
    129     - 3 ( \rho_{ \text{inter}_i } ( r_{j+1} ) - \rho_{ \text{inter}_i } 
    130     ( r_{j} ) V ( r_{ \text{subshell}_j-1 } ) 
     133    &{} - 3 ( \rho_{ \text{inter}_i } ( r_{j+1} ) - \rho_{ \text{inter}_i } 
     134    ( r_{j} ) V ( r_{j-1} ) 
    131135    \Big[ \frac {r_{j-1}^2 \sin(\beta_\text{in}) 
    132136    - (\beta_\text{in}^2-2) \cos(\beta_\text{in}) } 
    133137    {\beta_\text{in}^4 } \Big] 
    134138 
    135     + 3 \rho_{ \text{inter}_i } ( r_{j+1} )  V ( r_j ) 
     139    &{} + 3 \rho_{ \text{inter}_i } ( r_{j+1} )  V ( r_j ) 
    136140    \Big[ \frac {\sin(\beta_\text{out}) - \cos(\beta_\text{out}) } 
    137141    {\beta_\text{out}^4 } \Big] 
    138  
    139142    - 3 \rho_{ \text{inter}_i } ( r_{j} )  V ( r_j ) 
    140143    \Big[ \frac {\sin(\beta_\text{in}) - \cos(\beta_\text{in}) } 
     
    145148 
    146149.. math:: 
    147     V(a) = \frac {4\pi}{3}a^3 
    148  
    149     a_\text{in} ~ \frac{r_j}{r_{j+1} -r_j} \text{, } a_\text{out} 
    150     ~ \frac{r_{j+1}}{r_{j+1} -r_j} 
    151  
    152     \beta_\text{in} = qr_j \text{, } \beta_\text{out} = qr_{j+1} 
     150    :nowrap: 
     151 
     152    \begin{align*} 
     153    V(a) &= \frac {4\pi}{3}a^3 && \\ 
     154    a_\text{in} &\sim \frac{r_j}{r_{j+1} -r_j} \text{, } &a_\text{out} 
     155    &\sim \frac{r_{j+1}}{r_{j+1} -r_j} \\ 
     156    \beta_\text{in} &= qr_j \text{, } &\beta_\text{out} &= qr_{j+1} 
     157    \end{align*} 
    153158 
    154159 
     
    160165.. math:: 
    161166 
    162     P(q) = \frac{[f]^2} {V_\text{particle}} \text{where} V_\text{particle} 
     167    P(q) = \frac{[f]^2} {V_\text{particle}} \mbox{ where } V_\text{particle} 
    163168    = V(r_{\text{shell}_N}) 
    164169 
     
    172177.. note:: 
    173178 
    174     The outer most radius is used as the effective radius for S(Q) 
     179    The outer most radius is used as the effective radius for $S(Q)$ 
    175180    when $P(Q) * S(Q)$ is applied. 
    176181 
  • sasmodels/models/unified_power_Rg.py

    rec77322 r785cbec  
    7272    ["G[level]",  "1/cm", 400,    [0, inf], "", ""], 
    7373    ] 
     74category = "shape-independent" 
    7475 
    7576def Iq(q, level, rg, power, B, G): 
Note: See TracChangeset for help on using the changeset viewer.