Changeset 97cb037 in sasmodels
- Timestamp:
- Jan 25, 2016 7:42:05 AM (9 years ago)
- 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
- Location:
- sasmodels
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/convert.py
r6458608 r97cb037 3 3 """ 4 4 import 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. 8 MODELS_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. 18 MODELS_WITHOUT_BACKGROUND = [ 19 'guinier', 20 ] 5 21 6 22 PD_DOT = [ … … 98 114 # Note: update compare.constrain_pars to match 99 115 name = model_definition.name 100 if name in ('teubner_strey', 'broad_peak', 'two_lorentzian', 'gel_fit'):116 if name in MODELS_WITHOUT_SCALE: 101 117 if oldpars.pop('scale', 1.0) != 1.0: 102 118 warnings.warn("parameter scale not used in sasview %s"%name) 103 elif name in ('guinier',):119 elif name in MODELS_WITHOUT_BACKGROUND: 104 120 if oldpars.pop('background', 0.0) != 0.0: 105 121 warnings.warn("parameter background not used in sasview %s"%name) … … 125 141 # Note: update convert.revert_model to match 126 142 name = model_definition.name 127 if name in ('teubner_strey','broad_peak', 'two_lorentzian', 'gel_fit'):143 if name in MODELS_WITHOUT_SCALE: 128 144 pars['scale'] = 1 129 elif name in ('guinier',):145 elif name in MODELS_WITHOUT_BACKGROUND: 130 146 pars['background'] = 0 131 147 elif name == 'pearl_necklace':
Note: See TracChangeset
for help on using the changeset viewer.