Changes in / [bf227cd:a1c91c2] in sasmodels
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/convert.py
r667a6f2 r310ddcb 4 4 import warnings 5 5 6 STRUCTURE_FACTORS = [7 'hardsphere',8 'stickyhardsphere',9 'squarewell',10 'HayterMSAsq'11 ]12 6 # List of models which SasView versions don't contain the explicit 'scale' argument. 13 7 # When converting such a model, please update this list. 14 MODELS_WITHOUT_SCALE = STRUCTURE_FACTORS +[8 MODELS_WITHOUT_SCALE = [ 15 9 'teubner_strey', 16 10 'broad_peak', … … 27 21 # List of models which SasView versions don't contain the explicit 'background' argument. 28 22 # When converting such a model, please update this list. 29 MODELS_WITHOUT_BACKGROUND = STRUCTURE_FACTORS +[23 MODELS_WITHOUT_BACKGROUND = [ 30 24 'guinier', 31 25 ] … … 128 122 # Note: update compare.constrain_pars to match 129 123 name = model_info['id'] 130 if name in MODELS_WITHOUT_SCALE :124 if name in MODELS_WITHOUT_SCALE or model_info['structure_factor']: 131 125 if oldpars.pop('scale', 1.0) != 1.0: 132 126 warnings.warn("parameter scale not used in sasview %s"%name) 133 if name in MODELS_WITHOUT_BACKGROUND :127 if name in MODELS_WITHOUT_BACKGROUND or model_info['structure_factor']: 134 128 if oldpars.pop('background', 0.0) != 0.0: 135 129 warnings.warn("parameter background not used in sasview %s"%name) … … 161 155 name = model_info['id'] 162 156 # Note: update convert.revert_model to match 163 if name in MODELS_WITHOUT_SCALE :157 if name in MODELS_WITHOUT_SCALE or model_info['structure_factor']: 164 158 pars['scale'] = 1 165 if name in MODELS_WITHOUT_BACKGROUND :159 if name in MODELS_WITHOUT_BACKGROUND or model_info['structure_factor']: 166 160 pars['background'] = 0 167 161 # sasview multiplies background by structure factor
Note: See TracChangeset
for help on using the changeset viewer.