Changeset 97cb037 in sasmodels


Ignore:
Timestamp:
Jan 25, 2016 7:42:05 AM (9 years ago)
Author:
piotr
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:
29da213
Parents:
61fd21d
Message:

Converted BEPolyelectrolyte

Location:
sasmodels
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/convert.py

    r6458608 r97cb037  
    33""" 
    44import warnings 
     5 
     6# List of models which SasView versions don't contain the explicit 'scale' argument. 
     7# When converting such a model, please update this list. 
     8MODELS_WITHOUT_SCALE = [ 
     9    'teubner_strey', 
     10    'broad_peak', 
     11    'two_lorentzian', 
     12    'gel_fit', 
     13    'be_polyelectrolyte', 
     14] 
     15 
     16# List of models which SasView versions don't contain the explicit 'background' argument. 
     17# When converting such a model, please update this list. 
     18MODELS_WITHOUT_BACKGROUND = [ 
     19    'guinier', 
     20] 
    521 
    622PD_DOT = [ 
     
    98114    # Note: update compare.constrain_pars to match 
    99115    name = model_definition.name 
    100     if name in ('teubner_strey', 'broad_peak', 'two_lorentzian', 'gel_fit'): 
     116    if name in MODELS_WITHOUT_SCALE: 
    101117        if oldpars.pop('scale', 1.0) != 1.0: 
    102118            warnings.warn("parameter scale not used in sasview %s"%name) 
    103     elif name in ('guinier',): 
     119    elif name in MODELS_WITHOUT_BACKGROUND: 
    104120        if oldpars.pop('background', 0.0) != 0.0: 
    105121            warnings.warn("parameter background not used in sasview %s"%name) 
     
    125141    # Note: update convert.revert_model to match 
    126142    name = model_definition.name 
    127     if name in ('teubner_strey','broad_peak', 'two_lorentzian', 'gel_fit'): 
     143    if name in MODELS_WITHOUT_SCALE: 
    128144        pars['scale'] = 1 
    129     elif name in ('guinier',): 
     145    elif name in MODELS_WITHOUT_BACKGROUND: 
    130146        pars['background'] = 0 
    131147    elif name == 'pearl_necklace': 
Note: See TracChangeset for help on using the changeset viewer.