Changes in / [4cdc4b1:dc76240] in sasmodels


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/guinier.py

    rc9fc873 r2d81cfe  
    77.. math:: 
    88 
    9     I(q) = \text{scale} \cdot \exp{\left[ \frac{-Q^2 R_g^2 }{3} \right]} 
     9    I(q) = \text{scale} \cdot \exp{\left[ \frac{-Q^2R_g^2}{3} \right]} 
    1010            + \text{background} 
    1111 
     
    1919 
    2020.. math:: q = \sqrt{q_x^2 + q_y^2} 
    21  
    22 In scattering, the radius of gyration $R_g$ quantifies the objects's 
    23 distribution of SLD (not mass density, as in mechanics) from the objects's 
    24 SLD centre of mass. It is defined by 
    25  
    26 .. math:: R_g^2 = \frac{\sum_i\rho_i\left(r_i-r_0\right)^2}{\sum_i\rho_i} 
    27  
    28 where $r_0$ denotes the object's SLD centre of mass and $\rho_i$ is the SLD at 
    29 a point $i$. 
    30  
    31 Notice that $R_g^2$ may be negative (since SLD can be negative), which happens 
    32 when a form factor $P(Q)$ is increasing with $Q$ rather than decreasing. This 
    33 can occur for core/shell particles, hollow particles, or for composite 
    34 particles with domains of different SLDs in a solvent with an SLD close to the 
    35 average match point. (Alternatively, this might be regarded as there being an 
    36 internal inter-domain "structure factor" within a single particle which gives 
    37 rise to a peak in the scattering). 
    38  
    39 To specify a negative value of $R_g^2$ in SasView, simply give $R_g$ a negative 
    40 value ($R_g^2$ will be evaluated as $R_g |R_g|$). Note that the physical radius  
    41 of gyration, of the exterior of the particle, will still be large and positive.  
    42 It is only the apparent size from the small $Q$ data that will give a small or  
    43 negative value of $R_g^2$. 
    4421 
    4522References 
     
    6542 
    6643#             ["name", "units", default, [lower, upper], "type","description"], 
    67 parameters = [["rg", "Ang", 60.0, [-inf, inf], "", "Radius of Gyration"]] 
     44parameters = [["rg", "Ang", 60.0, [0, inf], "", "Radius of Gyration"]] 
    6845 
    6946Iq = """ 
    70     double exponent = fabs(rg)*rg*q*q/3.0; 
     47    double exponent = rg*rg*q*q/3.0; 
    7148    double value = exp(-exponent); 
    7249    return value; 
     
    8966 
    9067# parameters for demo 
    91 demo = dict(scale=1.0,  background=0.001, rg=60.0 ) 
     68demo = dict(scale=1.0, rg=60.0) 
    9269 
    9370# parameters for unit tests 
Note: See TracChangeset for help on using the changeset viewer.