Changeset 81ec7c8 in sasmodels


Ignore:
Timestamp:
Apr 13, 2016 9:12:22 AM (9 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:
3a45c2c, 62cf915
Parents:
a936688
Message:

update sasview wrapper so that model details are class attributes

Location:
sasmodels
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/generate.py

    ra936688 r81ec7c8  
    699699 
    700700    """ 
    701     # TODO: maybe turn model_info into a class ModelDefinition 
    702701    parameters = COMMON_PARAMETERS + kernel_module.parameters 
    703702    filename = abspath(kernel_module.__file__) 
  • sasmodels/sasview_model.py

    ra936688 r81ec7c8  
    9191    attrs = _generate_model_attributes(model_info) 
    9292    attrs['__init__'] = __init__ 
    93     ConstructedModel = type(model_info['name'], (SasviewModel,), attrs) 
     93    ConstructedModel = type(model_info['id'], (SasviewModel,), attrs) 
    9494    return ConstructedModel 
    9595 
     
    107107    attrs['_model_info'] = model_info 
    108108    attrs['name'] = model_info['name'] 
     109    attrs['id'] = model_info['id'] 
    109110    attrs['description'] = model_info['description'] 
    110111    attrs['category'] = model_info['category'] 
Note: See TracChangeset for help on using the changeset viewer.