Changes in / [a1c91c2:bf227cd] in sasmodels


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sasmodels/convert.py

    r310ddcb r667a6f2  
    44import warnings 
    55 
     6STRUCTURE_FACTORS = [ 
     7    'hardsphere', 
     8    'stickyhardsphere', 
     9    'squarewell', 
     10    'HayterMSAsq' 
     11] 
    612# List of models which SasView versions don't contain the explicit 'scale' argument. 
    713# When converting such a model, please update this list. 
    8 MODELS_WITHOUT_SCALE = [ 
     14MODELS_WITHOUT_SCALE = STRUCTURE_FACTORS + [ 
    915    'teubner_strey', 
    1016    'broad_peak', 
     
    2127# List of models which SasView versions don't contain the explicit 'background' argument. 
    2228# When converting such a model, please update this list. 
    23 MODELS_WITHOUT_BACKGROUND = [ 
     29MODELS_WITHOUT_BACKGROUND = STRUCTURE_FACTORS + [ 
    2430    'guinier', 
    2531] 
     
    122128    # Note: update compare.constrain_pars to match 
    123129    name = model_info['id'] 
    124     if name in MODELS_WITHOUT_SCALE or model_info['structure_factor']: 
     130    if name in MODELS_WITHOUT_SCALE: 
    125131        if oldpars.pop('scale', 1.0) != 1.0: 
    126132            warnings.warn("parameter scale not used in sasview %s"%name) 
    127     if name in MODELS_WITHOUT_BACKGROUND or model_info['structure_factor']: 
     133    if name in MODELS_WITHOUT_BACKGROUND: 
    128134        if oldpars.pop('background', 0.0) != 0.0: 
    129135            warnings.warn("parameter background not used in sasview %s"%name) 
     
    155161    name = model_info['id'] 
    156162    # Note: update convert.revert_model to match 
    157     if name in MODELS_WITHOUT_SCALE or model_info['structure_factor']: 
     163    if name in MODELS_WITHOUT_SCALE: 
    158164        pars['scale'] = 1 
    159     if name in MODELS_WITHOUT_BACKGROUND or model_info['structure_factor']: 
     165    if name in MODELS_WITHOUT_BACKGROUND: 
    160166        pars['background'] = 0 
    161167    # sasview multiplies background by structure factor 
Note: See TracChangeset for help on using the changeset viewer.