Changeset 384d114 in sasmodels


Ignore:
Timestamp:
Jan 27, 2016 4:06:30 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:
3a45c2c
Parents:
09ebe8c
Message:

doc and delint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sesans.py

    r09ebe8c r384d114  
    1515 
    1616def make_q(q_max, Rmax): 
    17     """ 
     17    r""" 
    1818    Return a $q$ vector suitable for SESANS covering from $2\pi/ (10 R_{\max})$ 
    1919    to $q_max$. 
     
    2323 
    2424def hankel(SElength, wavelength, thickness, q, Iq): 
    25     """ 
     25    r""" 
    2626    Compute the expected SESANS polarization for a given SANS pattern. 
    2727 
    28     Uses the hankel transform followed by the exponential.  The values 
    29     for zz (or spin echo length, or delta), wavelength and sample thickness 
    30     information should come from the dataset.  *q* should be chosen such 
    31     that the oscillations in *I(q)* are well sampled (e.g., 5*2*pi/d_max). 
     28    Uses the hankel transform followed by the exponential.  The values for *zz* 
     29    (or spin echo length, or delta), wavelength and sample thickness should 
     30    come from the dataset.  $q$ should be chosen such that the oscillations 
     31    in $I(q)$ are well sampled (e.g., $5 \cdot 2 \pi/d_{\max}$). 
    3232 
    33     *SElength* [A] is the set of z points at which to compute the hankel transform 
     33    *SElength* [A] is the set of $z$ points at which to compute the 
     34    Hankel transform 
    3435 
    3536    *wavelength* [m]  is the wavelength of each individual point *zz* 
     
    3738    *thickness* [cm] is the sample thickness. 
    3839 
    39     *q* [A^{-1}] is the set of q points at which the model has been computed. 
    40     These should be equally spaced. 
     40    *q* [A$^{-1}$] is the set of $q$ points at which the model has been 
     41    computed. These should be equally spaced. 
    4142 
    42     *I* [cm^{-1}] is the value of the SANS model at *q* 
     43    *I* [cm$^{-1}$] is the value of the SANS model at *q* 
    4344    """ 
    4445    G = np.zeros(len(SElength), 'd') 
     
    4647        integr = besselj(0, q*SElength[i])*Iq*q 
    4748        G[i] = np.sum(integr) 
    48     dq=(q[1]-q[0])*1e10   # [m^-1] step size in q, needed for integration 
    49     G *= dq*1e10*2*pi # integr step, conver q into [m**-1] and 2 pi circle integr 
     49 
     50    # [m^-1] step size in q, needed for integration 
     51    dq=(q[1]-q[0])*1e10 
     52 
     53    # integration step, convert q into [m**-1] and 2 pi circle integration 
     54    G *= dq*1e10*2*pi 
     55 
    5056    P = exp(thickness*wavelength**2/(4*pi**2)*(G-G[0])) 
    5157 
Note: See TracChangeset for help on using the changeset viewer.