Ignore:
Timestamp:
Nov 29, 2017 11:13:23 AM (6 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:
237b800f
Parents:
a839b22
Message:

lint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/elliptical_cylinder.py

    reda8b30 r2d81cfe  
    4343    P(q) = \text{scale}  <F^2> / V 
    4444 
    45 For 2d data the orientation of the particle is required, described using a different set  
    46 of angles as in the diagrams below, for further details of the calculation and angular  
     45For 2d data the orientation of the particle is required, described using a different set 
     46of angles as in the diagrams below, for further details of the calculation and angular 
    4747dispersions  see :ref:`orientation` . 
    4848 
     
    9595* **Last Modified by:** 
    9696* **Last Reviewed by:**  Richard Heenan - corrected equation in docs **Date:** December 21, 2016 
    97  
    9897""" 
    9998 
     99import numpy as np 
    100100from numpy import pi, inf, sqrt, sin, cos 
    101101 
     
    141141 
    142142def random(): 
    143     import numpy as np 
    144143    # V = pi * radius_major * radius_minor * length; 
    145     V = 10**np.random.uniform(3, 9) 
     144    volume = 10**np.random.uniform(3, 9) 
    146145    length = 10**np.random.uniform(1, 3) 
    147146    axis_ratio = 10**np.random.uniform(0, 2) 
    148     radius_minor = np.sqrt(V/length/axis_ratio) 
    149     Vf = 10**np.random.uniform(-4, -2) 
     147    radius_minor = np.sqrt(volume/length/axis_ratio) 
     148    volfrac = 10**np.random.uniform(-4, -2) 
    150149    pars = dict( 
    151150        #background=0, sld=0, sld_solvent=1, 
    152         scale=1e9*Vf/V, 
     151        scale=1e9*volfrac/volume, 
    153152        length=length, 
    154153        radius_minor=radius_minor, 
     
    170169      'sld_solvent':1.0, 'background':0.0}, 
    171170     0.001, 675.504402], 
    172 #    [{'theta':80., 'phi':10.}, (qx, qy), 7.88866563001 ], 
     171    #[{'theta':80., 'phi':10.}, (qx, qy), 7.88866563001 ], 
    173172] 
Note: See TracChangeset for help on using the changeset viewer.