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