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


Ignore:
Timestamp:
Sep 9, 2018 6: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/bcc_paracrystal.py

    r2d81cfe r6530963  
    123123# pylint: disable=bad-whitespace, line-too-long 
    124124#             ["name", "units", default, [lower, upper], "type","description" ], 
    125 parameters = [["dnn",         "Ang",       220,    [-inf, inf], "",            "Nearest neighbour distance"], 
    126               ["d_factor",    "",            0.06, [-inf, inf], "",            "Paracrystal distortion factor"], 
     125parameters = [["lattice_spacing",         "Ang",       220,    [-inf, inf], "",            "Lattice spacing"], 
     126              ["lattice_distortion",    "",            0.06, [-inf, inf], "",            "Paracrystal distortion factor"], 
    127127              ["radius",      "Ang",        40,    [0, inf],    "volume",      "Particle radius"], 
    128128              ["sld",         "1e-6/Ang^2",  4,    [-inf, inf], "sld",         "Particle scattering length density"], 
     
    145145    # in this range 'cuz its easy. 
    146146    radius = 10**np.random.uniform(1.3, 4) 
    147     d_factor = 10**np.random.uniform(-2, -0.7)  # sigma_d in 0.01-0.7 
    148     dnn_fraction = np.random.beta(a=10, b=1) 
    149     dnn = radius*4/np.sqrt(3)/dnn_fraction 
     147    lattice_distortion = 10**np.random.uniform(-2, -0.7)  # sigma_d in 0.01-0.7 
     148    lattice_spacing_fraction = np.random.beta(a=10, b=1) 
     149    lattice_spacing = radius*4/np.sqrt(3)/lattice_spacing_fraction 
    150150    pars = dict( 
    151151        #sld=1, sld_solvent=0, scale=1, background=1e-32, 
    152         dnn=dnn, 
    153         d_factor=d_factor, 
     152        lattice_spacing=lattice_spacing, 
     153        lattice_distortion=lattice_distortion, 
    154154        radius=radius, 
    155155    ) 
Note: See TracChangeset for help on using the changeset viewer.