Changeset 47fafe9 in sasmodels
- Timestamp:
- Nov 16, 2016 3:41:33 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:
- f8f5a37
- Parents:
- 8d06779
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sasmodels/convert.py
r8d06779 r47fafe9 4 4 from __future__ import print_function, division 5 5 6 import re 6 7 import math 7 8 import warnings … … 72 73 if id.startswith('M0:'): 73 74 return True 75 if id.startswith('volfraction') or id.startswith('radius_effective'): 76 return False 74 77 if '_pd' in id or '.' in id: 75 78 return False … … 133 136 :return: 134 137 """ 135 import re136 138 new_pars = {} 139 i = 0 140 j = 0 137 141 for key_par, value_par in pars.iteritems(): 142 j += 1 138 143 for key_conv, value_conv in conv_dict.iteritems(): 139 144 if re.search(value_conv, key_par): 140 145 new_pars[key_par.replace(value_conv, key_conv)] = value_par 146 i += 1 141 147 break 142 148 elif re.search("background", key_par) or re.search("scale", key_par): 143 149 new_pars[key_par] = value_par 150 i += 1 144 151 break 152 if i != j: 153 new_pars[key_par] = value_par 154 i += 1 145 155 return new_pars 146 156 … … 295 305 newpars = _hand_convert(newname, newpars) 296 306 newpars = _convert_pars(newpars, translation) 297 newpars = _rescale_sld(model_info, newpars, 1e6) 307 if not model_info.structure_factor: 308 newpars = _rescale_sld(model_info, newpars, 1e6) 298 309 newpars.setdefault('scale', 1.0) 299 310 newpars.setdefault('background', 0.0)
Note: See TracChangeset
for help on using the changeset viewer.