Changeset 0795293 in sasmodels
- Timestamp:
- Dec 21, 2016 12:00:35 PM (8 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:
- a297255, bb584b3
- Parents:
- 86e8e66
- Location:
- sasmodels
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/conversion_table.py
r86e8e66 r0795293 29 29 CONVERSION_TABLE = { 30 30 (4,0,1) : {}, 31 (4,0,0) : {}, 31 32 (3,1,2) : { 32 33 "adsorbed_layer": [ -
sasmodels/convert.py
r86e8e66 r0795293 295 295 return oldpars 296 296 297 def convert_model(name, pars, use_underscore=False ):297 def convert_model(name, pars, use_underscore=False, model_version=(3,1,2)): 298 298 """ 299 299 Convert model from old style parameter names to new style. 300 300 """ 301 301 newpars = pars 302 for version, _ in sorted(CONVERSION_TABLE.iteritems()): 302 keys = sorted(CONVERSION_TABLE.keys()) 303 for i, version in enumerate(keys): 304 # If the save state is from a later version, skip the check 305 if model_version > version and model_version != keys[i+1]: 306 continue 303 307 newname = _conversion_target(name, version) 308 # If no conversion is found, move on 304 309 if newname is None: 305 310 newname = name
Note: See TracChangeset
for help on using the changeset viewer.