Changeset 2e66ef5 in sasmodels


Ignore:
Timestamp:
May 8, 2017 12:16:09 AM (7 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:
a03fad8
Parents:
990d8df
Message:

add a short scripting guide; start in on developer docs

Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • doc/developer/calculator.rst

    re822c97 r2e66ef5  
    77model calculator which implements the polydispersity and magnetic SLD 
    88calculations.  There are three separate implementations of this layer, 
    9 *kernelcl.py* for OpenCL, which operates on a single Q value at a time, 
    10 *kerneldll.c* for the DLL, which loops over a vector of Q values, and 
    11 *kernelpy.py* for python models which operates on vector Q values. 
     9:mod:`kernelcl` for OpenCL, which operates on a single Q value at a time, 
     10:mod:`kerneldll` for the DLL, which loops over a vector of Q values, and 
     11:mod:`kernelpy` for python models which operates on vector Q values. 
    1212 
    1313Each implementation provides three different calls *Iq*, *Iqxy* and *Imagnetic* 
  • doc/developer/index.rst

    rb85be2d r2e66ef5  
    77   :maxdepth: 4 
    88 
     9   overview.rst 
    910   calculator.rst 
  • doc/genapi.py

    r8ae8532 r2e66ef5  
    5656 
    5757modules = [ 
    58     ('__init__', 'Top level namespace'), 
     58    ('__init__', 'Sasmodels package'), 
    5959    #('alignment', 'GPU data alignment [unused]'), 
    6060    ('bumps_model', 'Bumps interface'), 
  • doc/guide/index.rst

    r990d8df r2e66ef5  
    1515   sesans/sesans_fitting.rst 
    1616   plugin.rst 
     17   scripting.rst 
    1718   refs.rst 
  • example/model.py

    r1182da5 r2e66ef5  
    1717model = Model(kernel, 
    1818    scale=0.08, 
    19     r_polar=15, r_equatorial=800, 
     19    radius_polar=15, radius_equatorial=800, 
    2020    sld=.291, sld_solvent=7.105, 
    2121    background=0, 
    2222    theta=90, phi=0, 
    2323    theta_pd=15, theta_pd_n=40, theta_pd_nsigma=3, 
    24     r_polar_pd=0.222296, r_polar_pd_n=1, r_polar_pd_nsigma=0, 
    25     r_equatorial_pd=.000128, r_equatorial_pd_n=1, r_equatorial_pd_nsigma=0, 
     24    radius_polar_pd=0.222296, radius_polar_pd_n=1, radius_polar_pd_nsigma=0, 
     25    radius_equatorial_pd=.000128, radius_equatorial_pd_n=1, radius_equatorial_pd_nsigma=0, 
    2626    phi_pd=0, phi_pd_n=20, phi_pd_nsigma=3, 
    2727    ) 
    2828 
    2929# SET THE FITTING PARAMETERS 
    30 model.r_polar.range(15, 1000) 
    31 model.r_equatorial.range(15, 1000) 
     30model.radius_polar.range(15, 1000) 
     31model.radius_equatorial.range(15, 1000) 
    3232model.theta_pd.range(0, 360) 
    3333model.background.range(0,1000) 
  • sasmodels/core.py

    r650c6d2 r2e66ef5  
    117117    Load model info and build model. 
    118118 
    119     *model_name* is the name of the model as used by :func:`load_model_info`. 
    120     Additional keyword arguments are passed directly to :func:`build_model`. 
     119    *model_name* is the name of the model, or perhaps a model expression 
     120    such as sphere*hardsphere or sphere+cylinder. 
     121 
     122    *dtype* and *platform* are given by :func:`build_model`. 
    121123    """ 
    122124    return build_model(load_model_info(model_name), 
     
    128130    """ 
    129131    Load a model definition given the model name. 
     132 
     133    *model_name* is the name of the model, or perhaps a model expression 
     134    such as sphere*hardsphere or sphere+cylinder. 
    130135 
    131136    This returns a handle to the module defining the model.  This can be 
     
    227232 
    228233    Possible types include 'half', 'single', 'double' and 'quad'.  If the 
    229     type is 'fast', then this is equivalent to dtype 'single' with the 
    230     fast flag set to True. 
     234    type is 'fast', then this is equivalent to dtype 'single' but using 
     235    fast native functions rather than those with the precision level guaranteed 
     236    by the OpenCL standard. 
     237 
     238    Platform preference can be specfied ("ocl" vs "dll"), with the default 
     239    being OpenCL if it is availabe.  If the dtype name ends with '!' then 
     240    platform is forced to be DLL rather than OpenCL. 
     241 
     242    This routine ignores the preferences within the model definition.  This 
     243    is by design.  It allows us to test models in single precision even when 
     244    we have flagged them as requiring double precision so we can easily check 
     245    the performance on different platforms without having to change the model 
     246    definition. 
    231247    """ 
    232248    # Assign default platform, overriding ocl with dll if OpenCL is unavailable 
Note: See TracChangeset for help on using the changeset viewer.