Changeset 6530963 in sasmodels for sasmodels/models/fcc_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/fcc_paracrystal.py

    r2d81cfe r6530963  
    111111# pylint: disable=bad-whitespace, line-too-long 
    112112#             ["name", "units", default, [lower, upper], "type","description"], 
    113 parameters = [["dnn", "Ang", 220, [-inf, inf], "", "Nearest neighbour distance"], 
    114               ["d_factor", "", 0.06, [-inf, inf], "", "Paracrystal distortion factor"], 
     113parameters = [["lattice_spacing", "Ang", 220, [-inf, inf], "", "Lattice spacing"], 
     114              ["lattice_distortion", "", 0.06, [-inf, inf], "", "Paracrystal distortion factor"], 
    115115              ["radius", "Ang", 40, [0, inf], "volume", "Particle radius"], 
    116116              ["sld", "1e-6/Ang^2", 4, [-inf, inf], "sld", "Particle scattering length density"], 
     
    127127    # copied from bcc_paracrystal 
    128128    radius = 10**np.random.uniform(1.3, 4) 
    129     d_factor = 10**np.random.uniform(-2, -0.7)  # sigma_d in 0.01-0.7 
    130     dnn_fraction = np.random.beta(a=10, b=1) 
    131     dnn = radius*4/np.sqrt(2)/dnn_fraction 
     129    lattice_distortion = 10**np.random.uniform(-2, -0.7)  # sigma_d in 0.01-0.7 
     130    lattice_spacing_fraction = np.random.beta(a=10, b=1) 
     131    lattice_spacing = radius*4/np.sqrt(2)/lattice_spacing_fraction 
    132132    pars = dict( 
    133133        #sld=1, sld_solvent=0, scale=1, background=1e-32, 
    134         dnn=dnn, 
    135         d_factor=d_factor, 
     134        latice_spacing=lattice_spacing, 
     135        lattice_distortion=d_factor, 
    136136        radius=radius, 
    137137    ) 
Note: See TracChangeset for help on using the changeset viewer.