Changeset d15a908 in sasmodels for sasmodels/core.py


Ignore:
Timestamp:
Jan 27, 2016 5:35:15 PM (8 years ago)
Author:
Paul Kienzle <pkienzle@…>
Branches:
master, core_shell_microgels, costrafo411, magnetic_model, release_v0.94, release_v0.95, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
Children:
fdc538a
Parents:
37a7252
Message:

doc and delint

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/core.py

    rcde11f0f rd15a908  
    22Core model handling routines. 
    33""" 
    4 __all__ = ["list_models", "load_model_definition",  "precompile_dll", 
    5            "load_model", "make_kernel", "call_kernel", "call_ER", "call_VR" ] 
     4__all__ = [ 
     5    "list_models", "load_model_definition", "precompile_dll", 
     6    "load_model", "make_kernel", "call_kernel", "call_ER", "call_VR", 
     7    ] 
    68 
    79from os.path import basename, dirname, join as joinpath 
     
    6163 
    6264def isstr(s): 
     65    """ 
     66    Return True if *s* is a string-like object. 
     67    """ 
    6368    try: s + '' 
    6469    except: return False 
     
    99104    # source = open(info['name']+'.cl','r').read() 
    100105 
    101     if (platform=="dll" 
     106    if (platform == "dll" 
    102107            or not HAVE_OPENCL 
    103108            or not kernelcl.environment().has_type(dtype)): 
     
    128133    width = pars.get(name+'_pd', 0.0) 
    129134    nsigma = pars.get(name+'_pd_nsigma', 3.0) 
    130     value,weight = weights.get_weights( 
     135    value, weight = weights.get_weights( 
    131136        disperser, npts, width, nsigma, value, limits, relative) 
    132137    return value, weight / np.sum(weight) 
     
    195200                    for name in info['partype']['volume']] 
    196201        value, weight = dispersion_mesh(vol_pars) 
    197         whole,part = VR(*value) 
     202        whole, part = VR(*value) 
    198203        return np.sum(weight*part)/np.sum(weight*whole) 
    199204 
Note: See TracChangeset for help on using the changeset viewer.