Changeset 610ef23 in sasmodels for sasmodels/convert.py
- Timestamp:
- Oct 3, 2018 10:07:52 AM (6 years ago)
- Branches:
- master, core_shell_microgels, magnetic_model, ticket-1257-vesicle-product, ticket_1156, ticket_1265_superball, ticket_822_more_unit_tests
- Children:
- e39202b, bd547d0
- Parents:
- a1ec908
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/convert.py
ra69d8cd r610ef23 165 165 if version == (3, 1, 2): 166 166 oldpars = _hand_convert_3_1_2_to_4_1(name, oldpars) 167 if version < (4, 2, 0): 168 oldpars = _rename_magnetic_pars(oldpars) 167 169 return oldpars 170 171 def _rename_magnetic_pars(pars): 172 """ 173 Change from M0:par to par_M0, etc. 174 """ 175 keys = list(pars.items()) 176 for k in keys: 177 if k.startswith('M0:'): 178 pars[k[3:]+'_M0'] = pars.pop(k) 179 elif k.startswith('mtheta:'): 180 pars[k[7:]+'_mtheta'] = pars.pop(k) 181 elif k.startswith('mphi:'): 182 pars[k[5:]+'_mphi'] = pars.pop(k) 183 elif k.startswith('up:'): 184 pars['up_'+k[3:]] = pars.pop(k) 185 return pars 168 186 169 187 def _hand_convert_3_1_2_to_4_1(name, oldpars):
Note: See TracChangeset
for help on using the changeset viewer.