Ignore:
Timestamp:
Aug 2, 2017 2:53:56 AM (5 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
bd21b12
Parents:
1511c37c
Message:

tuned random model generation for more models

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/models/core_shell_parallelepiped.py

    r9b79f29 r8f04da4  
    44 
    55Calculates the form factor for a rectangular solid with a core-shell structure. 
    6 The thickness and the scattering length density of the shell or  
     6The thickness and the scattering length density of the shell or 
    77"rim" can be different on each (pair) of faces. However at this time 
    88the 1D calculation does **NOT** actually calculate a c face rim despite the presence of 
     
    4242 
    4343**meaning that there are "gaps" at the corners of the solid.**  Again note that 
    44 $t_C = 0$ currently.  
     44$t_C = 0$ currently. 
    4545 
    4646The intensity calculated follows the :ref:`parallelepiped` model, with the 
     
    8282based on the the averaged effective radius $(=\sqrt{(A+2t_A)(B+2t_B)/\pi})$ 
    8383and length $(C+2t_C)$ values, after appropriately 
    84 sorting the three dimensions to give an oblate or prolate particle, to give an  
     84sorting the three dimensions to give an oblate or prolate particle, to give an 
    8585effective radius, for $S(Q)$ when $P(Q) * S(Q)$ is applied. 
    8686 
     
    126126title = "Rectangular solid with a core-shell structure." 
    127127description = """ 
    128      P(q)=  
     128     P(q)= 
    129129""" 
    130130category = "shape:parallelepiped" 
     
    179179# VR defaults to 1.0 
    180180 
     181def random(): 
     182    import numpy as np 
     183    outer = 10**np.random.uniform(1, 4.7, size=3) 
     184    thick = np.random.beta(0.5, 0.5, size=3)*(outer-2) + 1 
     185    length = outer - thick 
     186    pars = dict( 
     187        length_a=length[0], 
     188        length_b=length[1], 
     189        length_c=length[2], 
     190        thick_rim_a=thick[0], 
     191        thick_rim_b=thick[1], 
     192        thick_rim_c=thick[2], 
     193    ) 
     194    return pars 
     195 
    181196# parameters for demo 
    182197demo = dict(scale=1, background=0.0, 
Note: See TracChangeset for help on using the changeset viewer.