Changeset 5258859 in sasmodels


Ignore:
Timestamp:
Dec 21, 2015 9:31:18 AM (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:
c138211
Parents:
f4f3919
Message:

tweak docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/resolution.py

    r9404dd3 r5258859  
    175175 
    176176        I_s(q_i) = \frac{1}{\Delta q_\perp} 
    177             \int_0^{\Delta q_\perp} I(\sqrt{q_i^2 + q_\perp^2} dq_\perp 
     177            \int_0^{\Delta q_\perp} 
     178                I\left(\sqrt{q_i^2 + q_\perp^2}\right) \,dq_\perp 
    178179 
    179180    If slit width is large relative to height, use: 
     
    183184        I_s(q_i) = \frac{1}{2 \Delta q_\parallel} 
    184185            \int_{-\Delta q_\parallel}^{\Delta q_\parallel} 
    185                 I(|q_i + q_\parallel|) dq_\parallel 
     186                I\left(|q_i + q_\parallel|\right) \,dq_\parallel 
    186187 
    187188    For a mixture of slit width and height use: 
     
    190191 
    191192        I_s(q_i) = \frac{1}{2 \Delta q_\parallel \Delta q_\perp} 
    192             \int_{-\Delta q_\parallel)^{\Delta q_parallel} 
    193             \int_0^[\Delta q_\perp} 
    194                 I(\sqrt{(q_i + q_\parallel)^2 + q_\perp^2}) 
    195                 dq_\perp dq_\parallel 
     193            \int_{-\Delta q_\parallel}^{\Delta q_\parallel} 
     194            \int_0^{\Delta q_\perp} 
     195                I\left(\sqrt{(q_i + q_\parallel)^2 + q_\perp^2}\right) 
     196                \,dq_\perp dq_\parallel 
    196197 
    197198 
     
    203204    .. math:: 
    204205 
    205         I_s(q) = W I(q_\text{calc}) 
     206        I_s(q) = W\,I(q_\text{calc}) 
    206207 
    207208    If *q_calc* is at the mid-point, we can infer the bin edges from the 
     
    225226    difference between consecutive edges which have been first converted 
    226227    to $u$.  Only $u_j \in [0, \Delta q_\perp]$ are used, which corresponds 
    227     to $q_j \in [q, \sqrt{q^2 + \Delta q_\perp}]$, so 
     228    to $q_j \in \left[q, \sqrt{q^2 + \Delta q_\perp}\right]$, so 
    228229 
    229230    .. math:: 
    230231 
    231232        W_{ij} = \frac{1}{\Delta q_\perp} \Delta u_j 
    232                = \frac{1}{\Delta q_\perp} 
    233                     \sqrt{q_{j+1}^2 - q_i^2} - \sqrt{q_j^2 - q_i^2} 
    234             \text{if} q_j \in [q_i, \sqrt{q_i^2 + q_\perp^2}] 
     233               = \frac{1}{\Delta q_\perp} \left( 
     234                    \sqrt{q_{j+1}^2 - q_i^2} - \sqrt{q_j^2 - q_i^2} \right) 
     235            \ \text{if}\  q_j \in \left[q_i, \sqrt{q_i^2 + q_\perp^2}\right] 
    235236 
    236237    where $I_s(q_i)$ is the theory function being computed and $q_j$ are the 
     
    249250    .. math:: 
    250251 
    251         u_j = |q_j - q| 
     252        u_j = \left|q_j - q\right| 
    252253 
    253254    so 
     
    255256    .. math:: 
    256257 
    257         W_ij = \frac{1}{2 \Delta q_\parallel} \Delta u_j 
     258        W_{ij} = \frac{1}{2 \Delta q_\parallel} \Delta u_j 
    258259            = \frac{1}{2 \Delta q_\parallel} (q_{j+1} - q_j) 
    259             \text{if} q_j \in [q-\Delta q_\parallel, q+\Delta q_\parallel] 
     260            \ \text{if}\ q_j \in 
     261                \left[q-\Delta q_\parallel, q+\Delta q_\parallel\right] 
    260262 
    261263    However, we need to support cases were $u_j < 0$, which means using 
    262     $2 (q_{j+1} - q_j)$ when $q_j \in [0, q_\parallel-q_i]$.  This is not 
    263     an issue for $q_i > q_\parallel$. 
    264  
    265     For bot $q_\perp > 0$ and $q_\parallel > 0$ we perform a 2 dimensional 
     264    $2 (q_{j+1} - q_j)$ when $q_j \in \left[0, q_\parallel-q_i\right]$. 
     265    This is not an issue for $q_i > q_\parallel$. 
     266 
     267    For both $q_\perp > 0$ and $q_\parallel > 0$ we perform a 2 dimensional 
    266268    integration with 
    267269 
    268270    .. math:: 
    269271 
    270         u_jk = \sqrt{q_j^2 - (q + (k\Delta q_\parallel/L))^2} 
    271             \text{for} k = -L \ldots L 
     272        u_{jk} = \sqrt{q_j^2 - (q + (k\Delta q_\parallel/L))^2} 
     273            \ \text{for}\ k = -L \ldots L 
    272274 
    273275    for $L$ = *n_height*.  This gives 
     
    276278 
    277279        W_{ij} = \frac{1}{2 \Delta q_\perp q_\parallel} 
    278             \sum_{k=-L}^L \Delta u_jk (\frac{\Delta q_\parallel}{2 L + 1} 
     280            \sum_{k=-L}^L \Delta u_{jk} 
     281                \left(\frac{\Delta q_\parallel}{2 L + 1}\right) 
    279282 
    280283 
     
    329332    """ 
    330333    Given *q* and *q_width*, find a set of sampling points *q_calc* so 
    331     that each point I(q) has sufficient support from the underlying 
     334    that each point $I(q)$ has sufficient support from the underlying 
    332335    function. 
    333336    """ 
Note: See TracChangeset for help on using the changeset viewer.