Changeset 87985ca in sasmodels for sasmodels/sasview_model.py


Ignore:
Timestamp:
Sep 2, 2014 2:35:23 PM (10 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:
19dcb933
Parents:
f4cf580
Message:

clean up source tree

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/sasview_model.py

    r5d4777d r87985ca  
     1""" 
     2Sasview model constructor. 
     3 
     4Given a module defining an OpenCL kernel such as sasmodels.models.cylinder, 
     5create a sasview model class to run that kernel as follows:: 
     6 
     7    from sasmodels.sasview_model import make_class 
     8    from sasmodels.models import cylinder 
     9    CylinderModel = make_class(cylinder, dtype='single') 
     10 
     11The model parameters for sasmodels are different from those in sasview. 
     12When reloading previously saved models, the parameters should be converted 
     13using :func:`sasmodels.convert.convert`. 
     14""" 
     15 
     16# TODO: add a sasview=>sasmodels parameter translation layer 
     17# this will allow us to use the new sasmodels as drop in replacements, and 
     18# delay renaming parameters until all models have been converted. 
     19 
    120import math 
    221from copy import deepcopy 
     
    1635    """ 
    1736    Load the sasview model defined in *kernel_module*. 
    18     :param kernel_module: 
    19     :param dtype: 
    20     :return: 
     37 
     38    Returns a class that can be used directly as a sasview model. 
    2139    """ 
    2240    model =  load_model(kernel_module, dtype=dtype) 
Note: See TracChangeset for help on using the changeset viewer.