Changeset 7c391dd in sasmodels for sasmodels/models/lamellar.py


Ignore:
Timestamp:
Mar 18, 2016 8:18:56 AM (8 years ago)
Author:
richardh
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:
d5ba841
Parents:
9538fae
Message:

checked lamellar, reordered params, improved docs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/lamellar.py

    raa2edb2 r7c391dd  
    55---------- 
    66 
    7 The scattering intensity $I(q)$ is 
     7The scattering intensity $I(q)$ for dilute, randomly oriented, "infinitely large" sheets or lamellae is 
    88 
    99.. math:: 
    1010 
    11     I(q) = \frac{2\pi P(q)}{\delta q^2} 
     11    I(q) = scale*\frac{2\pi P(q)}{q^2\delta } 
    1212 
    1313 
     
    1616.. math:: 
    1717 
    18     P(q) = \frac{2\Delta\rho^2}{q^2}(1-cos(q\delta)) 
     18   P(q) = \frac{2\Delta\rho^2}{q^2}(1-cos(q\delta)) = \frac{4\Delta\rho^2}{q^2}sin^2(\frac{q\delta}{2}) 
    1919 
     20where $\delta$ is the total layer thickness and $\Delta\rho$ is the scattering length density difference. 
    2021 
    21 where $\delta$ is the bilayer thickness. 
     22This is the limiting form for a spherical shell of infinitely large radius. Note that the division by $\delta$ 
     23means that $scale$ in sasview is the volume fraction of sheet, $\phi = S\delta$ where $S$ is the area of  
     24sheet per unit volume. $S$ is half the Porod surface area per unit volume of a thicker layer (as that would  
     25include both faces of the sheet). 
    2226 
    2327The 2D scattering intensity is calculated in the same way as 1D, where 
     
    5660 
    5761#             ["name", "units", default, [lower, upper], "type","description"], 
    58 parameters = [["sld", "1e-6/Ang^2", 1, [-inf, inf], "", 
    59                "Layer scattering length density" ], 
    60               ["solvent_sld", "1e-6/Ang^2", 6, [-inf, inf], "", 
    61                "Solvent scattering length density" ], 
    62               ["thickness", "Ang", 50, [0, inf], "volume","Bilayer thickness" ], 
     62parameters = [ ["thickness", "Ang", 50, [0, inf], "volume","total layer thickness" ], 
     63               ["sld", "1e-6/Ang^2", 1, [-inf, inf], "","Layer scattering length density" ], 
     64               ["sld_solvent", "1e-6/Ang^2", 6, [-inf, inf], "","Solvent scattering length density" ], 
    6365             ] 
    6466 
    65  
    6667# No volume normalization despite having a volume parameter 
    67 # This should perhaps be volume normalized? 
     68# This should perhaps be volume normalized? - it is! 
    6869form_volume = """ 
    6970    return 1.0; 
     
    7172 
    7273Iq = """ 
    73     const double sub = sld - solvent_sld; 
     74    const double sub = sld - sld_solvent; 
    7475    const double qsq = q*q; 
    7576    // Original expression 
     
    8990 
    9091demo = dict(scale=1, background=0, 
    91             sld=6, solvent_sld=1, 
     92            sld=6, sld_solvent=1, 
    9293            thickness=40, 
    9394            thickness_pd=0.2, thickness_pd_n=40) 
    9495oldname = 'LamellarModel' 
    95 oldpars = dict(sld='sld_bi', solvent_sld='sld_sol', thickness='bi_thick') 
     96oldpars = dict(sld='sld_bi', sld_solvent='sld_sol', thickness='bi_thick') 
    9697tests = [ 
    97         [ {'scale': 1.0, 'background' : 0.0, 'thickness' : 50.0, 'sld' : 1.0,'solvent_sld' : 6.3, 'thickness_pd' : 0.0,  
     98        [ {'scale': 1.0, 'background' : 0.0, 'thickness' : 50.0, 'sld' : 1.0,'sld_solvent' : 6.3, 'thickness_pd' : 0.0,  
    9899           }, [0.001], [882289.54309]] 
    99100        ] 
Note: See TracChangeset for help on using the changeset viewer.