Changeset ee60aa7 in sasmodels for sasmodels/models/parallelepiped.py


Ignore:
Timestamp:
Sep 10, 2018 4:16:46 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:
d299327
Parents:
3f818b2
Message:

clean up effective radius functions; improve mono_gauss_coil accuracy; start moving VR into C

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/parallelepiped.py

    rd277229 ree60aa7  
    140140   ensuring that the inequality $A < B < C$ is not violated,  The calculation 
    141141   will not report an error, but the results may be not correct. 
    142     
     142 
    143143.. _parallelepiped-orientation: 
    144144 
     
    231231source = ["lib/gauss76.c", "parallelepiped.c"] 
    232232have_Fq = True 
    233 effective_radius_type = ["equivalent sphere","half length_a", "half length_b", "half length_c", 
    234                          "equivalent circular cross-section","half ab diagonal","half diagonal"] 
    235  
    236 #def ER(length_a, length_b, length_c): 
    237 #    """ 
    238 #    Return effective radius (ER) for P(q)*S(q) 
    239 #    """ 
    240 #    # now that axes can be in any size order, need to sort a,b,c 
    241 #    # where a~b and c is either much smaller or much larger 
    242 #    abc = np.vstack((length_a, length_b, length_c)) 
    243 #    abc = np.sort(abc, axis=0) 
    244 #    selector = (abc[1] - abc[0]) > (abc[2] - abc[1]) 
    245 #    length = np.where(selector, abc[0], abc[2]) 
    246 #    # surface average radius (rough approximation) 
    247 #    radius = sqrt(np.where(~selector, abc[0]*abc[1], abc[1]*abc[2]) / pi) 
    248 # 
    249 #    ddd = 0.75 * radius * (2*radius*length + (length + radius)*(length + pi*radius)) 
    250 #    return 0.5 * (ddd) ** (1. / 3.) 
    251  
    252 # VR defaults to 1.0 
    253  
     233effective_radius_type = [ 
     234    "equivalent sphere", "half length_a", "half length_b", "half length_c", 
     235    "equivalent circular cross-section", "half ab diagonal", "half diagonal", 
     236    ] 
    254237 
    255238def random(): 
Note: See TracChangeset for help on using the changeset viewer.