Changeset 2d81cfe in sasmodels for sasmodels/models/barbell.py


Ignore:
Timestamp:
Nov 29, 2017 1:13:23 PM (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/barbell.py

    r31df0c9 r2d81cfe  
    8787* **Last Reviewed by:** Richard Heenan **Date:** January 4, 2017 
    8888""" 
     89 
     90import numpy as np 
    8991from numpy import inf, sin, cos, pi 
    9092 
     
    116118 
    117119def random(): 
    118     import numpy as np 
    119120    # TODO: increase volume range once problem with bell radius is fixed 
    120121    # The issue is that bell radii of more than about 200 fail at high q 
    121     V = 10**np.random.uniform(7, 9) 
    122     bar_volume = 10**np.random.uniform(-4, -1)*V 
    123     bell_volume = V - bar_volume 
     122    volume = 10**np.random.uniform(7, 9) 
     123    bar_volume = 10**np.random.uniform(-4, -1)*volume 
     124    bell_volume = volume - bar_volume 
    124125    bell_radius = (bell_volume/6)**0.3333  # approximate 
    125126    min_bar = bar_volume/np.pi/bell_radius**2 
     
    150151qx = q*cos(pi/6.0) 
    151152qy = q*sin(pi/6.0) 
    152 tests = [[{}, 0.075, 25.5691260532], 
    153         [{'theta':80., 'phi':10.}, (qx, qy), 3.04233067789], 
    154         ] 
     153tests = [ 
     154    [{}, 0.075, 25.5691260532], 
     155    [{'theta':80., 'phi':10.}, (qx, qy), 3.04233067789], 
     156] 
    155157del qx, qy  # not necessary to delete, but cleaner 
Note: See TracChangeset for help on using the changeset viewer.