Changeset b297ba9 in sasmodels for sasmodels/models/spinodal.py


Ignore:
Timestamp:
Mar 20, 2019 5:03:50 PM (5 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
4e28511
Parents:
0d362b7
Message:

lint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/spinodal.py

    r07646b6 rb297ba9  
    33---------- 
    44 
    5 This model calculates the SAS signal of a phase separating system  
    6 undergoing spinodal decomposition. The scattering intensity $I(q)$ is calculated  
    7 as  
     5This model calculates the SAS signal of a phase separating system 
     6undergoing spinodal decomposition. The scattering intensity $I(q)$ is calculated 
     7as 
    88 
    99.. math:: 
    1010    I(q) = I_{max}\frac{(1+\gamma/2)x^2}{\gamma/2+x^{2+\gamma}}+B 
    1111 
    12 where $x=q/q_0$, $q_0$ is the peak position, $I_{max}$ is the intensity  
    13 at $q_0$ (parameterised as the $scale$ parameter), and $B$ is a flat  
    14 background. The spinodal wavelength, $\Lambda$, is given by $2\pi/q_0$.  
     12where $x=q/q_0$, $q_0$ is the peak position, $I_{max}$ is the intensity 
     13at $q_0$ (parameterised as the $scale$ parameter), and $B$ is a flat 
     14background. The spinodal wavelength, $\Lambda$, is given by $2\pi/q_0$. 
    1515 
    16 The definition of $I_{max}$ in the literature varies. Hashimoto *et al* (1991)  
    17 define it as  
     16The definition of $I_{max}$ in the literature varies. Hashimoto *et al* (1991) 
     17define it as 
    1818 
    1919.. math:: 
    2020    I_{max} = \Lambda^3\Delta\rho^2 
    21      
    22 whereas Meier & Strobl (1987) give  
     21 
     22whereas Meier & Strobl (1987) give 
    2323 
    2424.. math:: 
    2525    I_{max} = V_z\Delta\rho^2 
    26      
     26 
    2727where $V_z$ is the volume per monomer unit. 
    2828 
    29 The exponent $\gamma$ is equal to $d+1$ for off-critical concentration  
    30 mixtures (smooth interfaces) and $2d$ for critical concentration mixtures  
    31 (entangled interfaces), where $d$ is the dimensionality (ie, 1, 2, 3) of the  
    32 system. Thus 2 <= $\gamma$ <= 6. A transition from $\gamma=d+1$ to $\gamma=2d$  
    33 is expected near the percolation threshold.  
     29The exponent $\gamma$ is equal to $d+1$ for off-critical concentration 
     30mixtures (smooth interfaces) and $2d$ for critical concentration mixtures 
     31(entangled interfaces), where $d$ is the dimensionality (ie, 1, 2, 3) of the 
     32system. Thus 2 <= $\gamma$ <= 6. A transition from $\gamma=d+1$ to $\gamma=2d$ 
     33is expected near the percolation threshold. 
    3434 
    35 As this function tends to zero as $q$ tends to zero, in practice it may be  
    36 necessary to combine it with another function describing the low-angle  
     35As this function tends to zero as $q$ tends to zero, in practice it may be 
     36necessary to combine it with another function describing the low-angle 
    3737scattering, or to simply omit the low-angle scattering from the fit. 
    3838 
     
    4141 
    4242H. Furukawa. Dynamics-scaling theory for phase-separating unmixing mixtures: 
    43 Growth rates of droplets and scaling properties of autocorrelation functions.  
     43Growth rates of droplets and scaling properties of autocorrelation functions. 
    4444Physica A 123, 497 (1984). 
    4545 
    46 H. Meier & G. Strobl. Small-Angle X-ray Scattering Study of Spinodal  
    47 Decomposition in Polystyrene/Poly(styrene-co-bromostyrene) Blends.  
     46H. Meier & G. Strobl. Small-Angle X-ray Scattering Study of Spinodal 
     47Decomposition in Polystyrene/Poly(styrene-co-bromostyrene) Blends. 
    4848Macromolecules 20, 649-654 (1987). 
    4949 
    50 T. Hashimoto, M. Takenaka & H. Jinnai. Scattering Studies of Self-Assembling  
    51 Processes of Polymer Blends in Spinodal Decomposition.  
     50T. Hashimoto, M. Takenaka & H. Jinnai. Scattering Studies of Self-Assembling 
     51Processes of Polymer Blends in Spinodal Decomposition. 
    5252J. Appl. Cryst. 24, 457-466 (1991). 
    5353 
     
    6868 
    6969      List of default parameters: 
    70        
     70 
    7171      Imax = correlation peak intensity at q_0 
    7272      background = incoherent background 
     
    7474      q_0 = correlation peak position [1/A] 
    7575      x = q/q_0""" 
    76        
     76 
    7777category = "shape-independent" 
    7878 
     
    100100 
    101101def random(): 
     102    """Return a random parameter set for the model.""" 
    102103    pars = dict( 
    103104        scale=10**np.random.uniform(1, 3), 
Note: See TracChangeset for help on using the changeset viewer.