Changeset 86e8e66 in sasmodels for sasmodels/convert.py
- Timestamp:
- Dec 20, 2016 12:08:41 PM (7 years ago)
- Branches:
- master, core_shell_microgels, costrafo411, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- 0795293
- Parents:
- 54fb5d8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/convert.py
r54fb5d8 r86e8e66 92 92 93 93 94 def _get_translation_table(model_info, version= '3.1.2'):94 def _get_translation_table(model_info, version=(3,1,2)): 95 95 _, translation = CONVERSION_TABLE.get(version).get(model_info.id, [None, {}]) 96 96 translation = translation.copy() … … 145 145 return newpars 146 146 147 def _conversion_target(model_name, version= '3.1.2'):147 def _conversion_target(model_name, version=(3,1,2)): 148 148 """ 149 149 Find the sasmodel name which translates into the sasview name. … … 159 159 return None 160 160 161 def _hand_convert(name, oldpars, version= '3.1.2'):162 if version == '3.1.2':161 def _hand_convert(name, oldpars, version=(3,1,2)): 162 if version == (3,1,2): 163 163 oldpars = _hand_convert_3_1_2_to_4_1(name, oldpars) 164 164 return oldpars … … 316 316 newpars = _hand_convert(newname, newpars, version) 317 317 newpars = _convert_pars(newpars, translation) 318 if not model_info.structure_factor: 318 # TODO: Still not convinced this is the best check 319 if not model_info.structure_factor and version == (3,1,2): 319 320 newpars = _rescale_sld(model_info, newpars, 1e6) 320 321 newpars.setdefault('scale', 1.0)
Note: See TracChangeset
for help on using the changeset viewer.