Changeset b3f4831 in sasmodels for sasmodels/convert.py
- Timestamp:
- Oct 30, 2018 11:07:41 AM (5 years ago)
- Branches:
- ticket_1156
- Children:
- cc8b183
- Parents:
- 5778279 (diff), c6084f1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/convert.py
r78f8308 rb3f4831 167 167 if version < (4, 2, 0): 168 168 oldpars = _hand_convert_4_1_to_4_2(name, oldpars) 169 oldpars = _rename_magnetic_pars(oldpars) 169 170 return oldpars 170 171 … … 174 175 oldpars['lattice_distortion'] = oldpars.pop('d_factor') 175 176 return oldpars 177 178 def _rename_magnetic_pars(pars): 179 """ 180 Change from M0:par to par_M0, etc. 181 """ 182 keys = list(pars.items()) 183 for k in keys: 184 if k.startswith('M0:'): 185 pars[k[3:]+'_M0'] = pars.pop(k) 186 elif k.startswith('mtheta:'): 187 pars[k[7:]+'_mtheta'] = pars.pop(k) 188 elif k.startswith('mphi:'): 189 pars[k[5:]+'_mphi'] = pars.pop(k) 190 elif k.startswith('up:'): 191 pars['up_'+k[3:]] = pars.pop(k) 192 return pars 176 193 177 194 def _hand_convert_3_1_2_to_4_1(name, oldpars):
Note: See TracChangeset
for help on using the changeset viewer.