Changeset f247314 in sasmodels for sasmodels/compare.py


Ignore:
Timestamp:
Apr 4, 2016 5:23:23 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:
ec45c4f
Parents:
204fd9b
Message:

use sasmodels/convert.json for converting new models to old

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/compare.py

    rea75043 rf247314  
    4141from .data import plot_theory, empty_data1D, empty_data2D 
    4242from .direct_model import DirectModel 
    43 from .convert import revert_pars, constrain_new_to_old 
     43from .convert import revert_name, revert_pars, constrain_new_to_old 
    4444 
    4545USAGE = """ 
     
    347347def eval_sasview(model_info, data): 
    348348    """ 
    349     Return a model calculator using the SasView fitting engine. 
     349    Return a model calculator using the pre-4.0 SasView models. 
    350350    """ 
    351351    # importing sas here so that the error message will be that sas failed to 
     
    366366        composition_type, parts = model_info['composition'] 
    367367        if composition_type == 'product': 
    368             from sas.sascalc.fit.MultiplicationModel import MultiplicationModel 
    369             P, S = [get_model(p) for p in model_info['oldname']] 
     368            from sas.models.MultiplicationModel import MultiplicationModel 
     369            P, S = [get_model(revert_name(p)) for p in parts] 
    370370            model = MultiplicationModel(P, S) 
    371371        else: 
    372372            raise ValueError("sasview mixture models not supported by compare") 
    373373    else: 
    374         model = get_model(model_info['oldname']) 
     374        model = get_model(revert_name(model_info)) 
    375375 
    376376    # build a smearer with which to call the model, if necessary 
Note: See TracChangeset for help on using the changeset viewer.