Changeset 6530963 in sasmodels for sasmodels/models/sc_paracrystal.py


Ignore:
Timestamp:
Sep 9, 2018 4:46:10 AM (6 years ago)
Author:
ajj
Branches:
ticket_1156
Children:
78f8308
Parents:
2c12061
Message:

Updating paracrystal models as per ticket #1156 to rename parameters
from nearest neighbour to lattice spacing

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/sc_paracrystal.py

    r2d81cfe r6530963  
    116116        scale: volume fraction of spheres 
    117117        bkg:background, R: radius of sphere 
    118         dnn: Nearest neighbor distance 
    119         d_factor: Paracrystal distortion factor 
     118        lattice_spacing: Nearest neighbor distance 
     119        lattice_distortion: Paracrystal distortion factor 
    120120        radius: radius of the spheres 
    121121        sldSph: SLD of the sphere 
     
    126126# pylint: disable=bad-whitespace, line-too-long 
    127127#             ["name", "units", default, [lower, upper], "type","description"], 
    128 parameters = [["dnn",         "Ang",       220.0, [0.0, inf],  "",            "Nearest neighbor distance"], 
    129               ["d_factor",    "",           0.06, [-inf, inf], "",            "Paracrystal distortion factor"], 
     128parameters = [["lattice_spacing",         "Ang",       220.0, [0.0, inf],  "",  "Lattice spacing"], 
     129              ["lattice_distortion",    "",           0.06, [-inf, inf], "",   "Paracrystal distortion factor"], 
    130130              ["radius",      "Ang",        40.0, [0.0, inf],  "volume",      "Radius of sphere"], 
    131131              ["sld",  "1e-6/Ang^2",         3.0, [0.0, inf],  "sld",         "Sphere scattering length density"], 
     
    142142    # copied from bcc_paracrystal 
    143143    radius = 10**np.random.uniform(1.3, 4) 
    144     d_factor = 10**np.random.uniform(-2, -0.7)  # sigma_d in 0.01-0.7 
    145     dnn_fraction = np.random.beta(a=10, b=1) 
    146     dnn = radius*4/np.sqrt(4)/dnn_fraction 
     144    lattice_distortion = 10**np.random.uniform(-2, -0.7)  # sigma_d in 0.01-0.7 
     145    lattice_spacing_fraction = np.random.beta(a=10, b=1) 
     146    lattice_spacing = radius*4/np.sqrt(4)/lattice_spacing_fraction 
    147147    pars = dict( 
    148148        #sld=1, sld_solvent=0, scale=1, background=1e-32, 
    149         dnn=dnn, 
    150         d_factor=d_factor, 
     149        lattice_spacing=lattice_spacing, 
     150        lattice_distortion=lattice_distortion, 
    151151        radius=radius, 
    152152    ) 
Note: See TracChangeset for help on using the changeset viewer.